-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Sorting Video Formats #25959
Sorting Video Formats #25959
Conversation
|
@dstftw Could you please tell me why this was labelled do-not-merge? |
There is already a superior solution which is still not flexible enough. |
@dstftw As I understand, that branch provides the extractor more control over the sorting. This pull request attempts to give more control to the user instead. |
Providing more control to user is just a matter of writing CLI wrapper passing data to core sorting mechanism. |
Besides, #8125 was last updated 5yrs ago... |
5e26784
to
da2069f
Compare
8507107
to
3cf88b0
Compare
* add option --format-sort * added format-sort-force and allow to sort in reverse * Added codec_preference and audio_codec_preference * Prioritize a given value
Authored-by: George Schizas <[email protected]>
* MKV Thumbnails with FFMpeg * Now has the correct file name in MKV container * Change os.rename to shutil.move Co-authored-by: MrDoritos <[email protected]> Co-authored-by: ian <ian@nass> Co-authored-by: pukkandan
* Add --break-on-existing Authored-by: Yoav Shai <[email protected]>
* Update embedthumbnail.py Authored-by: Paul Dubois <[email protected]>
Authored-by: h-h-h-h
Added: --no-include-ads, --no-write-sub, --no-write-auto-sub, --no-playlist-reverse, --no-restrict-filenames, --youtube-include-dash-manifest, --no-format-sort
And remove "_preference" from the field names
Sorry, I didn't mean to close this. I accidentally merged this branch with another. That is why this request shows a ton of irrelevant commits. Then I deleted the branch as I was trying to fix it. That caused the pull to be closed. I have force pushed the branch with only the correct commits. Sorry for the mess :( |
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
Added a new switch --format-sort which can be used to specify how the video formats will be sorted. It accepts a comma separated list of the fields that should be used for the sorting (e.g. "height,width,fps,filesize,tbr").
It accepts all the same options as the field_preference argument of _sort_formats() that can be used from the extractor (language_preference, quality, height, width, fps, filesize, filesize_approx, tbr, vbr, abr, format_id, proto_preference, ext_preference, audio_ext_preference, source_preference). The user-specified fields takes higher priority that those defined in the extractor which inturn takes higher priority that the default order.