Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Conversion fails on certain video where videostream has missing frame #26860
Comments
|
I think it must be something with your selected formats. When just doing the exe with the URL without all the options, I get a complete file without errors. But I also getting streams 298 and 140, not 302 and 251 like yours, thus other codecs. The file in the end has the following streams: Audio |
|
The default format selection of youtube-dl does not always download the best quality available, so I took that format code which I found on this reddit post: https://www.reddit.com/r/DataHoarder/comments/c6fh4x/after_hoarding_over_50k_youtube_videos_here_is/ What you are getting is 720p H.264 HFR with 128 Kbps AAC audio while my download gets 720p VP9 HFR with VBR ~160 Kbps OPUS audio. See this table for the different format codes: https://gist.github.com/AgentOak/34d47c65b1d28829bb17c24c04a0096f That format selection has worked very reliably so far for me and others, and the different codec should in theory not produce a broken video file. |
|
Hmm but wouldn't that mean, that ffmpeg has a bug and not the downloader? Because it only downloads the corresponding files. mkvmerge doesn't have any problems joining the two temp files into a MKV file, which can be played without problems afterwards. |
|
It's not a bug in ffmpeg but normal behavior when it tries to parse a file that is considered corrupt or malformed. It doesn't really help that makemkv seems to work, since youtube-dl uses ffmpeg for that and I'm not aware that makemkv can be used natively instead. |
|
Without making any changes the download now seems to work fine for this video. Seems to be an issue on YouTube's end, but I wonder if a workaround can be added to youtube-dl for this issue. I'll report back if I find another video with the same issue.
|
Checklist
Verbose log
Description
When trying to download the video https://www.youtube.com/watch?v=YV_tHOrufkw as seen in the log above, the conversion fails after the download of the audio and video stream has completed. When running the ffmpeg command manually, the following output is generated:
The error hints that something is wrong with the frames of the video stream being processed. And indeed if you play the video stream webm in VLC media player, you can see a lost frame after approximately 320 frames in the statistics tab of the media information window. So it seems that the file fetched by youtube-dl is somehow corrupted.
I can't tell if this is an issue in youtube-dl with the fragments not being fetched correctly and stitched together or if wrong data is sent by the YouTube servers, which is why I'm raising this issue.
Hope my description is clear enough. Thanks.