[FFmpeg-devel] [PATCH 3/3] lavc/encode: pick a sane default for bits_per_raw_sample if it's not set

Anton Khirnov anton at khirnov.net
Sun Jan 23 22:01:48 EET 2022


Quoting Martijn van Beurden (2022-01-23 14:15:53)
> I think this patch shouldn't be applied. Without it 32 bit audio is
> transcoded to 24 bit audio, which is not lossless. However, with this patch
> 24 bit audio is transcoded to 32 bit audio which is lossless, but the
> resulting files are understood by few software decoder and probably no
> hardware decoders.

Do you know which decoders do not support 32bit audio and how widely
used they are? I'm not very familiar with wavpack, but 24bit and 32bit
decoding don't seem significantly different in the decoder.

> Perhaps adding a warning instead of setting a default would be better?

IMO the encoder should strive to be lossless, so it should not encode as
24bit unless it was explicitly told the input data is 24bit.
bits_per_raw_sample=0 is not a meaningful value, so the encoder should
not treat it as 24bit.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list