I have a hundred of visually (!) corrupt video clips in H.264 'hiding' within a larger set of files. As they have been re-transcoded, all of them are now technically OK and will play fine, but will have green flash on every other frame.

I have noticed that if I run a file through QCTools then I can identify them by the 'temporal outliers' value, as every other frame is drastically different from the previous one (because of those green flashes).

I would like to point QCTools to each file in this large set, but only:

  • process a small portion of it - there is no time to go through every file in its entire duration
  • fetch only one value - temporal outliers

I have looked through the help of the QCTools CLI version and could not find a way to do this. Does anyone have any other ideas on identifying these files? Is there still a way to do this with QCTools?

  • If a file is corrupt, is it corrupt throughout the video stream, or are there good portions within? – Gyan Apr 13 '18 at 19:34
  • 1
    If memory serves, QCTools mostly just wraps ffmpeg commands, so you might be able to figure out which ffmpeg command calculates the temporal outliers value and automate that. – Michael Liebman Apr 13 '18 at 21:03
  • @MichaelLiebman Excellent idea, I will have a look for ffmpeg filter that does the job and will post it here if I find something. Thank you! – Tony Sepia Apr 14 '18 at 20:27
  • Green flash sounds like it could be gpu decode bug. Check the files on another machine to make sure they’re actually corrupt. – Jason Conrad Dec 8 '19 at 22:09

Since QCTools wraps the ffmpeg/ffprobe and uses the signalstats filter, here is how to achieve what I wanted:

ffprobe -f lavfi movie="Bad.mp4","signalstats=tout" -read_intervals %00:01 -show_frames

-show_frames outputs the frame summary into STDOUT. It contains the value that I need:


-read_intervals allows me to process only a small part of the file to get signal stats from only a small portion of the file

We can also check how QCTools does it by looking at the source code here: https://github.com/bavc/qctools/blob/master/Source/GUI/BigDisplay.cpp#L844-L845

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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