Reputation: 451
I am trying to run a QC check on my video files.
I know that there is a way to detect black frame or audio loss in a video file. Can anyone help me with how the syntax is written?
I have tried doing the following but I am having issues as I do not know how to tell from the output.
ffmpeg -i inputfile.mxf -vf blackdetect=d=0.1:pix_th=.1 -f rawvideo -y /dev/null
Also is there ay ways to check if I have any packets that are in error by using ffprobe
or ffmpeg
I also do not understand waht this 0.1:pix_th=.1
is doing?
EDIT*:
I have used this command now
ffmpeg -i 01.mxf -vf blackdetect=d=0:pix_th=.01 -f rawvideo -y /NUL
this gives me
[blackdetect @ 000001a2ed843740] black_start:0.04 black_end:2
black_duration:1.96
[mpeg2video @ 000001a2ed86efc0] ac-tex damaged at 45 304.08
bitrate=829328.3kbits/s dup=1 drop=0 speed= 5.6x
However, the actual video has more than this for the black frame.
is there a way to tell it to continue looking at the video and get all black frames, not just the first instance.
Upvotes: 4
Views: 10824
Reputation: 1622
I also do not understand what this 0.1:pix_th=.1 is doing?
d=0.1 mention the duration of continues black screen in seconds which you wants to detect. For example, if you set it as 5 then you ll get notified only if the input video contains black screen for 5 or more seconds. It won't detect less than 5 second black.
pix_th=.1 mention the pixel threshold of black frame which you want to detect (darkness of the black frame). You can set a value between 0 to 1.
0-> pure black (maximum dark).
1-> lite black (detect all frames, because you are telling the ffmpeg to detect minimum to maximum pixel value as black frame).
However, the actual video has more than this for the black frame.
is there a way to tell it to continue looking at the video and get all black frames, not just the first instance.
Increase the pix_th value and check.
for more information BlackDetect
Upvotes: 4