Track selectors
Track selectors allow you to specify which tracks inside a stream you want to address. A track selector is always specific to a given track type (audio, video, or subtitle).
Unless otherwise noted, a track selector will not select a track that is incompatible with the currently active protocol or container format.
If no track selector is used for any track type, the default for non-live streams is to pick the first compatible track of that type. For live streams, the last compatible track of that type is selected instead. This default behaviour is skipped if any non-empty track selector is applied to that track type whatsoever.
Track selectors consist of a string value which may be any of the following:
-
selector,selector
: Selects the union of the given selectors. Any number of comma-separated selector combinations may be used, they are evaluated one by one from left to right. -
selector,!selector
: Selects the difference of the given selectors. Specifically, all tracks part of the first selector that are not part of the second selector. Any number of comma-separated selector combinations may be used, they are evaluated one by one from left to right. -
selector,|selector
: Selects the intersection of the given selectors. Any number of comma-separated selector combinations may be used, they are evaluated one by one from left to right. -
none
or-1
: Selects no tracks of this type. -
all
or*
: Selects all tracks of this type. -
Any positive integer: Select this specific track ID. Does not apply if the given track ID does not exist or is of the wrong type. Does apply if the given track ID is incompatible with the currently active protocol or container format.
-
ISO 639-1/639-3 language code: Select all tracks marked as the given language. Case insensitive.
-
Codec string (e.g.
h264
): Select all tracks of the given codec. Case insensitive. -
highbps
,maxbps
orbestbps
: Select the track of this type with the highest bit rate. -
lowbps
,minbps
orworstbps
: Select the track of this type with the lowest bit rate. -
Xbps
orXkbps
orXmbps
: Select the single of this type which has a bit rate closest to the given number X. This number is in bits, not bytes. -
>Xbps
or>Xkbps
or>Xmbps
: Select all tracks of this type which have a bit rate greater than the given number X. This number is in bits, not bytes. -
<Xbps
or<Xkbps
or<Xmbps
: Select all tracks of this type which have a bit rate less than the given number X. This number is in bits, not bytes. -
max<Xbps
ormax<Xkbps
ormax<Xmbps
: Select the one track of this type which has the highest bit rate less than the given number X. This number is in bits, not bytes. -
highres
,maxres
orbestres
: Select the track of this type with the highest pixel surface area. Only applied when the track type is video. -
lowres
,minres
orworstres
: Select the track of this type with the lowest pixel surface area. Only applied when the track type is video. -
XxY
: Select all tracks of this type with the given pixel surface area in X by Y pixels. Only applied when the track type is video. -
~XxY
: Select the single track of this type closest to the given pixel surface area in X by Y pixels. Only applied when the track type is video. -
>XxY
: Select all tracks of this type with a pixel surface area greater than X by Y pixels. Only applied when the track type is video. -
<XxY
: Select all tracks of this type with a pixel surface area less than X by Y pixels. Only applied when the track type is video. -
720p
,1080p
,1440p
,2k
,4k
,5k
, or8k
: Select all tracks of this type with the given pixel surface area. Only applied when the track type is video. -
surround
,mono
,stereo
,Xch
: Select all tracks of this type with the given channel count. The 'Xch' variant can use any positive integer for 'X'. Only applied when the track type is audio.
For resolution-based track selectors, note that surface area is used, not exact resolution. This means portrait/landscape cannot be distinguished from each other.