Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupt youtube live streams if saved immedaitely after stream ends #25570

Closed
conorhub opened this issue Jun 7, 2020 · 1 comment
Closed

Corrupt youtube live streams if saved immedaitely after stream ends #25570

conorhub opened this issue Jun 7, 2020 · 1 comment

Comments

@conorhub
Copy link

@conorhub conorhub commented Jun 7, 2020

Checklist

  • [X ] I'm asking a question
  • [ X] I've looked through the README and FAQ for similar questions
  • [X ] I've searched the bugtracker for similar questions including closed ones

Question

WRITE QUESTION HERE

I've run into this scenario a few times lately where I want to save a YouTube stream that has just finished broadcasting. For example, I will try the following in terminal, which works for a regular, non-live stream by saving a local version of the YouTube video (this is just an example url):

youtube-dl https://youtu.be/CPYjM30DfCk

If I try the same on a YouTube stream that's just ended it initially appears to work fine. I'm afraid I've not saved the terminal output from the last attempt to illustrate, apologies, and I cannot recreate the same example without having a stream that has just ended in the last few minutes. While not as useful, I can describe the result as it's predictable each time:

  • The video, played in VLC or MPV will display a length that's incorrect. All the videos I've tried have been approximately an hour long and they will show 10 seconds or similar.
  • When I press play, they'll play the first 5 seconds or so as normal, the playhead will stop for a while (as if it's thinking) and then judder through the hour in about 3 or 4 seconds.
  • Neither player complains it is unable to play the video or that it's corrupt but VLCs error log displays 'picture is too late to be displayed' multiple times.
  • The video saved always appears to have a filesize that's about 3/4 of the filesize it would be if it saved correctly. e.g. the one hour broadcasts vary from 1 - 1.2gb lately but these problematic files are about 800 - 900mb.

This happens each time I try and save a live stream after it's finished. If I try and save it while it's broadcasting it saves it in parallel, live, and I can't seem to save it from the beginning.

The interesting thing is that if I wait an hour or so, after finishing, the live video will now save fine. I'm assuming that YouTube perhaps re-renders/saves the live video to a different format in the hour and that's why it saves fine if I leave it long enough?

What I'm wondering is there any way of repairing/rescuing the videos that save? The URL for one is no longer accessible and I have a 900mb video that is exhibiting the problems I stated above. I'm not sure if it's a case of missing headers but I would hope that the filesize being this large would suggest the majority is salvageable?

@conorhub conorhub added the question label Jun 7, 2020
@dstftw dstftw closed this Jun 7, 2020
@dstftw dstftw added the duplicate label Jun 7, 2020
@conorhub
Copy link
Author

@conorhub conorhub commented Jun 7, 2020

I see you've labled this a duplicate. I can appreciate if it's your project that you may be exhausted from seeing the same questions asked. I still cannot find this issue when I search for it, as I coudn't before I originally asked. I can only find questions about how to save an ongoing live stream on youtube.

This may just be a lack of ability or skill on my part. I may be abysmal at finding things. However, this does not negate that linking to the duplicate would be much appreciated by me and others coming across this in the future, if this question has been asked already, as you hae demonstrated that you know this has been asked previously and are in the best position to show where. Many thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.