With ffmpeg 4.3.1
, I want to use the "blackframe" filter.
This filter outputs text results in the console each time a black frame is detected in the input video.
ffmpeg -i Input.avi -filter_complex "blackframe" Output.mkv
> [Parsed_blackframe_1 @ 0x7ff48c607a80] frame:206 pblack:100 ...
I do not need to create the Output.mkv video, as console result is enough.
Unfortunately I am not able to find in the documentation how disable output video and still run the filter. From the main options section https://www.ffmpeg.org/ffmpeg.html#Main-options and examples elsewhere I tried :
-f null
-y NUL
option in the -pass
option example of the docBut none of these commands works :
ffmpeg -i Video.avi -filter_complex "black frame" -f null
> Filter blackframe has an unconnected output
ffmpeg -i Video.avi -filter_complex "black frame" -y NUL
> [NULL @ 0x7ffbe7026200] Unable to find a suitable output format for 'NUL'
> NUL: Invalid argument
How can I disable video output ?
Where is it explain in the documentation ?
On Linux:
ffmpeg -i Video.avi -filter_complex "blackframe" -pass 1 -an -f rawvideo -y /dev/null
Results in:
[Parsed_blackframe_0 @ 0x6e11940] frame:1 pblack:100 pts:2 t:0.041708 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:2 pblack:100 pts:4 t:0.083417 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:3 pblack:100 pts:6 t:0.125125 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:4 pblack:100 pts:8 t:0.166833 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:5 pblack:100 pts:10 t:0.208542 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:6 pblack:100 pts:12 t:0.250250 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:7 pblack:100 pts:14 t:0.291958 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:8 pblack:100 pts:16 t:0.333667 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:9 pblack:100 pts:18 t:0.375375 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:10 pblack:100 pts:20 t:0.417083 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:11 pblack:100 pts:22 t:0.458792 type:P last_keyframe:0
[Parsed_blackframe_0 @ 0x6e11940] frame:12 pblack:100 pts:24 t:0.500500 type:I last_keyframe:12
[Parsed_blackframe_0 @ 0x6e11940] frame:13 pblack:100 pts:26 t:0.542208 type:P last_keyframe:12
[Parsed_blackframe_0 @ 0x6e11940] frame:14 pblack:100 pts:28 t:0.583917 type:P last_keyframe:12
The command specifies no audio and then dumps the raw video to /dev/null
ffmpeg documentation: https://ffmpeg.org/ffmpeg.html#Video-Options See: -pass
The command on Windows purports to be -y NUL
rather than -y /dev/null
but I have no way of testing it.