Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Bug] Post processing audio quality option scale is wrong #25912
Comments
|
Was it opposite day when you posted this? Because this is completely untrue. ' What did you listen with, and what did you use to compare the bitrates? And are you certain that you didn't mix up your files names during your tests? Because I have tested this repeatedly in the past - as well as right now, using MediaInfo, and you are 100% incorrect with your findings. If this setting were truly backward, it would have been discovered a long long time ago. |
|
I had the same problem as @msemple1111. I wanted to get the best quality converting from opus to ogg vorbis using --audio-quality 0, and the result was a very small file with bad quality and low bitrates. Then I tried --audio-quality 9, which resulted in a bigger file with better quality / higher bitrates. So I wondered what was going on, and finally figured it out: the -q:a option of ffmpeg is format/encoder-specific: While -q:a / --audio-quality 0 leads to best quality for mp3, it leads to worst quality for vorbis, for instance. |
|
@michealespinola I too wonder why this hasn't been discovered earlier. The problem is existing ever since I use youtube-dl. |
|
@msemple1111 I think in your case it is best to use -f and the corresponding format number (which can be determined using -F, on youtube m4a should be 140) instead of --audio-format, since youtube/googlevideo also directly provide an m4a/aac option, so you can avoid the quality loss, conversion time and increased file size caused by re-encoding opus to aac. |
|
Perhaps the link which I quoted in my first post doesn't cover enough formats, might be too outdated and is unofficial, so probably it's better to look at ffmpeg's main documentation, sections "Audio Encoders" and, maybe, "External Libraries": Here is the proof for my libvorbis example (from |
|
for mp3 (libmp3lame): |
Checklist
Log
Description
Post processing audio quality scale is inversed
In the post processing options, the
--audio-qualityoption is the wrong way round. In all the docs it says--audio-quality 9is worst and--audio-quality 0is best. After listening, and then looking at the bitrates, I have confirmed the opposite is true.--audio-quality 0is in fact the worst, and--audio-quality 9is in fact the bestProposed fix
The easiest fix is to update the docs.
Or an alternate fix is to provide a
--audio-quality bestoption, which is mapped to-q:a 9in ffmpeg