Currently OBS Studio can only stream to a single service, such as Facebook or YouTube, but we are going to set up a way to stream to another service at the same time. Assuming that you are already comfortable streaming to Facebook, YouTube will be our second service.
The following Python code can be saved as something like
second_stream.pyand run from there.
xxxx-xxxx-xxxx-xxxxwith your stream key from YouTube Studio, and
/home/username/Videoswith the path to the folder where OBS records your videos. You may also need to include the
This code finds the most recent file in your OBS recordings folder and streams that file to YouTube. You may want to enable the setting "Automatically record when streaming" in OBS, otherwise you'll need to click "Start Streaming" and "Start Recording" each time.
Start recording in OBS then run the code, and it should start streaming the recording to YouTube without interfering with your primary stream. You will, of course, need enough upload bandwidth for both streams.
Potentially you could have another copy of this Python script running to streams the recording to a third service, such as Twitch.
Hopefully that helps get you started with secondary streams from OBS Studio. Let me know if any of this doesn't work for you.