Skip to content

Instantly share code, notes, and snippets.

@rowe-morehouse
Forked from mfd/mp4resize.md
Created October 15, 2020 00:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rowe-morehouse/26b413af481dbc33ec7e29c2be376541 to your computer and use it in GitHub Desktop.
Save rowe-morehouse/26b413af481dbc33ec7e29c2be376541 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