1

I'm using ffprobe to detect black frames of a video. However, the output produces duplicate entries for each black_start and black_end. Looking for help in figuring out why it duplicates these results.

ffprobe -f lavfi -i "movie=movie.mp4,blackdetect[out0]" -show_entries tags=lavfi.black_start,lavfi.black_end -of default=nw=1 -v quiet

TAG:lavfi.black_start=0
TAG:lavfi.black_start=0
TAG:lavfi.black_end=0.4004
TAG:lavfi.black_end=0.4004
TAG:lavfi.black_start=1813.68
TAG:lavfi.black_start=1813.68
TAG:lavfi.black_end=1814.38
TAG:lavfi.black_end=1814.38
TAG:lavfi.black_start=6620.85
TAG:lavfi.black_start=6620.85
TAG:lavfi.black_end=6621.88
TAG:lavfi.black_end=6621.88
TAG:lavfi.black_start=9069.16
TAG:lavfi.black_start=9069.16
TAG:lavfi.black_end=9070.69
TAG:lavfi.black_end=9070.69
TAG:lavfi.black_start=9081.84
TAG:lavfi.black_start=9081.84
0

The input is read via the lavfi device, and the tags are inserted by the blackdetect filter inside the filtergraph. So, they are present in the packets emitted by the filtergraph. Then, once decoded, they are also present in the decoded frames.

Use either

-show_entries packet_tags=lavfi.black_start,lavfi.black_end

or

-show_entries frame_tags=lavfi.black_start,lavfi.black_end

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.