Created
November 30, 2014 21:35
-
-
Save rahuljiresal/77cec17dbc89f5bfb1bb to your computer and use it in GitHub Desktop.
Shell Script to convert many files in the folder to MP4 files using Handbrake CLI
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 | |
[ -d bkp ] || mkdir bkp | |
# change the file extension to whatever you want, mkv, avi, etc. | |
for f in *.mkv; | |
do | |
echo "========================== Processing $f =========================="; | |
HandBrakeCLI -i "$f" -o "${f%}.mp4" --preset="Normal" | |
mv "$f" bkp | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment