Convert 32-bit Float to 16-bit PCM WAV with FFmpeg
This article provides a quick, step-by-step guide on how to convert a 32-bit float audio file to a 16-bit PCM WAV format using the FFmpeg command-line tool. You will learn the exact command to perform this downsampling process, understand the parameters used, and see how to batch-convert multiple files at once.
The Basic Conversion Command
To convert a single 32-bit float WAV file to a 16-bit signed PCM WAV file, run the following FFmpeg command in your terminal or command prompt:
ffmpeg -i input_32bit.wav -c:a pcm_s16le output_16bit.wavParameter Breakdown:
-i input_32bit.wav: Specifies the path to your source 32-bit float audio file.-c:a pcm_s16le: Sets the audio codec (-c:a) topcm_s16le. This stands for Pulse Code Modulation, Signed 16-bit, Little-Endian, which is the industry standard for CD-quality WAV files.output_16bit.wav: The name and path of the newly created 16-bit audio file.
Advanced Options
Changing the Sample Rate
If you also need to change the sample rate (for example, converting
from 96kHz or 48kHz to 44.1kHz), add the -ar flag:
ffmpeg -i input_32bit.wav -c:a pcm_s16le -ar 44100 output_16bit_44k.wavControlling Dithering
When downsampling from 32-bit float to 16-bit, FFmpeg automatically
applies dithering to prevent quantization distortion. If you want to
explicitly choose a dither method, you can use the
-dither_method flag:
ffmpeg -i input_32bit.wav -c:a pcm_s16le -dither_method triangular output_16bit.wavCommon dither methods include triangular,
shibata, or none (to disable dithering).
Batch Converting Multiple Files
If you have a folder full of 32-bit float WAV files, you can automate the conversion process using a simple command line loop.
On Windows (Command Prompt):
for %i in (*.wav) do ffmpeg -i "%i" -c:a pcm_s16le "converted_%~ni.wav"On macOS and Linux (Terminal):
for file in *.wav; do
ffmpeg -i "$file" -c:a pcm_s16le "converted_${file}"
done