[go: up one dir, main page]

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

vp9.2 vcodec format sort bug fix #10884

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

rakslice
Copy link
Contributor
@rakslice rakslice commented Aug 30, 2024

Description of your pull request and other information

The actual vcodec values for vp9 are like

  • vp09.00.10.08
  • vp09.02.11.10.01.09.18.09.00

The existing situation:

FormatSorter handles vcodec as an ordered, with separate entries for vp9.2 and general vp9.

In practice vp9.2 is probably used because it has hdr support but sometimes vp9 with hdr is not supported for hardware decode when basic sdr vp9 is, for instance in nvdec with some nvidia cards (https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) so they are distinguished as different categories of vcodec value for sorting. Great.

However the regex FormatSorter uses for vp9.2 does not match the actual vcodec values seen for it -- it does not match the leading 0 of the 02 -- so it is treated as just another regular vp9.

This is separate from the utils parse_codecs() code which assigns vp9.2 a higher dynamic_range, and already parses the actual vcodec value for vp9.2 correctly.

This PR includes:

  • fix for vp9.2 codec matching in FormatSorter
  • test for sorting formats with vp9.2 vcodec falues by vcodec with limit
  • test that just non-sorting-related parsing of a real vp9.2 vcodec value in parse_codecs() works ok
Template

Before submitting a pull request make sure you have:

In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under Unlicense. Check all of the following options that apply:

  • I am the original author of this code and I am willing to release it under Unlicense
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

… with real vp9.2 vcodec format in sorting and parsing
@seproDev seproDev added the bug Bug that is not site-specific label Aug 31, 2024
@bashonly bashonly self-assigned this Sep 27, 2024
@bashonly
Copy link
Member

Thanks, esp for adding comprehensive tests

@bashonly bashonly merged commit 8f4ea14 into yt-dlp:master Sep 27, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that is not site-specific
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants