Created
September 3, 2023 14:51
-
-
Save starikcetin/a7839f6f0a2855b217be5b4556d12919 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
shopt -s globstar | |
FILES=(./**/*.*) | |
TOTAL_COUNT=${#FILES[@]} | |
CURRENT_COUNT=1 | |
for i in "${FILES[@]}"; do | |
echo "processing (${CURRENT_COUNT} of ${TOTAL_COUNT}) ${i}" | |
ffmpeg -hide_banner -loglevel error -stats -i "$i" -c:v libvpx-vp9 -crf 18 -deadline good -cpu-used 0 -an "${i%.*}__optimized.webm" | |
CURRENT_COUNT=$((CURRENT_COUNT+1)) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment