Created
October 13, 2025 14:08
-
-
Save thenumbernine/129d2f9418d0ecf59192e8d24c631508 to your computer and use it in GitHub Desktop.
bash script for ffmpeg reencoding to save size
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
| #!/usr/bin/env sh | |
| CRF="${2:-30}" | |
| ffmpeg -i "$1" -c:v libx264 -preset slow -crf $CRF -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" -c:a copy "${1%.*}_reenc.mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment