I have 1000s of video files and I know some of them are corrupted. I want to be able to detect corrupted files with a bash script, I tried using FFmpeg with error logging:
ffmpeg -v error -i "vid.avi" -f null - 2>"vid.log"
The output doesn't seem to be very useful though, some files which report errors play without any problems. The only way to know for sure seems to be to watch the video to see if there is any corruption or if it crashes the media player.
I would like to be able to automate the "watching" by playing the video from the command line and detecting the corruption or crashing there but I can't find a way to run it without outputting the video and audio.
I have tried FFplay but I can only disable one of the outputs not both:
ffplay -nodisp "vid.avi"
ffplay -vn "vid.avi"
These disable the video:
ffplay -an "vid.avi"
This disables the audio but I can't combine them, when I do I get an error:
Failed to open file 'vid.avi' or configure filtergraph
I have tried using the vlc/cvlv suggestions I have found but none have worked, it still opens a graphical interface just with no controls.
Is there any way to do this?