id summary reporter owner description type status priority component version resolution keywords cc blockedby blocking reproduced analyzed
4426 RIFF WAVE 24-bit WAVE_FORMAT_PCM files are not properly supported rsn10100 "**Summary of the bug:**
When converting 24-bit audio to a wav format it is down converted to 16-bit by default. You can force to output a WAVEFORMATEXTENSIBLE format with -acodec pcm_s24le but some older software does not support the extensible format.
I believe this down conversion is being done because of a rumor that the original spec did not allow for 24-bit files. I have looked through the August 1991 specification and although it never specifically mentions 24-bit it does state the following:
>Each sample is contained in an integer i. The size of i is the smallest number of bytes required to contain the specified sample size.
>
It goes on and then gives a few examples, one of which mentions a WAVE_FORMAT_PCM 20-bit format.
>Example of a PCM WAVE file with 44.1 kHz sampling rate, mono, 20 bits per sample:
>
>RIFF( 'WAVE' INFO(INAM(""O Canada""Z))
>fmt(1, 1, 44100, 132300, 3, 20)
>data( ) )
That is a WAVE_FORMAT_PCM(0x0001), 1 channel, 44.1KHz, 132300 bytes per second, 3 bytes per sample, 24-bit wave file with 20 valid bits...
This would indicate that 24-bit WAVE_FORMAT_PCM files are supported by the format and should be valid in conversions. Many applications also encode and decode this format, which is why I'm filing a bug here.
**Source:** http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/Docs/riffmci.pdf
**The expected result:** A 24-bit WAVE_FORMAT_PCM file should be created by default when the input format is 24-bit and the output format is wav.
**How to reproduce:**
{{{
% ffmpeg -f s24le -ar 44100 -ac 1 -i in.pcm out.wav
ffmpeg version N-71209-gd759844 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib}}}
" defect closed normal ffmpeg unspecified invalid wav 0 0