Created
October 14, 2017 01:50
-
-
Save derpeter/2d1ff639076fd32f76b672ddb3e28e1e to your computer and use it in GitHub Desktop.
reencode all video files in an folder that a bigger than a configured value to save disk space
This file contains 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
#!/bin/bash | |
MIN_SIZE=6G | |
IN_DIR=. | |
OUT_DIR=out | |
find $IN_DIR -maxdepth 1 -type f -size +$MIN_SIZE -exec ffmpeg -y -i {} -c:v libx264 -preset slow -tune film -profile:v high -level 4.2 -crf 23 -c:a copy -c:s copy $OUT_DIR/{} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment