How to Concatenate WAV Files in FFmpeg Using Copy

Concatenating WAV audio files without re-encoding allows you to merge multiple tracks quickly while preserving 100% of the original audio quality. By leveraging FFmpeg's stream copy functionality (-c copy), the program bypasses decoding and re-encoding, stitching the audio streams directly into a single output file. This guide explains the exact command-line steps required to merge your WAV files using this method.

Prerequisites

For stream copying to work properly, all source WAV files must share identical stream parameters:

  • Same sample rate (e.g., 44.1 kHz, 48 kHz)
  • Same number of channels (e.g., mono, stereo)
  • Same bit depth (e.g., 16-bit, 24-bit PCM)

Step 1: Create a File List

The most reliable way to concatenate container formats like WAV without re-encoding is using FFmpeg's concat demuxer.

Create a text file named filelist.txt in the same directory as your audio files. List each file you want to merge in sequential order:

file 'input1.wav'
file 'input2.wav'
file 'input3.wav'

Step 2: Run the FFmpeg Command

Execute the following command in your terminal or command prompt:

ffmpeg -f concat -safe 0 -i filelist.txt -c copy output.wav

Breakdown of the Parameters:

  • -f concat: Specifies the concat demuxer format.
  • -safe 0: Allows the use of absolute file paths or relative paths with special characters.
  • -i filelist.txt: Sets the text file as the input source.
  • -c copy: Instructs FFmpeg to copy the audio stream directly without re-encoding.
  • output.wav: The final concatenated file name.

Command-Line Shortcuts (Generating the List Automatically)

You can generate the list and run FFmpeg in a single step depending on your operating system.

On Linux or macOS (Bash/Zsh):

ffmpeg -f concat -safe 0 -i <(printf "file '%s'\n" input1.wav input2.wav) -c copy output.wav

On Windows (PowerShell):

Get-ChildItem -Filter *.wav | ForEach-Object { "file '$($_.Name)'" } | Out-File -Encoding ascii filelist.txt
ffmpeg -f concat -safe 0 -i filelist.txt -c copy output.wav

Why Avoid the concat: Protocol for WAV Files

While FFmpeg includes a raw protocol (-i "concat:input1.wav|input2.wav"), it performs a binary append. Because WAV files contain RIFF header blocks, using the raw concat protocol embeds internal headers inside the audio stream, causing player errors or playback interruptions. Using the -f concat demuxer combined with -c copy ensures that the headers are properly reconstructed for a clean, valid WAV file.