Skip to content

If the stream is unstable, then it waits too long to bounce, forcing a new stream to be created. #89

Description

@tfabris

I observed a behavior several times on 2024-04-01 where:

  • The stream was somehow interrupted. Don't know why, there was no detected network issue, perhaps it was an error on YouTube's side, one of my API calls indeed said "internal error" so maybe everything was fine on my end and it was YouTube that was on crack that day.
  • The stream status, as reported by the YouTube API, was repeatedly healthStatus: noData, streamStatus: inactive.
  • I think maybe the code was in a hysteresis loop and giving the stream a chance to come back up on its own without bouncing it.
  • However in the new YouTube world since their changes, you can't give it time to come back up on its own. If you wait too long without bouncing the stream, then YouTube will auto-end your video stream.
  • When it ends the video stream, you cannot revive it (as described in issue Rewrite code to work around YouTube deprecating persistent/default stream. #69) and you have to create a new one from scratch. The stream status, if you wait too long, goes to recordingStatus: recorded and lifeCycleStatus: complete.
  • My code detects the lifeCycleStatus: complete situation. In that state, it correctly creates a new stream. However, I think that if I had simply bounced the stream sooner, before it got into that state, then maybe I wouldn't have needed to create a new stream.

Relevant log entries:

Error 2024-04-01 13:36:53 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 13:36:53 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 13:37:09 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 13:37:09 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 13:37:26 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 13:37:26 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 13:37:42 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 13:37:42 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 13:37:42 CrowCam Controller - The lifeCycleStatus is not good. Value retrieved was: complete.
Error 2024-04-01 13:37:42 CrowCam Controller - The recordingStatus is not good. Value retrieved was: recorded.
Error 2024-04-01 13:37:42 CrowCam Controller - The lifeCycleStatus and recordingStatus indicate that it's time to create a new livestream from scratch. Creating a new livestream now.
Info  2024-04-01 13:37:43 CrowCam Controller - Creating new YouTube Live Broadcast.
Info  2024-04-01 13:37:58 CrowCam Controller - New video is live. Video ID: j-KJTEKXjmI Status: active Key: xxxxxxxxxxxxxxxxx.
Info  2024-04-01 13:38:04 CrowCam Controller - Live stream came back up.
Error 2024-04-01 14:10:48 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 14:10:48 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 14:11:04 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 14:11:04 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 14:11:20 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 14:11:20 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 14:11:37 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 14:11:37 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 14:11:37 CrowCam Controller - Bouncing the YouTube stream for 4 seconds, because the stream was unexpectedly down during the quick test in the main code after having run the Test_Network function.
Error 2024-04-01 14:17:25 CrowCam Controller - The lifeCycleStatus is not good. Value retrieved was: complete.
Error 2024-04-01 14:17:25 CrowCam Controller - The recordingStatus is not good. Value retrieved was: recorded.
Error 2024-04-01 14:17:25 CrowCam Controller - The lifeCycleStatus and recordingStatus indicate that it's time to create a new livestream from scratch. Creating a new livestream now.
Info  2024-04-01 14:17:26 CrowCam Controller - Creating new YouTube Live Broadcast.
Info  2024-04-01 14:17:44 CrowCam Controller - New video is live. Video ID: IcqrG9obnYE Status: active Key: xxxxxxxxxxxy.
Info  2024-04-01 14:17:52 CrowCam Controller - Live stream came back up.
Error 2024-04-01 14:28:09 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 14:28:09 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 14:28:09 CrowCam Controller - The lifeCycleStatus is not good. Value retrieved was: complete.
Error 2024-04-01 14:28:09 CrowCam Controller - The recordingStatus is not good. Value retrieved was: recorded.
Error 2024-04-01 14:28:09 CrowCam Controller - The lifeCycleStatus and recordingStatus indicate that it's time to create a new livestream from scratch. Creating a new livestream now.
Info  2024-04-01 14:28:11 CrowCam Controller - Creating new YouTube Live Broadcast.
Info  2024-04-01 14:28:26 CrowCam Controller - New video is live. Video ID: g1aOS4opMvw Status: active Key: xxxxxxxxxxxxxxxxx.
Info  2024-04-01 14:28:32 CrowCam Controller - Live stream came back up.
Error 2024-04-01 14:33:39 CrowCam Controller - The streamStatus is not active. Value retrieved was: inactive.
Error 2024-04-01 14:33:39 CrowCam Controller - The healthStatus is not good. Value retrieved was: noData.
Error 2024-04-01 14:33:39 CrowCam Controller - The lifeCycleStatus is not good. Value retrieved was: complete.
Error 2024-04-01 14:33:39 CrowCam Controller - The recordingStatus is not good. Value retrieved was: recorded.
Error 2024-04-01 14:33:39 CrowCam Controller - The lifeCycleStatus and recordingStatus indicate that it's time to create a new livestream from scratch. Creating a new livestream now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions