Changes between Version 4 and Version 5 of Option '-sameq' does NOT mean 'same quality'

Jul 11, 2014, 7:34:50 PM (6 years ago)

point page to FAQ entry


  • Option '-sameq' does NOT mean 'same quality'

    v4 v5  
    1 '''This article is just a stub (and this line is intentionally put here so that somebody would review this article and edit it using more appropriate/correct terminology and would remove this boring line after that).
    2 '''
    4 The purpose of this article is to draw attention to the fact that many users believe that FFmpeg's option named `-sameq` actually means "same quality" (in order to keep the quality of the output video the same as the quality of the input video), which is not true.
    6 This option actually means "same quantizers" and should only be used to copy the quants from the input to the output of the same format (f.ex. mpeg2 -> mpeg2). The option name was poorly/quickly chosen, which created a mess afterwards. Even the documentation, in one moment, was stating that: "Note that this is NOT SAME QUALITY. Do not use this option unless you know you need it".
    8 Shortly, don't use the `-sameq` option if you want to "just keep the quality of the input video". What you really want is to understand that not all the video encoders have one universal way to copy the original video's quality. It's similar if you would like to unzip a text file, change the text ("just a little bit") inside a file and zip it again, expecting the file size to remain the same. That's just not how things work.
    10 What you need to do is to use an appropriate FFmpeg option, depending on your input video type, which is suitable to control the output video quality based on the desired criteria. Generally, if you want to target a specific file size, you might use 2-pass encoding. If you are using h.264 video encoder and you want to keep constant image quality throughout entire video, you most probably will end up using `-crf` option, etc. Different cases require different options to be used if you want to achieve the best results. You can check out the tutorials in this wiki to see if there are any articles describing the best practices in video encoding, that might help you with your specific case.
    12 So, once more, '''`-sameq` option does NOT mean "same quality"''' and it is not an universal option that will automatically make all your input videos to keep their quality, no matter what you do with them.
    14 <Rebuttal!> For those of us who know how to use the "same quantizer" switch, this needs to come back asap.  It helps us with several functions in our production by matching I/IDR frames to where they need to go.  However, some new functions added this year are not in our 2011 builds that have sameq in them.  Please help in bringing this back! </Rebuttal!>
    16 == Also see: ==
    17 * [ sameq does not mean "same quality"]
     1See [ FFmpeg FAQ: Why was the ffmpeg -sameq option removed? What to use instead?]