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.com] Incompatible mixing of DASH formats #20498

Closed
a-raccoon opened this issue Mar 28, 2019 · 4 comments
Closed

[Youtube.com] Incompatible mixing of DASH formats #20498

a-raccoon opened this issue Mar 28, 2019 · 4 comments

Comments

@a-raccoon
Copy link

@a-raccoon a-raccoon commented Mar 28, 2019

youtube-dl will often (typically) attempt to download the .mp4 video and the .webm audio DASH streams from YouTube, which is an inappropriate mix and creates an incompatible union that cannot be merged into a SANE format. They have to be glommed together in a makeshift .mkv container. When downloading the .mp4 video then only the .m4a audio should be downloaded along with it, so they can be merged together into a healthy .mp4 container that will play on normal devices.

youtube-dl -k https://www.youtube.com/jngpu?i=Do4FclrU5VD
[youtube] Qb4SpyeH5IQ: Downloading webpage
[youtube] Qb4SpyeH5IQ: Downloading video info webpage
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[download] Destination: Cbggref Ubhfr Cneg 1. Jr obhtug n ubneqrq ubhfr! 100 lrnef bs fghss! jung jvyy jr svaq-Do4FclrU5VD.f137.mp4
[download] 100% of 1.12GiB in 22:12
[download] Destination: Cbggref Ubhfr Cneg 1. Jr obhtug n ubneqrq ubhfr! 100 lrnef bs fghss! jung jvyy jr svaq-Do4FclrU5VD.f251.webm
[download] 100% of 45.93MiB in 00:51
[ffmpeg] Merging formats into "Cbggref Ubhfr Cneg 1. Jr obhtug n ubneqrq ubhfr! 100 lrnef bs fghss! jung jvyy jr svaq-Do4FclrU5VD.mkv"
@a-raccoon a-raccoon changed the title Incompatible mixing of DASH formats [Youtube.com] Incompatible mixing of DASH formats Mar 28, 2019
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 28, 2019

This is expected behavior. If you don't need such behavior pass proper format selection expression.

@dstftw dstftw closed this Mar 28, 2019
@a-raccoon
Copy link
Author

@a-raccoon a-raccoon commented Mar 28, 2019

Instead of saying this is expected behavior, can we say this is undesirable behavior? Why would we want youtube-dl to download two incompatible streams that cannot live together, and indeed, YouTube itself would never pair together while watching from their website.

I need a second opinion from somebody who understands that H264 (mp4) and AAC (m4v) can go together, but .H64 and Opus Audio (webm) cannot live together. Nobody sells a television set that will play a .mkv file with these two streams combined. Youtube-dl is doing it wrong, and everyone is going to have to re-download their archive materials because of it.

@Hrxn
Copy link

@Hrxn Hrxn commented Mar 29, 2019

But they are not incompatible? MKV works just fine. And what YT itself does with their JS player is something entirely different, I don't know why you would mention this.

@a-raccoon
Copy link
Author

@a-raccoon a-raccoon commented Mar 30, 2019

The point is they are dissimilar formats using dissimilar codecs that require a hack-job container (mkv) in order to cobble them together into a single file, which is incompatible for playback on the vast majority of set-top box and television hardware that would otherwise support properly paired DASH formats that are supposed to go together (h264+aac). I mentioned what YouTube does, because Google created the source material and knows their stuff -- it's an appeal to authority.

I would add that VideoLAN (vlc player) also pairs DASH formats in the proper way.

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
3 participants
You can’t perform that action at this time.