[packman] AC3 encoder broken - simply noise

Carl Eugen Hoyos cehoyos at ag.or.at
Sun Apr 17 21:12:55 CEST 2011

Carl Eugen Hoyos <cehoyos at ...> writes:

> In the past, there was one AC3 encoder in FFmpeg. It expected int16, and had
> the name "ac3". Now there are two encoders: One with the name "ac3" expecting
> floats, and one that's called "ac3_fixed" (the same one as the older one, just
> with another name) that expects int16. If the (new) "ac3" encoder is fed with
> ints, it will produce noise.

This should have significantly improved now:
The "ac3" encoder now accepts both int and float, AVCodecContext->sample_fmt has
to be set to the correct format (AV_SAMPLE_FMT_S16 or AV_SAMPLE_FMT_FLT).

(For compatibility, there still exists the "ac3_fixed" encoder.)

> There might be a bug in FFmpeg that it does not refuse to encode if the
> application did not explicitly announce to provide float data, but I can't
> confirm this since I don't know much about the encoding interface.

If this was ever correct, I suspect it is still a problem (a common bug in
applications - not setting sample_fmt - was invisible due to a bug in FFmpeg).

Carl Eugen

More information about the Packman mailing list