I'm not sure about the behaviour of corrupt video files. I'll just give suggestions for possible behaviours.
Will these files not play at all? Or will the playback crash somewhere in the middle of the movie?
If it is the former, you can try mplayer -vo null -ao null
on a file, make sure that mplayer doesn't quit in the first 2-3 seconds, kill mplayer and move to the next. Should be easy enough to script and shouldn't take more than an hour for 1000 movies.
If it is the latter, again there are two possibilities.
- mplayer cannot seek to any position beyond the crash point.
- mplayer can seek to a position beyond the crash point and play smoothly.
Case 1 can be handled by opening a file with echo 'seek 95 1' | mplayer -vo null -ao null -slave
and checking if mplayer crashes. This command just opens the file and tries to seek to 95% time position.
Case 2 means that a crash cannot be detected by looking at any point of the file other than the crash point. So, the only way to go about it will be to decode the entire file and see if the decoding fails at some point. There are ways to decode files faster than real time playback, but still I'd expect this process to go on for days, possibly months. It's up to you to decide whether detecting 20-30 corrupt files among a few thousand is really worth this much effort.
Detecting videos that aren't 720p:
mplayer file.extn -frames 0 -vo null -ao null 2> /dev/null | grep VIDEO | awk '{ print $3 }'
prints the resolution of the video. You can use this to generate the required list.