I haven't fully tested this, launching with task scheduler, but I just launched firefox with this cmdI know this thread is 3+ years old. I'm new to OBS and have the same issue you posted about. I see where you went to an earlier version of OBS to fix your issue, but do you know if it was ever addressed/fixed in the current version? I have a very simple setup - an IP camera pointed at my bird feeder. Everything works great; my computer reboots nightly so OBS is in my Startup folder, the stream is set to start before sunrise and end after sunset, it streams to YouTube just fine, EXCEPT for this damn "You need to set up a broadcast before you can start streaming" stopping everything from running. Thanks.
Code:
firefox --headless --no-remote "https://studio.youtube.com/channel/UC/livestreaming"
After letting it cook for few seconds I was able to use ffmpeg to start my youtube livestream. It reused the last broadcast configuration I setup in the youtube studio. I double checked it by ending the ffmpeg stream and waiting a few minutes for youtube to automatically, officially, end the stream and confirmed that it wouldn't work without the loading the website with headless firefox.
Should work the same in OBS if you avoid signing in with youtube and instead only supply the stream key. If it doesn't work, you don't really need OBS anyways.
Heres the ffmpeg command I'm using for my automagic youtube broadcast.
Code:
ffmpeg -re -i "http://192.168.1.13:8081/video.mjpg?q=20&fps=30" -f lavfi -i anullsrc -c:v libx264 -preset veryfast -tune zerolatency -maxrate 2500k -bufsize 5000k -pix_fmt yuv420p -g 24 -r 24 -f flv "rtmp://a.rtmp.youtube.com/live2/<streamkey>"
Fiddle away, "-f lavfi -i anullsrc" creates a null audio source as youtube will not accept a stream without audio. If your video source has audio you wouldn't need this. The rest should be easily googleable/self-evident.