Ffmpeg, avconv and sameq

I used to write like this:

ffmpeg -i input.mp4 -sameq output.mp3 

... and thus receive audio from a video file. Ffmpeg simply takes out or converts audio to mp3 with appropriate quality. Thank you all for the key: -sameq [use the same quantizer as the source]

Now in Ubuntu instead of ffmpeg we have libav and there (in man for avcomv) I do not see the -sameq switch . Well, here's the question: what should I do now? ..

What do I need to do to convert the audio file with the same quality as in the original?

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

 $ man ffmpeg | col -b > ./man_ffmpeg 

this man_ffmpeg is: 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) 
+5
source share
1 answer

You are right, the -sameq option -sameq deprecated and then removed from avconv, there were many reasons for this. Last but not least, there are different quantizers, and it makes little sense to talk about the same quantizer parameters when transcoding between different codecs.

Most people when reencoding are looking for quality, not quantifiers. Therefore, they should use -qscale n , where n is between 1 and 31, representing quality from best to worst.

In a sense, if you are used to the -sameq option, you are the victim of a tool that should have been at best for testing purposes. It does not give anything reasonable and can be rooted in an attempt to put the "same metadata" into a container that does not support it, or to "copy the stream" into an archaic file format (which leads to things like AVI with vorbis audio that don’t even can be played). You can hack something together, which does all of this, but it has no place in the video encoding tool.

I suggest that if you are going to do a lot of stress testing of different containers and codecs, then you install ffmpeg , which has more tools to create frankensteins. If you transcode in order to actually store the files you create or distribute them, you can create another question explaining your situation and what is your desired result.

In short: "How can I create a transcoding process with exactly the same quantizer?" Only "No" can be answered.

+3
source

Source: https://habr.com/ru/post/1204597/


All Articles