Skip to content

Instantly share code, notes, and snippets.

@damsonn
Created November 28, 2015 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save damsonn/c212ed8a0c0cc7370f71 to your computer and use it in GitHub Desktop.
Save damsonn/c212ed8a0c0cc7370f71 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