New submission from LRN <[email protected]>: Audacity used libavcodec with libfaac to encode aac audio for a year. However, when used with libavcodec built-in aac encoder it produced an audio aac file of correct length filled with silence.
Investigation showed that silence was a result of s->lambda being 0. Audacity used to work with libfaac and it assumed that: 1) when CODEC_FLAG_QSCALE is set, global_quality is used (and bit_rate is set to 0 and is not used) 2) when CODEC_FLAG_QSCALE is not set, bit_rate is used (and global_quality is set to QSCALE_NONE and is not used) 3) raising global_quality improves quality (and indirectly raises bitrate) All these assumptions are wrong for libavaac: 1) libavaac always uses global_quality, even if CODEC_FLAG_QSCALE is not set 2) libavaac always uses bit_rate, even if CODEC_FLAG_QSCALE is set 3) raising global_quality above 1 does not affect bit_rate much, greatly increases output file size and causes libavaac to cut high frequencies off, degrading quality; effective bitrate (as reported by ffdshow aac decoder based on libfaad) remains roughly the same 4) if global_quality is negative, libavaac will use it "as is" Because libavaac multiplies s->lambda by bit_rate and uses global_quality as a base s->lambda value: setting bit_rate to zero and global_quality to a value > 0 OR setting bit_rate to non-zero value and global_quality to a negative value results in silent file (if global_quality was non-negative, first block of file is not silent, but the rest of file is) This is not consistent with libfaac, libmp3lame and libvorbis. ---------- messages: 6559 priority: normal status: new substatus: new title: aac encoder - weird behaviour regarding global_quality topic: avcodec type: bug _____________________________________________________ FFmpeg issue tracker <[email protected]> <https://roundup.ffmpeg.org/roundup/ffmpeg/issue1290> _____________________________________________________
