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
4 stars 3 forks source link

Stream name, description, and settings occasionally get clobbered, killing the stream. #37

Closed tfabris closed 5 years ago

tfabris commented 5 years ago

This is a similar issue to bug #24 - but it's not the same data field.

On 2019-06-02, there was a problem:

This is similar to the situations which occur when the stream key gets clobbered out from under me. However it's different because the key didn't change, but the title and metadata did change. So what happened here?

To do:

tfabris commented 5 years ago

I analyzed the logs (attached). Conclusions below.

Likely root cause (TLDR):

Unrelated:

Details of what was found in the logs and video archives:

Logs attached below.

2019-06-02 and 03 - CrowCam Logs.txt

tfabris commented 5 years ago

To do:

Also:

tfabris commented 5 years ago

Done:

Conclusion:

To do:

tfabris commented 5 years ago
tfabris commented 5 years ago

Issue recurred on the morning of 2019-06-14, but this time, the Google API services weren't down. The stream got changed from "public" to "unlisted" without me doing anything to it. Luckily no other settings got changed, but that setting essentially made the stream go down.

There were no errors in the logs other than a "videoIngestionStarved" blip.

To do:

tfabris commented 5 years ago

Issue recurred on the morning of 2019-06-18, the stream got changed from "public" to "unlisted" without me doing anything to it. No other settings got changed. My current work-in-progress code successfully detected this status and reported it.

At the current time I'm still trying to figure out how to have that code automatically fix the issue. Right now the code only succeeds at creating a new "upcoming" stream with the desired settings rather than editing the settings of the current live broadcast.

tfabris commented 5 years ago

Issue recurred on the morning of 2019-07-04, the stream got changed from "public" to "unlisted" without me doing anything to it. No other settings got changed.

tfabris commented 5 years ago

I figured out what went wrong with the code which was trying to fix the privacyStatus. It was a minor syntax error in the Curl command line parameters, which caused it to be a POST instead of a PUT, thus making the API command be an "insert" rather than an "update", thus creating a new upcoming livestream rather than editing the current livestream. Now that it's fixed, I can update any value in the livestream that I want.

With that fixed, I now have a choice:

Currently I am deliberately only fixing privacyStatus, not any of the other values.

Reasoning:

The problem with having the other values in the config file is that it removes my freedom and flexibility. For instance, I would have to put the entire video description, tags, etc, into the configuration file of the script. Then each time the script had to fix a clobber, those things would all be overwritten with the config file's versions of those values. This means that I would lose my freedom to edit those things from the YouTube user interface: Any edits I make would get overwritten any time they're clobbered. Any time I feel like updating the video description, I'd have to edit the code to match and then put that code into production on the Synology.

As it stands right now, I've saved that information in a file here, so that I can remotely fix serious clobbers if I have to, like the ones that prompted issues #37 and #42. So any time I update the video description, I also update that file as well, but it's not required to update any code files. I still have freedom right now.

(Also: I haven't figured out how to update the thumbnail picture correctly yet, and it looks complicated.)

So, for right now: fix privacyStatus with code, but only fix the rest of the clobbered stuff by hand.