Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- mkcheck () {
- tmp=$(mktemp)
- ffmpeg -v error -threads 1 -i "${1}" -f null - 2>"${tmp}"
- errors=$(grep -E -i 'error|invalid|illegal|damage' "${tmp}" | wc -l)
- if [[ $errors -ge "1" ]]; then
- echo "File ${1} is BROKEN!!!"
- fi
- rm "${tmp}"
- }
- export -f mkcheck
- find . -type f \( -iname "*.avi" -o -iname "*.mkv" -o -iname "*.mp4" -o -iname "*.mp*g" -o -iname "*.mov" -o -iname "*.3gp" \) -print0 | parallel -0 mkcheck
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement