Skip to content

Instantly share code, notes, and snippets.

@mfd
Created April 21, 2020 09:06
Show Gist options
  • Save mfd/32e95c01805a43347673736bdad29d9e to your computer and use it in GitHub Desktop.
Save mfd/32e95c01805a43347673736bdad29d9e to your computer and use it in GitHub Desktop.
for i in **/*.mp4; do
    d=$(dirname "$i");
    b=$(basename "$i" .mp4);
    mkdir -p "720/${d}"
    ffmpeg -i "$i" -c:v libx264 -s hd720 "720/${d}/${b}_720.mp4"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment