Skip to content

Instantly share code, notes, and snippets.

@alexandregz
Created October 22, 2014 22:11
Show Gist options
  • Save alexandregz/7fa2b5f3b454369c829a to your computer and use it in GitHub Desktop.
Save alexandregz/7fa2b5f3b454369c829a to your computer and use it in GitHub Desktop.
convert mkv to mp4 (for example) with handbrakecli
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Use: $0 inputfile"
exit
fi
INPUTFILE=$1
OUTPUTFILE=$(echo $INPUTFILE | sed 's/\.[^\.]*$//')".mp4"
HandBrakeCLI -i "$INPUTFILE" -o "$OUTPUTFILE" --preset="High Profile"
@Bertibruyn
Copy link

Thank you for this sharing, really helpful. I used to convert video with Acethinker Video Converter, free and works perfect. It is a cloud based software to convert videos without install any software in your device. Share it here as an alternative method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment