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.
youtube-dl is downloading altered video/mp4 files #7737
Comments
|
If you subtract two boundary values you'll get the difference you have. |
|
But YouTube still expects the files to include those gaps, meaning that youtube-dl is not downloading the same files stored on the YouTube server. This bug will affect byte range requests (the offsets into the file) and file requests (which need accurate file sizes) creating issues for users that need the actual YouTube files. Are there any options I can use to download the actual YouTube files even with the bytes that are not included in the mpd segment list? |
|
It is incorrect not to download the byte range from 709-2744. Youtube-dl is not downloading those bytes leading to altered files as I mentioned above! That's a huge issue for those of us that rely on accurate downloads from youtube-dl. |
|
Note that, at least currently, the file has the correct size:
If Youtube doesn't list that range I don't think we should download it (it could be unavailable), if they listed it we would definitely download it. |
|
Yes that is lucky! The YouTube MPD is now different from the last time I checked! When the MPD is in this format as it is now: "BaseURL yt:contentLength="32298722"BaseURL youtube-dl handles the download correctly. However, when the segment list is given explicitly, as was happening before, youtube-dl was missing the indexRange="709-2744". With this new MPD, you can see that youtube-dl was missing important bytes from the YouTube video files and handling the earlier MPD format incorrectly by omitting the index. It seems that the YouTube MPDs are not always complete in terms of information given. If there is a gap in the YouTube MPD segment list, the file should still be downloaded with the correct file size and byte range offsets! |
#6251 seems to be an issue again.
When I run youtube-dl with --fixup never I still get files with the incorrect size. For example, I run:
youtube-dl --fixup never -f 134 -o video.mp4 https://www.youtube.com/embed/dTDYoJZyXuc
stat video.mp4
I see that the file size is 40827280, but the file size should be 40829316 according to YouTube video web requests and the YouTube manifest.
What can I do to get the unaltered video files from YouTube?