Mapping Syntax
Use explicit maps only when automatic track selection is insufficient. Input and track indexes are zero-based; MPEG-TS PID selectors use decimal values.
Video and Audio Maps
- Video:
[INPUT:]v[:INDEX|best|HEIGHTp|WIDTHxHEIGHT][:CODEC][@FPS][FLAG][>FALLBACK] - Audio:
[INPUT:]a[:INDEX|best][:CODEC][FLAG][>FALLBACK]
| Selector | Result |
|---|---|
v / a | All video or audio tracks |
v:0 / a:0 | First track of that type |
1:v:0 / 1:a:0 | First matching track from input 1 |
v:best / a:best | Highest-quality matching track |
p:100:v:0 / p:100:a:0 | First matching track in program 100 |
i:256 / #256 | PID 256, restricted by the Video or Audio Map field |
Video filters:
| Selector | Result |
|---|---|
v:1080p | Highest-bitrate video with height 1080 |
v:1920x1080 | Highest-bitrate video with exact dimensions |
v:1080p@25 | 1080-height video at 25 fps |
v:h264 | H.264 video; also supports hevc, vp8, vp9, and av1 |
v:1920x1080:h264@25 | Exact size, codec, and frame rate |
Audio codec selectors are aac, eac3, ac3, mp3, and mp2, for example a:0:aac.
Fallback and Multiple Matches
| Syntax | Result |
|---|---|
v:720p>v:1080p>v:0 | First selector that matches |
a:0>a:1 | Use track 1 only when track 0 does not match |
v:0,v:1 / a:0,a:1 | Multiple independent tracks |
a:0? | No match is allowed |
v:1080p+ | Every matching 1080p track |
v:1080p* | Optional plus all matches |
Compatibility forms include bare 0, v:, a:, :v:0, and :a:0. In matching fields, p:100 and p:100:0 abbreviate program selectors. Prefer explicit forms in new configurations.
Tip
Map Restrictions: PID Map selectors such as i:256 accept decimal only. Multiple selected video tracks are valid only when every Video Encoder uses Copy. For yt-dlp sources, use one Video Map and one Audio Map selector rather than comma-separated lists.
Subtitle Map
Use [INPUT:]s[:INDEX|best][:CODEC][FLAG][>FALLBACK].
| Selector | Result |
|---|---|
s / s:0 / 1:s:0 | All subtitles, first subtitle, or first from input 1 |
s:best | Highest-quality matching subtitle |
s:dvb_subtitle / s:dvb_teletext | DVB bitmap subtitle or teletext |
s:webvtt / s:ttml / s:text | Named text subtitle codec |
p:100:s:0 | First subtitle in program 100 |
i:258 / #258 | Decimal MPEG-TS PID 258 |
s:0>s:1 / s:0,s:1 / s:0? | Fallback, multiple tracks, or optional match |
Add -cc as a separate comma item, for example s:0?,-cc, to remove supported H.264/H.265 closed-caption SEI units. It does not select a subtitle track.
PID Map
PID Map uses comma-separated OUTPUT_STREAM_INDEX:PID pairs. The index is zero-based decimal; PID may be decimal or hexadecimal and must be 0–8191.
0:0x101,1:0x102Each output index may appear once. Avoid reserved or conflicting PIDs and verify PAT/PMT with an MPEG-TS analyzer.
Metadata
Metadata uses comma-separated SCOPE:key=value entries. Scopes are g for global, s for stream, p for zero-based program, and c for zero-based chapter.
g:title=Channel,s:a:0:language=eng,p:0:service_name=News,c:1:title=IntroductionStream scope accepts an output index, media type, or TYPE:INDEX. It does not accept map-only fallback, codec, resolution, best, ?, +, or * syntax. Values may contain = but not commas. A later duplicate scope and key replaces the earlier value.
Verify a Map
- Probe the source and identify its input, program, track, or PID.
- Start with
v:0,a:0, ors:0. - Add only the required constraint or fallback.
- Save and confirm the selected tracks in the generated process log.