14
6
What is the difference between using -vcodec copy
and -sameq
with FFmpeg?
Do they do the same thing?
14
6
What is the difference between using -vcodec copy
and -sameq
with FFmpeg?
Do they do the same thing?
3
-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 – 2010-12-30T21:35:24.653
2If 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 – 2010-12-31T02:48:34.990
Which is better to use if a video codec isn't specified? – tony_sid – 2010-12-31T19:38:48.390
Jedi, I don't understand your question above. Select the codec you want, in this case one your player supports. – CarlF – 2011-01-01T01:24:20.860
@OSXNINJA -vcodec copy
specifies a codec. – quantum – 2012-07-21T15:07:23.910
24
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!
1
c:v is an abbreviated version of codec:v and vcodec is an alias of codec:v so all 3 function the same. From: https://lists.ffmpeg.org/pipermail/ffmpeg-user/2017-February/035335.html
– DeveloperDan – 2018-10-16T12:04:21.280
sameq
no longer exists https://www.ffmpeg.org/faq.html#Why-was-the-ffmpeg-_002dsameq-option-removed_003f-What-to-use-instead_003f – KallDrexx – 2016-10-03T12:56:43.353