What is the difference between using -vcodec copy and -sameq with FFmpeg?

Do they do the same thing?


-sameq does not force you to use the same video codec. You can, for instance, convert H.264 to DivX while using -sameq.

  • If a video codec isn't specified then what's the difference? – tony_sid Dec 30 '10 at 21:35
  • 2
    If a video codec isn't specified, I think ffmpeg has default audio/video codecs for a given container. My ffmpeg on OS X defaults to mpeg4 yuv420p for video for MP4 and AVI, with libfaac and mp2 audio codecs, respectively. That is, if I chose an H.264 file and chose -vcodec copy, it selects libx264 for video. If instead I chose -sameq, it selects generic mpeg4. – fideli Dec 31 '10 at 2:48
  • Which is better to use if a video codec isn't specified? – tony_sid Dec 31 '10 at 19:38
  • Jedi, I don't understand your question above. Select the codec you want, in this case one your player supports. – CarlF Jan 1 '11 at 1:24
  • @OSXNINJA -vcodec copy specifies a codec. – quantum Jul 21 '12 at 15:07

The accepted answer is incorrect—or at least doesn't really explain what the options actually do.

  • -c:v copy tells FFmpeg to copy the bitstream of the video to the output. For example, your AVI video has an XviD video bitstream, and you can copy it to an MP4 container, without re-encoding the video. This, in essence, gives you the same quality, as nothing will be changed in the video bitstream.

    Here's an example that changes the container from AVI to MP4, if the video bitstream is valid for MP4 as well:

    ffmpeg -i input.avi -c:v copy output.mp4

    Again: FFmpeg will copy anything that it finds. There's no re-encoding happening here. Basically, FFmpeg just reads and writes the container and doesn't change the codecs.

  • sameq tells FFmpeg to use the same quantization parameters when converting video with the same codec that was used for the input. The option does not mean same quality. See: What is the “sameq” option in FFmpeg?

    The sameq option was removed from FFmpeg quite some time ago, so it cannot be used anymore, and if you have a version of ffmpeg that still has it, it's time to upgrade!

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.