Skip to content

Instantly share code, notes, and snippets.

@cybertk
Created Feb 29, 2016
Embed
What would you like to do?
Convert avi to mp4
#!/bin/sh
O=mp4s
videos=$(find ./videos -iname "*.avi")
for f in $videos; do
o="$O/$(basename ${f%%.avi}).mp4"
if [[ ! -f "$o" ]]; then
cmd="HandBrakeCLI -i "$f" -o "$O/$(basename ${f%%.avi}).mp4""
echo $cmd
#eval "$cmd"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment