Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 to check the integrity of a video (avi, mpeg, ...) file?).

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?

share|improve this question
    
ffmpeg writes its info to STDERR, not STDOUT, so with > error.log you won't see anything. You need 2> error.log. Please show us the complete error output for the error you get with -v error (also try -loglevel error). Also take a look at the -err_detect option. –  slhck Mar 28 '13 at 11:08
    
@xmux I edited your title as it didn't make much sense, you can change it back if you disagree –  Tog Mar 28 '13 at 11:18
    
I tried both ffmpeg.exe -v error -i file.mp4 -f null - 2>error.log and ffmpeg.exe -loglevel error -i file.mp4 - 2>error.log but the log file is still empty. it means video has no errors? and on the other hand -err_detect` which option should i try with that crccheck, bitstream ...? –  xmux Mar 28 '13 at 11:27
    
If you run ffmpeg without output redirection, it will show you its complete debugging output, including version, etc. Please provide that. You should be able to redirect this output to any file – maybe output redirection on Windows works differently but 2> is what works for ffmpeg in Linux/Unix. –  slhck Mar 28 '13 at 11:29
1  
Okay, I just checked. Try -v error instead of -v 5. If you don't get any output, there was no error. Do you actually have files that exhibit errors? I'm not sure if it's reliably possible with FFmpeg to check for those. –  slhck Mar 28 '13 at 11:37

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.