Possible to Programmatically Select Youtube Broadcast in OBS?

qjetha

New Member
Hi Fellow Programmers & Streamers,

I am using OBS websockets as part of a pipeline to livestream game replays to youtube. I have a trigger that looks for a completed game and when it detects one it uses websockets to automate the live-streaming on youtube. I don't know when these game replays occur and they occur multiple times per day.

My issue is with youtube - each new OBS stream does not start a Youtube livestream until I click on the "dismiss" button in Youtube Studio. That is annoying and unacceptable given that this needs to be 100% automated - so to circumvent I am using the Youtube API to create a broadcast whenever a trigger event happens. This gets around the youtube issue, but now I am stuck because I am unable to programmatically set the broadcast on OBS to the broadcast I have created using the Youtube API.

Has anyone had similar issues with automated youtube live-streams? Is there a way to programmatically set the existing Youtube Broadcast in OBS?
 

AaronD

Active Member
What's a "broadcast"? You mean the stream key? If you really *have* to, you could programmatically rewrite the profile while OBS is closed. File -> Show Profile Folder, and it shouldn't be too hard to find.

Or you could use the Advanced Scene Switcher plugin to do that:
1690567448497.png

Adv. SS can do a LOT more than just this though! Poke around and see what you find.
 

JSL185

New Member
Hi Fellow Programmers & Streamers,

I am using OBS websockets as part of a pipeline to livestream game replays to youtube. I have a trigger that looks for a completed game and when it detects one it uses websockets to automate the live-streaming on youtube. I don't know when these game replays occur and they occur multiple times per day.

My issue is with youtube - each new OBS stream does not start a Youtube livestream until I click on the "dismiss" button in Youtube Studio. That is annoying and unacceptable given that this needs to be 100% automated - so to circumvent I am using the Youtube API to create a broadcast whenever a trigger event happens. This gets around the youtube issue, but now I am stuck because I am unable to programmatically set the broadcast on OBS to the broadcast I have created using the Youtube API.

Has anyone had similar issues with automated youtube live-streams? Is there a way to programmatically set the existing Youtube Broadcast in

Did you find an automated solution for this? Similar use case for me, need to kickoff a live stream on YouTube and automate the YouTube Studio Broadcast setup steps. Anyone have a python or Lua script that could be used as a template?
 

AaronD

Active Member
Did you find an automated solution for this? Similar use case for me, need to kickoff a live stream on YouTube and automate the YouTube Studio Broadcast setup steps. Anyone have a python or Lua script that could be used as a template?
Did you see my response above?
 
Top