For meetings, I need to change the background to a particular image. I could not see the "Show background effects" feature in my ubuntu 18.04. How can we add a virtual background?
4 Answers
As of January 2022, the Teams Background Effects (change/blur) works in Microsoft Edge for Linux. I have it running on Ubuntu 20.04.
Here's what it looks like (option highlighted in red):

Create Teams on Edge desktop file
You can also create .desktop file to open MS Edge with Teams. You can do this by:
- Copy and rename existing Edge .desktop file from terminial:
cp /usr/share/applications/microsoft-edge.desktop ~/.local/share/applications/microsoft-teams-edge.desktop - Edit the file:
gedit ~/.local/share/applications/microsoft-teams-edge.desktop - Change
Nameentry at the top of the file and replace it with something likeName=Teams on Edge Microsoft - Find the
Execentry in the file and replace it withExec=/usr/bin/microsoft-edge-stable --profile-directory="Default" https://teams.live.com/. If you use multiple MS Edge profiles, change "Default" in the above command to the profile you use for Teams (eg--profile-directory="Profile 1"). - Optional: You can also set a unique icon so that Teams on Edge looks different to the default Edge icon. Here is the icon I created for this purpose.
Background
This functionality update is related to Microsoft Feature ID: 85738. It may also work in Chromium-based browsers like Chrome or Brave. Also see here for more info.
- 1,571
The feature is currently absent for Linux systems. According to Change your background for a Teams meeting - Office Support:
- For now, Linux users aren't able to use this feature.
- 18,154
I use teams-for-linux electron app installed as deb in Ubuntu 22.04 with the following launch parameters
teams-for-linux \
--isCustomBackgroundEnabled=true \
--customBGServiceBaseUrl=http://localhost:8888/evergreen-assets/backgroundimages/ \
--appLogLevels error,warn,info,debug
teams-for-linux is installed from GitHub releases:
VERSION=1.12.6
wget "https://github.com/IsmaelMartinez/teams-for-linux/releases/download/v$VERSION/teams-for-linux_$VERSION_amd64.deb"
sudo dpkg -i "teams-for-linux_$VERSION_amd64.deb"
- Prepare the background images
# create a folder for the backgrounds
mdkir ~/teams-backgrounds
cd ~/teams-backgrounds
create subfolders
mkdir -p evergreen-assets/backgroundimages
convert your backgrounds with imagemagick
sudo apt install imagemagick
convert /tmp/YourCompanyTeamsBG-4.png
-resize 1920x
-colors 256
-depth 8
-colorspace RGB
evergreen-assets/backgroundimages/YourCompanyTeamsBG-4.png
convert /tmp/YourCompanyTeamsBG-4.png
-resize 280x
-colorspace RGB
-alpha off
evergreen-assets/backgroundimages/YourCompanyTeamsBG-4_thumb.png
remove metadata with exiftool
sudo apt install libimage-exiftool-perl
exiftool -all= YourCompanyTeamsBG-4.png
- Prepare
config.jsonfile
Put the following text to ~/teams-backgrounds/evergreen-assets/backgroundimages/config.json
{
"videoBackgroundImages": [{
"name": "YourCompanyTeamsBG-1",
"id": "YourCompanyTeamsBG-1",
"filetype": "png",
"src": "/evergreen-assets/backgroundimages/YourCompanyTeamsBG-1.png?v=0.1",
"thumb_src": "/evergreen-assets/backgroundimages/YourCompanyTeamsBG-1_thumb.png?v=0.1"
},
{
"name": "YourCompanyTeamsBG-4",
"id": "YourCompanyTeamsBG-4",
"filetype": "png",
"src": "/evergreen-assets/backgroundimages/YourCompanyTeamsBG-4.png?v=0.1",
"thumb_src": "/evergreen-assets/backgroundimages/YourCompanyTeamsBG-4_thumb.png?v=0.1"
}
]
}
- Compare your
config.jsonand pictures' properties with the official ones
https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/config.json
vimdiff config.json https://statics.teams.cdn.office.net/evergreen-assets/backgroundimages/config.json
vimdiff <(exiftool YourCompanyTeamsBG-4.png) <(exiftool inTheZone1.png)
vimdiff <(exiftool YourCompanyTeamsBG-4_thumb.png) <(exiftool inTheZone1_thumb.png)
- Start up local web server
Create ~/nginx_default.conf with the following text
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
autoindex on;
add_header 'Access-Control-Allow-Origin' '*';
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Start up the server
cd ~/teams-backgrounds
docker run --rm --name docker_nginx -v "$PWD:/usr/share/nginx/html:ro" -v "$HOME/nginx_default.conf:/etc/nginx/conf.d/default.conf:ro" -p 8888:80 nginx:alpine
I used Nginx instead of python3 -m http.server 8888, because CORS '*' has to be configured, and OPTIONS protocol needs to be supported.
- Start
teams-for-linuxwith launch parameters mentioned above.
- 374
Use obs-studio with obs-backgroundremoval plugin.
- Install obs-studio
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install obs-studio
- Install obs-backgroundremoval plugin from Github releases
VERSION=1.1.13
wget "https://github.com/locaal-ai/obs-backgroundremoval/releases/download/$VERSION/obs-backgroundremoval-$VERSION-x86_64-linux-gnu.deb"
dpkg -i "obs-backgroundremoval-$VERSION-x86_64-linux-gnu.deb"
Follow video instructions posted on Github to
a. create a scene
b. add new source:
Video Capture Device (V4L2)c. in
Video Capture Device (V4L2)FiltersaddBackground Removal(see my params below)d. add new Source
Image(your Teams background)Press
Start Virtual CameraOpen Teams and choose
OBS Virtual Camera
obs-backgroundremoval params that worked fine for me
* Threshold: 0.50 -> 0.15
* Contour Filters (% of image): 0.05
* Smooth silhouette: 0.50
* Feather blend silhouette: 0.00
* Interference device: CPU
* Calculate every X frame: 1
* # CPU threads: 1 -> 4
* Segmentation model: Robust Video Matting
* TemporalSmoothFactor: 0.85
* Sim. thresh.: 35.00
* Blur background: 0.00
- 374


