New commandline option --prefer-video-codecs which accepts a comma-separated list of the form avc1,hev1,vvc1. Each codec is specified in FourCC format. For a multi-codec manifest (one which offers multiple Representation streams with the same resolution and different video encoding formats), this option allows you to choose which Representation to download. You can see the video codecs which are available for a manifest by using the --simulate commandline option. If full family.subfamily codec names of the form avc1.64001E are specified, you can use only the family part of the name.
New commandline option --want-video-id which accepts a single argument which is interpreted as a substring. When multiple video streams are offered in a manifest, this allows you to specify which video Representation to download by referring to its id. The provided substring is used as a filter on available video Representations: if the full id is provided this selects the specified Representation, and if only a substring of the id is specified, this preference will be combined with other preferences such as the quality level and codec preference to select a single preferred video stream. Use the --simulate commandline option to see the ids available in a manifest.
This release improves the way in which video stream selection is implemented, to allow selection based on both video width/height and codec and quality, in situations where multiple Representations are available with the same resolution but different codecs or quality settings. If there are multiple Representations with the same “score” with respect to a user-specified parameter (for example, several Representations with the same video resolution but with different codecs), all identical score Representations will now be passed on to the next filtering stage, whereas previously only one Representation (the first listed in the manifest) would be selected. Filtering of video Representations takes place in the following order:
- @id substring
- video width
- video height
- video codec
- quality/bandwidth (defaulting to the lowest quality and file size)
Migrate from the unmaintained number_prefix crate to the unit-prefix crate.