Skip to content

Instantly share code, notes, and snippets.

@simonreeves
Last active March 4, 2021 17:26
Show Gist options
  • Save simonreeves/adecee84d29c3baa1cbb8703447326b2 to your computer and use it in GitHub Desktop.
Save simonreeves/adecee84d29c3baa1cbb8703447326b2 to your computer and use it in GitHub Desktop.
convert to mp4 alias for .bashrc #bash #ffmpeg #convert
# usage
# convert /path/to/myfile.mov
alias convert=convert_to_mp4
convert_to_mp4() {
out_file="$(echo $1 | sed 's/\.[^.]*$//').mp4"
ffmpeg -y -i "$1" -crf 20 "${out_file}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment