Created
November 21, 2018 17:15
-
-
Save eridal/f79b5df27a9af9f123d0d7456cea51af to your computer and use it in GitHub Desktop.
useful command-line things
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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