5

Earlier I wrote so:

ffmpeg -i input.mp4 -sameq output.mp3

...and thus receive audio from video file. Ffmpeg just taken out or converted audio to mp3 with an appropriate quality. All thanks to key: -sameq [use same quantizer as source]

Now in Ubuntu instead of ffmpeg we have libav and there (in man for avcomv) I see no -sameq key. Well, here is a question: what I have to do now?..

What I have to do now to get converted audio file with the same quality as in original?

PS. -sameq : Use same quantizer as source (implies VBR).

$ man ffmpeg | col -b > ./man_ffmpeg

this man_ffmpeg is there: http://pastebin.com/qYxz1M1E

FFMPEG(1)
NAME
   ffmpeg - ffmpeg video converter
SYNOPSIS
   ffmpeg [[infile options][-i infile]]... {[outfile options] outfile}...
...
...
...
-sameq
   Use same quantizer as source (implies VBR).
...
...
...
SEE ALSO
   avplay(1), avprobe(1), avserver(1) and the Libav HTML documentation
AUTHORS
   The Libav developers
2014-02-06
FFMPEG(1)
xiaose
  • 576
  • 1
  • 4
  • 18
  • 2
    See [What is the `-sameq` or `-same_quant` option in FFmpeg? Does it mean “same quality”](http://superuser.com/q/478549/110524)? – llogan Oct 14 '14 at 00:45
  • You can't achieve "same quality" when using a lossy encoder, but you can give it enough bitrate that it sounds the same. For MP3 use `-b:a` or `-q:a` as shown in [FFmpeg MP3 Encoding Guide](https://trac.ffmpeg.org/wiki/Encode/MP3) (may not apply to `avconv`). – llogan Oct 14 '14 at 00:48
  • The -sameq key is in man ffmpeg @LordNeckbeard you can look at this stuff there: http://pastebin.com/qYxz1M1E and I need some realization of that "same quantizer as source" but in avconv – xiaose Oct 14 '14 at 08:53

1 Answers1

3

You are correct, -sameq option has been deprecated and then removed from avconv, there were many reasons for it. Not the least of it being that there are different quantizers and it makes little sense talking about same quantizer parameters when reencoding between different codecs.

Majority of people, when reencoding are looking for quality, not quantizers. So they should use -qscale n where n is between 1 and 31 representing quality from best to worst.

In a way if you have gotten used to -sameq option, you have fallen victim to a tool that should have been there at best for testing purposes. It doesn't produce anything reasonable, and can be kinned to trying to put "same metadata" into the container that doesn't support it, or doing "copy stream" into an archaic file format (leading to things like AVI with vorbis audio, that can't even be played). You can hack something together that does all these things, but it has no place in a video encoding tool.

I suggest that if you are going to be doing much stress testing of different containers and codecs, then you install ffmpeg which has more tools allowing the creation of frankensteins. If you are reencoding for the purposes of actually keeping the files that you produce or distributing them, than you can create another question explaining your situation, and what is your desired outcome.

In short "How can i create reencoding process with exactly the same quantizer?" Can only be answered with "No".

v010dya
  • 4,283
  • 5
  • 24
  • 43