Last active
April 17, 2018 02:47
-
-
Save dularion/6237d651c385d2552916 to your computer and use it in GitHub Desktop.
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/sh | |
############################################# | |
# Output file for HTML5 video # | |
# Requirements: # | |
# - handbrakecli # | |
# # | |
# usage: # | |
# ./html5VideoHandBrakeFolder.sh folder # | |
# # | |
############################################# | |
target_directory='converted' | |
for FILE in "$1"/* | |
do | |
file=`basename $FILE` | |
filename=${file%.*} | |
filepath=`dirname $FILE` | |
destination="$filepath/$target_directory" | |
if ! test -d "$destination" | |
then | |
mkdir $destination | |
fi | |
HandBrakeCLI -i $filepath/$file -o $destination/$filename.mp4 --encoder x264 --vb 900 --ab 128 --optimize | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made a recursive parallel version to convert my own library. Maybe it helps someone until Streama can do server-side conversion.