FFmpeg - Selecting streams: Difference between revisions
From PiRho Knowledgebase
Jump to navigationJump to search
Created page with "The <code>-map</code> option is used to choose which streams from the input(s) should be included in the output(s). The <code>-map</code> option can also be used to exclude specific streams with negative mapping. When the <code>-map</code> option is used, only the selected streams will be included in the output.<br/> The code below selects the 1st video stream from the 1st input file and the 1st audio stream in the 2nd input file:<br/> <code>ffmpeg -i <input.mp4> -i <inp..." |
m Knowledgebaseadmin moved page FFMpeg - Selecting streams to FFmpeg - Selecting streams |
(No difference)
| |
Revision as of 11:30, 6 March 2025
The -map option is used to choose which streams from the input(s) should be included in the output(s). The -map option can also be used to exclude specific streams with negative mapping. When the -map option is used, only the selected streams will be included in the output.
The code below selects the 1st video stream from the 1st input file and the 1st audio stream in the 2nd input file:
ffmpeg -i <input.mp4> -i <input.mkv> -map 0:v:0 -map 1:a:0 <output.file>
Reference: [FFmpeg: Selecting streams with the -map option]