Skip to content

Instantly share code, notes, and snippets.

@podocarp
Created June 27, 2023 10:28
Show Gist options
  • Save podocarp/bc5b8fdc6819a73f1aa2749a118657e5 to your computer and use it in GitHub Desktop.
Save podocarp/bc5b8fdc6819a73f1aa2749a118657e5 to your computer and use it in GitHub Desktop.
Delete corrupted images according to ffmpeg
find . -name "*jpg" -exec bash -c 'f=$(ffmpeg -v error -i "{}" -f null 2>&1 /dev/null); if [[ $f ]] then echo $f; rm -v {}; fi' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment