FFmpeg recipe

FFmpeg: Convert HEVC (H.265) to H.264 MP4

Chrome refuses HEVC, Windows 10 needs a paid codec. This recipe re-encodes to H.264 for universal playback.

Command

ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a copy -y output.mp4
Prefer no terminal?
Use the Video Converter in your browser
Open Video Converter

What each flag does

-iInput file. Can be a video, audio, or image. Repeat for multiple inputs.
-c:vVideo codec for output. e.g. libx264, libx265, libvpx-vp9.
-crfConstant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264.
-preset mediumSpeed vs. compression tradeoff. Use slow for archival, faster for quick conversion.
-c:a copyStream-copy the audio (typically AAC). Avoids needless re-encode.

Notes & gotchas

  • Output file will be ~1.5–2× larger than the HEVC source for equivalent quality.
  • For 10-bit HEVC (HDR), pass -pix_fmt yuv420p to ensure SDR-compatible output.

Related recipes