Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
useful command-line things
#!/usr/bin/env bash
from=./images
into=./fixed
quality=60 # percent
find $from -type f -name "*.jpg" | while IFS= read -r jpg; do
mkdir -p "$(
dirname "$into"/"$jpg"
)"
ffmpeg -loglevel quiet -i "$jpg" -q:v $quality "$into"/"$jpg" < /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment