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.wav

Parameter Breakdown:

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.wav

Controlling 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.wav

Common 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