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

<pre><code>ffprobe -f lavfi movie="Bad.mp4","signalstats=tout" -read_intervals %00:01 -show_frames
</code></pre>

<p><strong>-show_frames</strong> outputs the frame summary into STDOUT. It contains the value that I need: </p>

<blockquote>
  <p>TAG:lavfi.signalstats.TOUT=0</p>
</blockquote>

<p><strong>-read_intervals</strong> allows me to process only a small part of the file to get signal stats from only a small portion of the file</p>

<p>We can also check how QCTools does it by looking at the source code here:
<a href="https://github.com/bavc/qctools/blob/master/Source/GUI/BigDisplay.cpp#L844-L845" rel="nofollow noreferrer">https://github.com/bavc/qctools/blob/master/Source/GUI/BigDisplay.cpp#L844-L845</a></p>

CC BY-SA 3.0
2018-04-16T14:41:27.370Z
2018-04-16T14:41:27.370Z
Tony Sepia
<p>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 <strong>technically</strong> OK and will play fine, but will have green flash on every other frame.</p>

<p>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).</p>

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

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

<p>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?</p>

CC BY-SA 3.0
2018-04-13T19:34:07.437Z
If a file is corrupt, is it corrupt throughout the video stream, or are there good portions within?
Gyan
CC BY-SA 3.0
2018-04-13T21:03:51.043Z
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
CC BY-SA 3.0
2018-04-14T20:27:24.163Z
@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
CC BY-SA 4.0
2019-12-08T22:09:45.463Z
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
<video-quality><automation><analysis>
Automating QC to find corrupt video files
Tony Sepia
# Automating QC to find corrupt video files

(Asked by: username_0 on 2018-04-13)

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?

**Tags:** video-quality, automation, analysis

> **Comments:**
> **username_1**: If a file is corrupt, is it corrupt throughout the video stream, or are there good portions within?  
> **username_2**: 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.  
> **username_0**: @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!  
> **username_3**: Green flash sounds like it could be gpu decode bug. Check the files on another machine to make sure they’re actually corrupt.  

---

## 1 answers

### Answer by username_0 on 2018-04-16. Score: 0 | Accepted answer

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: 

TAG:lavfi.signalstats.TOUT=0

-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


---

