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 format selection `vcodec=vp9` falsely selects HDR `vp9.2` #20882
Comments
|
Invalid syntax: each selector must be in separate brackets, not single brackets separated by |
Checklist
Verbose log
Description
When trying to download videos from Youtube, I prefer using the
vp9video codec due to its size. However, HDR videos (vp9.2codec) are of course much bigger, and are therefore unwanted. What I want is to download is thewebmformat (but not HDR), andmp4format ifwebmis not available.To achieve this, I want to use the format selection (for 2160p)
"(bestvideo[vcodec=vp9,height<=2160]/bestvideo[vcodec!=vp9.2,height<=2160])+(bestaudio[acodec=opus]/bestaudio)/best[height<=2160]". But as can be seen above, this downloads 337 (vp9.2), while I exprected 313 (vp9). It looks like thevcodec=keyword does a simple 'contains', instead of an exact match, resulting in the wrong format being downloaded. When I remove the format selection up to the first/, the result is the same (337 being downloaded).It gets even weirder: when I change the first
2160to1080, format 137 gets downloaded, which is not the expected (incorrect) 1080p HDR, but the 1080p mp4 (which is<=1080yetavc1.640028codec. Intended behaviour would be downloading 248 in this case.What is going wrong here?