What are the correct options to use to verify video files using ffmpeg.exe in Windows 7?

I have thousands of video files to check/verify if they have an error or a warning. A firm just digitized them over old tapes (VHS, Umatic ...) All these videos are in mp4 format and i want to check them automatically with a software. After a small search i found this website (http://videofilechecker.com/), but there is no trial version of the software so i could not test it with my video files. Then i saw that the software is using ffmpeg to verify all these videos. In my second search i found this question in superuser. (How can I check the integrity of a video file (avi, mpeg, mp4...)?).

In that question the answer is:

ffmpeg.exe -v 5 -i file.avi -f null - >error.log

i checked the error.log and it was completly empty (Probably there wasn't an error in the video)

but i researched the documentation of the ffmpeg and found some another stuff like:

ffmpeg.exe -v error -i file.mp4 -f null - >error.log

but then i got an error:

Unknown input format: null
Failed to set value 'null' for option 'f': Error number -22 occurred

If i try with -v 5 there is no error at all, but in the documentation it is written with -v error

With my limited knowledge with video verification, i am not so sure with which options should i use with ffmpeg to verify all these files. Also my next problem will be to write a batch script in windows, which is going to check all the files one by one and if there is an error it will write it out to a log file with the file name in it. Does someone has any software idea or script to verify these videos?


Solution 1:

This is what I am using:

./ffmpeg.exe -v debug -threads 8 -nostats -i "path/to/file.ts" -f null - >~/error.log 2>&1

Or:

./ffmpeg.exe -v debug -threads 8 -nostats -i "path/to/file.ts" -f null - 2>~/error.log

The second one redirects just the stderr to a file, whereas the first one redirects both, stderr and stdout.

The option -v debug will print all errors, warnings and debug information, so it may be useful when comparing two video files (e.g. to see which one has less errors). To limit what's reported use other levels according to ffmpeg documentation:

https://www.ffmpeg.org/ffmpeg.html

Look for the option: -loglevel [repeat+]loglevel | -v [repeat+]loglevel. The other levels are quiet, panic, fatal, error, warning, info, verbose, debug.