How to stream two or more IP cameras in Youtube using OBS and a single stream

How to stream two or more simultaneous IP cameras in Youtube using OBS

This build is based upon Linux (Ubuntu 16), OBS for Linux, and a Youtube membership/user, and one or more video cameras (its interesting to note that both of these cameras use the wifi interface to access the primary network).  

This is very similar to the page on “How to stream an IP camera using Youtube “live”” which is part of this topic.  The only basic difference is that we are going to combine two “sources” into a single “scene”.  This will provide an appearance of a single stream with two cameras side by side as shown below – two distinctive live/realtime feeds from two cameras.  

What follows is “the how to configure OBS” to accomplish the above.  

When you first launch OBS in Linux you will see a screen similar to the following:

There are two panes to the bottom left.  A Scene and a Sources pane.  When first starting OBS the Scenes pane will contain a predefined “Scene” and no Sources.  For our purpose we are going to define one squirrel cam Source (squirrel_cams) and two Squirrel cam Sources (sq1cam and sq2cam).

We must now define the rtsp call to each of these cameras.  For me this webpage helped me define the rstp url if your documentation does not provide this data: 

A user:passwd might be required in the rtsp url.  This is most likely defined in your camera’s configuration.

Now we click on “Settings” on the far lower right.  This brings us to the bulk of the settings for OBS.  Starting with the

General Tab:  I accepted the defaults.  You can always modify them later if necessary.

Stream tab:  This “tab” is critical for using Youtube and other similar services.  You must provide your server name and your own personal stream key.  This key is to be found on the Youtube live streaming page.  It is unique to you and should someone else acquire it they can “stream in your name”.

Output tab:  Here you can adjust the video and audio bit rates based upon the speed your ISP provides.  You may have to tinker with this to see what proves the best quality.

Audio tab: I accepted the defaults.

Video tab: I experimented with the “Base (Canvas) Resolution and the “Output (Scaled) Resolution.  This seemed to effect the “quality” options available in the Youtube live stream, i.e., 144p, 360p, … 720pHD.  You may have to experiment.

Hotkeys tab: I accepted the defaults.

Advanced tab:  I accepted the defaults.

If you notice that you stream stops suddenly and you did not do anything to cause this behavior click on the “tools” pulldown and check that there are no “stops” defined as shown below:

You may have to do for both cameras.