Skip to content

Instantly share code, notes, and snippets.

@AmirRezaM75
Last active November 2, 2022 19:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AmirRezaM75/923536ddc7cafa737ab45b4a95bbcb3d to your computer and use it in GitHub Desktop.
Save AmirRezaM75/923536ddc7cafa737ab45b4a95bbcb3d to your computer and use it in GitHub Desktop.
Find corrupted video files
#!/bin/bash
mapfile -t episodes < <( find . -name "*.mp4" )
for episode in "${episodes[@]}"; do
echo "$episode"
ffmpeg -v error -i "$episode" -map 0:1 -f null -
# Check resolution
ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 "$episode"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment