Created
July 21, 2019 03:39
-
-
Save 8q/6289b0b67da103f019ccd0c9fde6c812 to your computer and use it in GitHub Desktop.
m2ts -> mp4バッチ
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
#!/bin/bash | |
if [ $# -lt 1 ]; then | |
echo 'Usage: $ ./batch.sh input_dir' | |
exit 1 | |
fi | |
find $1 -type f | | |
grep -E "\.m2ts$" | | |
sed 's/\.m2ts$//g' | | |
xargs -I{} \ | |
ffmpeg -y -i {}.m2ts \ | |
-c:v libx264 \ | |
-s 1280x720 \ | |
-aspect 16:9 \ | |
-vsync 1 \ | |
-movflags +faststart \ | |
-crf 26 \ | |
-tune animation \ | |
{}.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment