Last active
November 2, 2022 19:53
-
-
Save AmirRezaM75/923536ddc7cafa737ab45b4a95bbcb3d to your computer and use it in GitHub Desktop.
Find corrupted video files
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 | |
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