How to Convert WAV to MP3 using FFmpeg on Windows
Converting WAV audio files to MP3 format on Windows is a quick and straightforward process when using FFmpeg, a powerful command-line tool. This article provides the exact FFmpeg commands you need to perform this conversion, ranging from simple single-file conversions to high-quality settings and batch processing for multiple files.
Step 1: Open Command Prompt
First, open the Windows Command Prompt (CMD) or PowerShell. Navigate
to the folder where your WAV file is stored using the cd
command:
cd C:\path\to\your\audio\folderStep 2: Run the Basic Conversion Command
To convert a WAV file to MP3 using FFmpeg’s default settings, run the following command:
ffmpeg -i input.wav output.mp3Replace input.wav with your actual file name and
output.mp3 with your desired output name.
Step 3: Convert with High Quality (Recommended)
By default, FFmpeg may compress the audio. To ensure a high-quality
output, you can set a constant bitrate (CBR) of 320 kbps using the
-b:a flag:
ffmpeg -i input.wav -b:a 320k output.mp3Alternatively, you can use Variable Bitrate (VBR) by using the
-q:a flag. A value of 0 or 1
provides the highest VBR quality:
ffmpeg -i input.wav -q:a 0 output.mp3Batch Convert Multiple WAV Files to MP3
If you have a folder full of WAV files and want to convert all of them to MP3 at once, run this loop directly in your Windows Command Prompt:
for %i in (*.wav) do ffmpeg -i "%i" -b:a 320k "%~ni.mp3"(Note: If you are using this command inside a Windows Batch
script .bat file, use double percent signs %%i
instead of %i.)