This FFmpeg command combines a video stream from a `.mkv`...
This FFmpeg command combines a video stream from a .mkv
file (INPUT0.mkv
) and an audio stream from a .aac
file (INPUT1.aac
) into a new .mp4
file (OUTPUT.mp4
) without re-encoding the streams. Here's a detailed explanation:
-
-i INPUT0.mkv
: Specifies the input fileINPUT0.mkv
, which contains at least one video stream (and possibly other streams). -
-i INPUT1.aac
: Specifies the second input fileINPUT1.aac
, which contains at least one audio stream. -
-map 0:0
: Selects the first stream (index0
) from the first input file (INPUT0.mkv
). This is usually the video stream. -
-map 1:0
: Selects the first stream (index0
) from the second input file (INPUT1.aac
). This is the audio stream. -
-c copy
: Specifies that both the video and audio streams should be copied directly into the output file without any re-encoding. This ensures fast processing and no quality loss. -
OUTPUT.mp4
: Specifies the name of the output file, in this caseOUTPUT.mp4
, which has a container format that supports both the selected video and audio streams.
Summary of what the code does:
- It takes the video stream from
INPUT0.mkv
and the audio stream fromINPUT1.aac
. - It combines these two streams into an
OUTPUT.mp4
file without modifying (re-encoding) the actual content of the streams.