Skip to content

Instantly share code, notes, and snippets.

@bsormagec
Forked from damsonn/mkv_to_264.sh
Created January 20, 2016 09:19
Show Gist options
  • Select an option

  • Save bsormagec/61cca8a6d42badb0edc2 to your computer and use it in GitHub Desktop.

Select an option

Save bsormagec/61cca8a6d42badb0edc2 to your computer and use it in GitHub Desktop.
convert all the MKVs in the current directory to standard x264
#!/bin/bash
# convert all the .mkv in the current directory to standard x264
for ff in *.mkv;
do
filename=$(basename $ff)
extension=${filename##*.}
filename=${filename%.*}
ffmpeg -i "${ff}" -c:v libx264 -crf 23 -preset medium -map 0 -c:a copy "${filename}.h264.mkv"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment