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.
Some videos play using a format on Youtube that youtube-dl -F does not detect as being available #16976
Comments
In effect, you noticed a missing format on a video you have uploaded yourself just recently? |
|
You've already answered your question: for some reason Youtube does not serve webm video only formats for this particular video (except for your account). Nothing to do with youtube-dl. |
|
Yeah, I did answer my own question.. Though to be fair I typed most of my report up first, then went digging deeper just to be sure, and figured hey - may as well still submit the report. The time between me typing up the majority of it, and actually submitting it, was about 8 hours or so. Would still be nice to have a way to download the vp9 version that's there when I'm logged in, but that's a completely different thing from this (definitely invalid) bug report. |
Make sure you are using the latest version: run
youtube-dl --versionand ensure your version is 2018.07.10. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.Before submitting an issue make sure you have:
What is the purpose of your issue?
If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:
Add the
-vflag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):Description of your issue, suggested solution and other information
I uploaded a 1080p, 60fps video to Youtube, but have noticed an odd colorspace issue with it. To investigate, I figured I'd use youtube-dl to download the files that Youtube encoded and see if some metadata was incorrectly set.
However, youtube-dl is unable to detect that the format that Youtube is using is even available. Youtube's website, when I right-click the video player and click 'Stats for nerds', lists these codecs as being used:
vp9 (303) / mp4a.40.2 (140). However, the only 1080p, 60fps source available through youtube-dl is, as can be seen in the log above, AVC (H.264) with a numeric 'format code' of 299.Curious if this was merely youtube-dl not being able to see that specific format code (303), I tried it with a different Youtube video that I knew had 1080p 60fps content. Turns out that youtube-dl detected it in VP9/webm format just fine:
So I know that youtube-dl is at least sometimes detecting the presence of this format. However, I have also noticed that for this video where the detection succeeds, there is a webm audio format for DASH present as well. For the video I uploaded, only an mp4-based DASH audio source (format code 140) is present.
While typing all this up, I investigated another avenue, and fear it might render this bug report pointless (still going to submit it, in case there is something that youtube-dl should be doing but the bug wouldn't be easily detected normally).
When I use incognito mode, the Youtube website gives me only the mp4-based version of the video, which ironically does not have the colorspace metadata issue that the webm version appears to have. So it seems if I'm logged in, I see a VP9-encoded file with incorrect metadata, and when I'm logged out I see an AVC-encoded file with correct metadata.
And, it also seems I'm only given AVC/MP4 when I use Youtube from another account. Weird.
For anyone wondering about the colorspace issue, the video is being decoded using the BT. 709 YUV→RGB color matrix, when I explicitly put in the metadata of the uploaded video that it should be decoded with the BT. 470BG (Rec. 601) YUV→RGB color matrix.
The mp4 file that youtube-dl downloads includes the correct metadata, though it does erroneously say to use the 'tv' color range (when it's actually encoded with 'full' color range... And somehow web browsers detect it and ignore the metadata, playing the file correctly despite it).