Created
September 18, 2018 12:59
-
-
Save mplinuxgeek/04f85fe2d2a19bdbcd8664a72f0df1ed to your computer and use it in GitHub Desktop.
Simple script to loop through a directory of MKV's and convert them to MP4's
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 | |
for file in *.mkv; do | |
# Extract filename from input file without the extension | |
filename=$(basename "$file") | |
#extension="${filename##*.}" | |
filename="${filename%.*}.mp4" | |
echo $filename | |
ffmpeg -i "$file" -codec:v libx264 -preset superfast -crf 22 -vf scale="720:trunc(ow/a/2)*2" -codec:a libfdk_aac -b:a 128k -y "$filename" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment