Skip to content

Instantly share code, notes, and snippets.

@RFullum
Last active January 3, 2021 00:55
Show Gist options
  • Save RFullum/29acdf9b24d8b86e289ba5ac999649e3 to your computer and use it in GitHub Desktop.
Save RFullum/29acdf9b24d8b86e289ba5ac999649e3 to your computer and use it in GitHub Desktop.
Bash script to convert all .mkv to .mp4 in a directory using ffmpeg
#!/bin/bash
for i in *.mkv; do ffmpeg -i "$i" -c:v libx264 -crf 23 -preset medium -movflags +faststart -vf scale=-1:1080,format=yuv420p -ac 2 "${i%.*}.mp4"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment