I am desperately looking for a convenient method for checking the integrity of .mp4 files inside a specific directory with folders in it. The names of the .mp4 files and folders contain spaces, special characters, and numbers.
I already found the correct ffmpeg command to quickly identify the damaged .mp4 file taken from here : ffmpeg -v error -i filename.mp4 -map 0:1 -f null - 2>error.log
If the generated error.log file contains some entries, the file is clearly corrupt. The opposite is the empty error.log.
The next step is to apply this command for each .mp4 file in the folder and its subfolders. Some manuals, such as here and here , describe how to use the ffmpeg command recursively, but my coding skills are limited, so I cannot 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, which should create .log files only if the video file contains errors (reading has some content) and it must inherit the file name to find out which file is damaged.
Using Ubuntu Gnome 15.10.
source share