Convert s16p to s16 Audio Format Using FFmpeg

This article provides a quick and direct guide on how to convert audio sample formats from signed 16-bit planar (s16p) to signed 16-bit packed (s16) using FFmpeg. You will find the exact command-line syntax required for this conversion, an explanation of the parameters, and how to verify that your output file is in the correct format.

The FFmpeg Command

To convert an audio file from the s16p (planar) sample format to the s16 (interleaved/packed) sample format, use the -sample_fmt option in FFmpeg.

Run the following command in your terminal:

ffmpeg -i input.wav -sample_fmt s16 output.wav

How It Works

Alternative: Converting to PCM 16-bit (LE)

If you are outputting to a raw PCM WAV file, you can also achieve the s16 format by explicitly choosing the 16-bit little-endian encoder:

ffmpeg -i input.wav -c:a pcm_s16le output.wav

Because the pcm_s16le codec natively uses the packed s16 sample format, this automatically changes the layout from planar to packed.

Understanding s16p vs. s16

Verifying the Output Format

To confirm that the conversion was successful, use ffprobe to inspect the audio metadata of your new file:

ffprobe -v error -show_entries stream=sample_fmt -of default=noprint_wrappers=1 output.wav

The terminal should output sample_fmt=s16, confirming that the format has been changed from planar to packed.