What is Remuxing?
Remuxing means moving video and audio from one container format to another, for example MKV to MP4, without re-encoding them. It is fast and loses no quality.
How Remuxing works
A media file has two layers. The codec, such as H.264 or AAC, is how the picture and sound are compressed. The container, such as MP4, MKV or MOV, is the wrapper that holds those streams with their timing. Remuxing unpacks the streams and writes them into a new wrapper unchanged. Transcoding is the different, slower job of decoding and compressing the streams again.
Key facts
ffmpeg -i input.mkv -c copy output.mp4remuxes a file. The-c copypart tells FFmpeg to copy the streams instead of re-encoding them.- Remuxing fails when the new container does not support a stream. MP4, for example, cannot hold some subtitle formats that MKV can.
- Because nothing is re-encoded, the output is about the same size as the input, and a long film takes seconds or minutes rather than hours.
When Remuxing matters
Remux when a file will not play or import only because of its container, such as an MKV on a device that wants MP4. If the device cannot decode the video codec itself, remuxing will not help and you need to transcode.