Skip to content

Instantly share code, notes, and snippets.

@cybertk
Created February 29, 2016 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cybertk/49ca62bac44e7316ff82 to your computer and use it in GitHub Desktop.
Save cybertk/49ca62bac44e7316ff82 to your computer and use it in GitHub Desktop.
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