Skip to content

Instantly share code, notes, and snippets.

@tommyskott
Last active March 29, 2022 08:10
Show Gist options
  • Save tommyskott/9e9dd737e966cd0c9731d5d44512fba8 to your computer and use it in GitHub Desktop.
Save tommyskott/9e9dd737e966cd0c9731d5d44512fba8 to your computer and use it in GitHub Desktop.
Scale down all jpgs in a folder to a set size and save them with a suffix
#!/bin/bash
# Requires ffmpeg
# Scale down all jpgs in a folder to a set size and save them with a suffix
for i in *.jpg; do ffmpeg -i "${i}" -vf scale=1200:-1 "${i%.*}_small.jpg"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment