Skip to content

Instantly share code, notes, and snippets.

@phpfunk
Last active August 29, 2015 14:10
Show Gist options
  • Save phpfunk/4b03be5ee4b77b1b1348 to your computer and use it in GitHub Desktop.
Save phpfunk/4b03be5ee4b77b1b1348 to your computer and use it in GitHub Desktop.
ffmpeg mkv to mp4

Create an alias

Simply update your bash profile to add an alias to this script:

alias mkv2mp4="bash ~/PATH/TO/SCRIPT/mkv2mp4.sh"

Call it

$ mkv2mp4
MKV File: {ENTER_MKV_FILE}
...
#!/bin/sh
echo -n "MKV File: "
read mkv_file
filename="${mkv_file%.*}.mp4"
ffmpeg -i "$mkv_file" -c:v copy -c:a copy "$filename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment