Closed tfabris closed 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:
# This worked in the Google test screen: https://www.googleapis.com/youtube/v3/liveBroadcasts/transition?broadcastStatus=complete&id=Earv89e6IyM&part=id
# This got "not found" when run from my code: https://www.googleapis.com/youtube/v3/liveBroadcasts/transition?broadcastStatus=complete&id=Earv89e6IyM&part=id&access_token=xxxxxxxxx
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.
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: