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.mp4Prefer no terminal?
Use the Video Converter in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -c:v | Video codec for output. e.g. libx264, libx265, libvpx-vp9. |
| -crf | Constant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264. |
| -preset medium | Speed vs. compression tradeoff. Use slow for archival, faster for quick conversion. |
| -c:a copy | Stream-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
Convert MOV → MP4 · MOV → MP4
Convert MOV to MP4 with FFmpeg using H.264 video and AAC audio. CRF 23 default keeps quality visually identical.
Convert MKV → MP4 · MKV → MP4
Convert MKV to MP4 with FFmpeg using stream-copy. Remuxes the H.264 / AAC streams without re-encoding.
Convert MP4 → WebM · MP4 → WebM
Convert MP4 to WebM with FFmpeg using VP9 video and Opus audio. ~30% smaller for the web.
Convert MP4 → GIF · MP4 → GIF
Convert MP4 to GIF with FFmpeg using a custom palette for sharp colors at small file sizes.