How to indicate that all streams from input should be copied to output?
The -map option can do this with the -map 0 shortcut.
For instance:
ffmpeg -i input.mkv -c copy -map 0:0 -map 0:2 output.mkv
to copy the stream 0: 0 and 0: 2 to output.mkv.
ffmpeg -i input.mkv -c copy -map 0 output.mkv
to copy all input streams from input 0 ( input.mkv ) to output (even if there are several streams of video, audio or subtitles).
The value -map corresponds to the input number ( 0 is the first input, 1 is the second input, etc.): if you add an additional input (-> input 1), and also want to copy the entire contents, then you will need to add -map 1 .
You can use ffprobe to analyze files and see which stream is displayed where. Try -fflags +genpts if you get an unknown timestamp error. For a detailed guide, see the WFFFppeg page in the -map option .
slhck source share