FFmpeg (audio) Cheat Sheet
The FFmpeg incantations you actually need for audio work — converting, trimming, extracting, concatenating and normalising — without wading through the manual every time.
Convert & re-encode
ffmpeg -i in.wav out.mp3Convert by extension — FFmpeg picks the encoderffmpeg -i in.wav -b:a 320k out.mp3Set the audio bitrateffmpeg -i in.mp3 -c:a flac out.flacChoose the codec explicitly with -c:affmpeg -i in.wav -ar 44100 -ac 2 out.wavSet sample rate (-ar) and channel count (-ac)ffmpeg -y -i in.wav out.mp3-y overwrites the output without askingExtract & strip
ffmpeg -i video.mp4 -vn out.wav-vn drops the video, leaving audio onlyffmpeg -i video.mp4 -vn -c:a copy out.aacStream-copy the audio — no re-encode, no quality lossffmpeg -i in.wav -map 0:a:0 first.wavPick a specific stream with -mapTrim
ffmpeg -ss 30 -i in.wav -t 10 out.wavStart at 30 s, take 10 s (-ss before -i seeks fast)ffmpeg -i in.wav -ss 30 -to 45 out.wavFrom 30 s to 45 s using -toffmpeg -ss 00:01:30 -i in.wav -t 00:00:15 out.wavTimes also accept HH:MM:SSLoudness & volume
ffmpeg -i in.wav -af volume=0.5 out.wavHalve the volume (a linear gain factor)ffmpeg -i in.wav -af volume=-6dB out.wavOr give the change in dBffmpeg -i in.wav -af loudnorm out.wavEBU R128 loudness normalisation (defaults I=-24, TP=-2, LRA=7)ffmpeg -i in.wav -af loudnorm=I=-16:TP=-1.5:LRA=11 out.wavStreaming-style target: -16 LUFSFades & speed
ffmpeg -i in.wav -af afade=t=in:st=0:d=3 out.wav3-second fade in (t=type, st=start, d=duration)ffmpeg -i in.wav -af afade=t=out:st=57:d=3 out.wavFade out starting at 57 sffmpeg -i in.wav -af atempo=1.25 out.wavChange tempo without changing pitch (chain for bigger shifts)Join & inspect
ffmpeg -f concat -safe 0 -i list.txt -c copy out.wavConcatenate files listed in list.txt (lines of: file 'a.wav')ffmpeg -i a.wav -i b.wav -filter_complex amix=inputs=2 out.wavMix two files togetherffprobe -i in.wavShow format, duration, codec and stream infoFFmpeg (audio) — The command-line swiss army knife for audio.