FFmpeg Cookbook
AVI to MP4 with FFmpeg — DivX/Xvid/MJPEG to H.264/AAC
Convert old AVI files (DivX, Xvid, MJPEG, MP3 audio) to MP4 with FFmpeg. Re-encode to H.264/AAC with CRF, learn when stream-copy works versus when you must re-encode, add faststart for web playback, plus troubleshooting and FAQ.
M4A to MP3 with FFmpeg — Bitrate, VBR, and Quality
Convert M4A (usually AAC, sometimes ALAC) audio to MP3 with FFmpeg using libmp3lame. Covers constant bitrate (-b:a 192k), variable bitrate (-q:a 2), choosing the right quality, and why M4A to MP3 always re-encodes. Practical, runnable commands.
WebM to MP4 with FFmpeg — VP8/VP9 + Opus to H.264/AAC
Convert WebM (VP8/VP9 video, Opus/Vorbis audio) to MP4 with FFmpeg. Re-encode to H.264/AAC with CRF, when VP9 stream-copy is possible, faststart for web playback, quality/size trade-offs, and a full troubleshooting and FAQ section.
Audio Format Conversion — WAV, MP3, AAC, and FLAC
Convert audio formats with FFmpeg: WAV, MP3, AAC, FLAC. Covers -c:a encoder, -b:a vs -q:a quality control, and -ar sample rate conversion.
FFmpeg Extract Audio — MP3, AAC, WAV, FLAC
Extract audio from video with FFmpeg: lossless copy (-c:a copy) vs re-encoding and when to use each, MP3/AAC/FLAC/WAV format-specific commands, multi-track selection with -map, time-range extraction, batch processing, and five common error fixes.
Complete Guide to Converting Video to MP4 (H.264/AAC) with FFmpeg
Convert any video to MP4 with FFmpeg: H.264 (libx264) + AAC, best CRF settings, -preset guide, stream copy shortcut. The complete ffmpeg video-to-mp4 command reference.