How to Install OBS in Ubuntu

How to install OBS in Ubuntu or Linux Mint is not quite as easy as in Windows. The OBS software install is pretty straight forward though using a terminal window. This is tested on Ubuntu 20.04 and Mint 20.

Following these simple steps you can get OBS installed quickly:

 

Copy and Paste the following commands one line at a time in the terminal window.

sudo apt install ffmpeg
sudo apt install v4l2loopback-dkms

sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt update
sudo apt install obs-studio

 

Adding the OBS Projects repository will keep your software up to date. Make sure you keep backups in the event an update breaks the software.

 

That’s it, you now have the OBS Studio installed. Now comes the fun, installing VirtualCam and Virtual Audio Cable so you can use the video and the audio out of OBS and pass it to Zoom or other streaming services. You can also use OBS to Live Stream to YouTube or Facebook directly without having to use either VirtualCam and Virtual Audio Cam.

 

Now to install the virtual plugins. In order to pass the video to Zoom or other platforms, you need to install the VirtualCam plugin. Instead of compiling the code, here is the obs-4l2sink.deb (Ubuntu 20.04 and Mint 20) installation package. Click to download it. For the (Ubuntu 20.04 and Mint 19) obs-4l2sink.deb download. Save it to your Home root folder. Open a terminal window and run:

sudo dpkg -i *.deb.  Note: make sure you don’t have any other Deb packages in the folder, or they will get installed as well. If you get an error while installing it, run:

sudo apt-get install -f, this will install any missing dependencies.

 

Now you have the Video (VirtualCam) installed and ready to use.

 

The Audio is next. If you want to manually run before you open OBS then you are done. Here are the Audio and Video you need to run in a terminal window once before you run OBS.

 

1st the Audio, then the Video: Note the first line is not run as root…

Audio:
pacmd load-module module-null-sink sink_name=Virtual_Sink sink_properties=device.description=Virtual_Sink

Video:
sudo modprobe v4l2loopback video_nr=10 card_label=”OBS Stream”

Close your terminal window and your ready. Note: video_nr=10 is the video port number.

 

Open your OBS Studio software and go to the Menu, click on Tools then 4l2sink and Start. Your video is now ready to become the virtual camera for Zoom or other streaming platforms. If you get an error, you need to reboot and try a different video port like video_nr=11. In Tools and 4l2sink, change the port number there as well. As you see in the Tools, 4l2sink you see you can have it automatically start when you start, but be careful, if it automatically starts, you will not be able to change some video settings in the software. So get all your settings setup then you can turn on the automatic setting.

 

For your Audio, you must open your sound settings and click on the Input tab and select your webcam as the microphone input.

 

In Zoom, choose the “OBS Studio” as your webcam. For the audio, select “Same as System“. Now all your video and audio are coming from your OBS software.

If want the audio and video plugins to load at boot, here’s how.

Audio:

Run this command in a Terminal Window:

sudo gedit /etc/pulse/default.pa  (change gedit to your editor)

Then look for load-module module-null-sink

Add the following to it:

sink_name=Virtual_Sink sink_properties=device.description=Virtual_Sink

Should look like this now:

load-module module-null-sink sink_name=Virtual_Sink sink_properties=device.description=Virtual_Sink

Save it and this will load the Virtual Audio Cable every time you boot.

Setup Virtual Cam in Ubuntu and Mint

In a Terminal window run:

sudo gedit /etc/systemd/system/v4l2loopback.service  (change gedit to your editor)

Paste this in then save:

[Unit]
Description=Modprobe v4l2loopback

[Service]
Type=simple
ExecStart=modprobe v4l2loopback video_nr=10 card_label=”OBS Stream”

[Install]
WantedBy=multi-user.target

 

If you get an error, you need to reboot and try a different video port like video_nr=11  In Tools and 4l2sink, change the port number there as well.

Next run this command in a Terminal Window:

sudo systemctl enable v4l2loopback.service

If you want to run it right away then run:

sudo systemctl start v4l2loopback.service

Now every time you boot up, your Virtual Audio Cable, and Virtual Cam will be loaded and ready to use….

 

References

OBS Studio

OBS Forum

OBS Deb Installer

obs-v4l2sink for Ubuntu 18.04

 

Obs Studio, Obs Studio Audio, Obs Studio Plugins, Obs Studio Record Screen And Audio, Obs Studio Recording, Obs Studio Ubuntu