4 ms·
ffmpeg's default mode of operation is to decode the input and re-encode it. Unlike the default of re-encoding, "copy" is extremely fast and doesn't involve loss
by zerocrates 6y ago
ffmpeg's default mode of operation is to decode the input and re-encode it. Unlike the default of re-encoding, "copy" is extremely fast and doesn't involve loss of quality from the input because it's just, well, copying the streams from the input to the output. The downside is that you can't do lots of things when you're just copying: making any changes to the actual video or audio, or even cutting video accurately at non-keyframes requires the standard decode/re-encode steps.
Typical video-file-related reasons for using the "copy" codec would include just switching between container formats: MP4 vs. Matroska vs. AVI vs. whatever else. As long as the new container supports the types of audio and video you have, just copying them will save both time and quality. Or maybe you want to alter the video but keep the audio untouched, or vice-versa. Or you just want to add a track to something and not disturb the existing ones.
Even doing "copy" for all streams and using the same container can be useful, even though nothing would seem to change in that situation: "remuxing" like this is often all that's necessary to fix a wonky file.