Created
December 13, 2025 23:09
-
-
Save pnettto/7af9f449c7cfa1f4ff2a8ccebf727289 to your computer and use it in GitHub Desktop.
MOV to MP4 for the web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i input.mov \ | |
| -vf "scale=1000:-2,fps=24" \ # Resize to 1000px wide (even height), reduce to 24fps | |
| -c:v libx264 \ # Encode video using H.264 (best web compatibility) | |
| -crf 26 \ # Quality setting (higher = smaller file, good for background videos) | |
| -preset slow \ # Better compression efficiency (smaller size, slower encode) | |
| -pix_fmt yuv420p \ # Use widely supported pixel format (Safari / mobile safe) | |
| -movflags +faststart \ # Move MP4 metadata to front for instant streaming playbac | |
| output.mp4 | |
| Optional | |
| -an \ # Remove audio track (ideal for autoplay / muted loops) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment