You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playerend
changed the title
Qualities need to be arranged well according to every quality
Qualities in the “Format selection” window needs to be arranged well, each one under its own quality
Feb 4, 2024
I've also found the "messed-up" order of formats in the "format selection" window confusing for a long time, and wished it was more intuitive.
However today, by investing a lengthy afternoon studying https://github.com/yt-dlp/yt-dlp for the Xth time, I've gained a little deeper understanding of the intricacies of yt-dlp's format sorting, and what Seal's mysterious "Legacy" or "Quality" presets might imply.
The most crucial insight for me was the semantics of default values. For a simple example, consider e. g. the res key (meaning "video resolution, smaller side") and a video link with five available resolutions: 1080, 720, 480, 360, 240.
If the sort key is just res, then resolutions are ordered from highest to lowest, i. e. 1080, 720, 480, 360, 240.
If the sort key is res:640 instead, then resolutions are ordered as follows: 480, 360, 240, 720, 1080. IOW, those resolutions (1080, 720) that exceed the default value (640) are dropped and then appended to the remainder (480, 360, 240) in reverse order (720, 1080).
This seems complicated and counterintuitive for visual presentation and manual selection, but makes sense with auto selection or auto suggestion. It makes sure that "the highest resolution, but no greater than 640", is chosen, unless there is no such resolution, in which case "the smallest available resolution greater than 640" is chosen.
If you don't rely on auto selection or auto suggestion anyway but want to choose your preferred format from all available formats manually, you can get a plain, monotonously ordered formats listing by these steps:
in the preconfigure popup, tap "Format sorting"
in the little popup, press "Import"
in the text line, delete all default values (i. e. values behind any colon or tilde) up to just before the following comma
make sure the "Use format sorting" slider is enabled, then press "Save".
Step 3. example:
original line: vcodec:vp9.2,res:360,acodec:opus,abr~64
tweaked line, for monotonous sorting: vcodec,res,acodec,abr
Of course, you can also rearrange sort keys, delete some or add more, to your likings. The first key (e. g. vcodec) dominates the order, and the following keys (e. g. res,acodec,...) are subordinate, breaking ties etc. To reverse sort order of a particular key, precede it with +, e. g. vcodec,+res,acodec,abr lists entries mainly by video codec sorted from high to low, and within each video codec, by resolution sorted from low to high.
Checklist
Is your feature request related to a problem? Please describe.
No response
Describe the solution you'd like
Qualities in the “Format selection” window are randomly arranged and needs to be arranged well, each one under its own quality
Video link
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: