====== ffmpeg - Video - Detect Black Screens ====== ===== Create a custom filter to detect Black Screens ===== ffmpeg -i input.mp4 -vf "format=yuv420p,subtract=128:128:128[black_subtracted]; [in][black_subtracted]differential_add=abs(a-b):abs(a-b):abs(a-b)[diff]; [diff]gt(v=0.01)[black]; [in][black]minterpolate=mode=byzero:fps=25:ipr=0:iprc=1000" -an -f null - **NOTE:** This filter checks if the YUV color components of the video are close to black. This command will output black frames (where there are black screens) to the console. A tool like grep or awk can be used to find the timestamps of the black frames.