Changes between Version 2 and Version 3 of Option '-sameq' does NOT mean 'same quality'


Ignore:
Timestamp:
May 6, 2013, 3:15:59 AM (3 years ago)
Author:
llogan
Comment:

add link to related, external resource

Legend:

Unmodified
Added
Removed
Modified
  • Option '-sameq' does NOT mean 'same quality'

    v2 v3  
    22''' 
    33 
    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. 
     4The 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. 
    55 
    66This 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". 
    77 
    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. 
     8Shortly, 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. 
    99 
    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. 
     10What 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. 
    1111 
    12 So, once more, '''"-sameq" option does NOT mean "same quality"''' and it is not an universal option that will automagically make all your input videos to keep their quality, no matter what you do with them. 
     12So, 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. 
     13 
     14== Also see: == 
     15* [http://superuser.com/a/478550/110524 sameq does not mean "same quality"]