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

youtube-dl is downloading incorrect audio/mp4 files #6251

Closed
saundershayes opened this issue Jul 16, 2015 · 4 comments
Closed

youtube-dl is downloading incorrect audio/mp4 files #6251

saundershayes opened this issue Jul 16, 2015 · 4 comments

Comments

@saundershayes
Copy link

@saundershayes saundershayes commented Jul 16, 2015

Recently youtube-dl has been downloading audio/mp4 files with a file size different from the file size specified in the MPEG-DASH MPD. For example, if I get the MPEG-DASH MPD using youtube-dl

curl $(youtube-dl https://www.youtube.com/watch?v=x9vmoQ5WABU --youtube-include-dash-manifest --dump-intermediate-pages -s | grep manifest.google | cut -d ' ' -f 5)

you can see that the content length of the audio/mp4 files is supposed to be 3702900 and 7431829 bytes, but instead youtube-dl gives audo/mp4 files that are 3740463 and 7469392 bytes. When the youtube client javascript makes requests for the audio/mp4 files, it expects the files to be the ones specified in the MPD with the above command, so it would seem that youtube-dl is downloading incorrect/modified audio/mp4 files.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 17, 2015

Metadata served by DASH manifest is incorrect.

@dstftw dstftw closed this Jul 17, 2015
@saundershayes
Copy link
Author

@saundershayes saundershayes commented Jul 17, 2015

If the metadata is incorrect then are you also saying that audio file requests from youtube.com specify an incorrect content length in their request parameters? The file size returned by youtube-dl matches the content length in the manifest for every other audio/video format. Why do you think the metadata from the DASH manifest is incorrect?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jul 17, 2015

Sorry, I've misread your post (it's the bitrate that is usually incorrect). Filesize shift is due to youtube-dl fixup policy to fix known issues with media files (you may notice [ffmpeg] Correcting container in is output). In particular this happens for m4a_dash container. You can pass --fixup never to disable this completely. Then you'll get files of the same size as in manifest.

@saundershayes
Copy link
Author

@saundershayes saundershayes commented Jul 17, 2015

Great thanks! That did the trick. Appreciate the help.

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.