Installing OBS on Ubuntu 16.04 – single camera stream
For Ubuntu 15.04 and on FFmpeg is officially included:
sudo apt-get install ffmpeg
After installing FFmpeg, install OBS Studio using:
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt-get update && sudo apt-get install obs-studio
After the install completes launch OBS from the OBS icon.
It will look like the following:
We can now begin manual configuration or use the “Auto configuration wizard (Beta)” I will would use manual configuration if using YouTube or one of the other services, but because I am going to use a custom service – nginx I will go through the manual configuration process.
In the above pane you will notice two boxes: “Scenes” and “Sources”. These boxes are critical. Of interest the “Scenes” box already contain and entry called “Scene” while the “Source” box is empty.
Lets begin by adding a scene called birdfeeder. Click on the “+” below the scene box. Enter birdfeeder. You will now note that “birdfeeder” appears in the “Scenes” box.
Lets add a source to the “Sources” box. From the drop down menu choose “Media Source”, “Create/Select Source” accept default, “Properties for “Media Source2″”, uncheck “Local file”, “Input”: “rtsp://user:email@example.com/media/video1”
(this line is camera dependent check with your camera manufacturer), check “Restart Playback when…”, “Hide source when Playback …”, (do NOT check “harware encoding”) click “ok”.
You will now seethe the following image which is a preview of this camera:
More configuration follows:
From the OBS title bar choose “File”, “Settings”. see below. We will now configure each of the settings: “General” through “Advanced”.
General – accept default
Here we define “Stream Type”, “Service”, “Server”, and “Stream Key”.
- Under “Stream Type” I will choose “Custom Streaming Server” (nginx)
- Under “URL:” “rtmp://nginx_server_ip_address/application_name_that_was_defined_in_nginx.conf file”. If you followed my nginx.conf example that application name is: “live”. so the entry will be: rtmp://your_nginx_pc_addr/live (rtmp://10.20.xxx.xxx/live <–use your ip address
- Under “Stream key” I will use “test” for this procedure. You can use anything here of your choosing. If you are using YouTube or some other similar service this “Stream key” attribute will have to be obtained from them. It is very specific.
- Leave “Use authentication” unchecked.
- There are two “Output Modes”: “Simple” and “Advanced”. Under “Advanced” there are 4 additional Tabs.
- I chose “Advanced” and accepted the defaults for all Tabs. Under the “Streaming” tab use CBR for RTMP and be prepared to adjust the “Bitrate” setting which defaults to 2500. See image below:
Accept the defaults.
Accept the defaults. See pane below.
As a reminder make sure the nginx port defined as “listen 1935” is port forwarded in your router/gateway. I cannot cover how to do this here since the menuing system for all routers varies.
These settings might need adjusting after this initial attemp.