Skip to content

Instantly share code, notes, and snippets.

@lancepioch
Created September 16, 2014 21:52
Show Gist options
  • Save lancepioch/1ecdfe892bbbe642e0bc to your computer and use it in GitHub Desktop.
Save lancepioch/1ecdfe892bbbe642e0bc to your computer and use it in GitHub Desktop.
ffmpeg command to resize all pictures in a directory to 2048x2048 or less
for /f "delims=|" %f in ('dir /b .') do ffmpeg -i "%f" -vf "scale='if(gt(iw, ih),2048,-1)':'if(gt(ih, iw),2048,-1)'" "%f.jpg"
@lancepioch
Copy link
Author

You can always add an output directory or change the file extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment