Opened 3 years ago
#9544 new defect
adding empty channels while downsampling with dithering leads to noise on new channels
Reported by: | Harald Linden | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | |
Cc: | Harald Linden | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
- Starting with a mono, 24bit, 48kHz audio file.
- Adding 3 new channels leads to 3 additional, silent channels.
- Downsampling the output to 16 bit with dithering leads to 1 channel with signal and 3 silent channels.
- Doing step 2 and 3 at once needs to accumulating noise on the silent channels.
How to reproduce:
./ffmpeg --version ffmpeg version N-104730-gbdc920574d Copyright (c) 2000-2021 the FFmpeg developers built with gcc 11 (Debian 11.2.0-12) ffmpeg -f lavfi -i "sine=frequency=1000:duration=1200" -c:a pcm_s24le sine_mono_24bit.wav ffmpeg -i sine_mono_24bit.wav -ac 4 sine_4c_24bit.wav ffmpeg -i sine_4c_24bit.wav -af aresample=osf=s16:dither_method=rectangular ./sine_4c_16bit_dither_noremap.wav ffmpeg -i sine_mono_24bit.wav -af aresample=osf=s16:dither_method=rectangular -ac 4 ./sine_4c_16bit_dither_remap.wav
sine_4c_16bit_dither_noremap.wav will have one channel with signal and three silent ones.
sine_4c_16bit_dither_remap.wav should be the same, but will have accumulating noise on the silent channels.
I discovered this while reencoding a combined 24-bit/5.1/2.0 source to 16-bit/5.1/5.1. The result had accumulating noise on the second audio stream.
Note:
See TracTickets
for help on using tickets.