tfabris / CrowCam

A set of Bash scripts to control and maintain a YouTube live cam from a Synology NAS.
GNU General Public License v3.0
3 stars 3 forks source link

Try using YouTube API to stop/start stream broadcast during splits. #54

Closed tfabris closed 4 years ago

tfabris commented 4 years ago

When I'm deliberately splitting the stream, for instance, when I am splitting the stream in the middle of the day to keep the video lengths manageably short, there is a problem.

The problem is that I stop the stream by shutting it off at the Synology end. Though this is consistent with the instructions given by YouTube, it has a drawback. I have to shut it off for a long time (a couple of minutes) in order for the stream to actually get split into two different segments. I'm not sure if this is a Synology bug (maybe the RSTP stream is supposed to send a "stop" signal and doesn't?) but even if it is, I have to work around it if I want to truly split the stream.

YouTube hangs onto the stream, and does not split it, for a good reason: It's to cover network hiccups. If the stream briefly goes down they want to make sure it comes back up again. However this means that if I want a midday split, I've got to bouncedown for a couple of minutes. Sometimes this makes me lose interesting antics happening on the screen (if the bouncedown happens at the same time the antics are happening).

To do:

tfabris commented 4 years ago

This is difficult. I'm not sure I'm going to be successful at this. I ran into the following problems when trying this:

That's not what I wanted - I wanted a quick stop and restart, and this is looking not so quick. Looks like doing it this way is prohibitively annoying, and the old way of bouncing is easier and takes equally as long.

I'm saving off my experimental code in a side branch just in case, but I think I'm abandoning this idea overall.