All posts
MP3 to WAV via CLI
Decode MP3 to uncompressed PCM WAV with ffmpeg.
Open online converterPackages to install
Only ffmpeg is required. pcm_s16le writes 16-bit little-endian WAV.
ffmpeg
sudo apt-get update
sudo apt-get install -y ffmpegHow to run the command
ffmpeg -i input.mp3 -vn -c:a pcm_s16le output.wav. -vn drops album art so the result is audio-only.
ffmpeg -y -i input.mp3 -vn -c:a pcm_s16le output.wavDockerfile example
Build a minimal Ubuntu image with the required packages and run the conversion inside the container.
FROM ubuntu:24.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg && \
rm -rf /var/lib/apt/lists/*
WORKDIR /work
docker build -t mp3-to-wav .
docker run --rm -v "$PWD:/work" -w /work mp3-to-wav \
ffmpeg -y -i input.mp3 -vn -c:a pcm_s16le output.wavExample commands
Run these locally after installing the packages, or inside the container from the Dockerfile.
ffmpeg -y -i input.mp3 -vn -c:a pcm_s16le output.wavffmpeg -y -i track.mp3 -vn -c:a pcm_s16le -ar 44100 -ac 2 track.wav