I'm desperately searching for a convenient method to check the integrity of .mp4 files inside a specific directory with folders in it. Both the names of the .mp4 files and the folders contain spaces, special characters and numbers.
I've already found a proper ffmpeg command to quickly identify a damaged .mp4 file, taken from here:
ffmpeg -v error -i filename.mp4 -map 0:1 -f null - 2>error.log
If the created error.log contains some entries, then the file is obviously corrupted. The opposite would be an empty error.log.
The next step would be to apply this command to every .mp4 file within the folder and its subfolders. Some guides, like here and here, do describe how to apply a ffmpeg command recursively, but my coding skills are limited, so therefore I can't find a way to combine these commands to get the following:
A way to test all .mp4 files inside a folder (recursively) with the aforementioned ffmpeg command, that should create .log files, only if a video file does contain errors (read has some content) and it should inherit the name of the broken file, to know which file is corrupted.
Using Ubuntu Gnome 15.10.