]> git.sesse.net Git - ffmpeg/commitdiff
doc/filters: clarify metadata and logging for blackdetect
authorGyan Doshi <ffmpeg@gyani.pro>
Mon, 13 Apr 2020 05:53:24 +0000 (11:23 +0530)
committerGyan Doshi <ffmpeg@gyani.pro>
Mon, 13 Apr 2020 05:53:24 +0000 (11:23 +0530)
doc/filters.texi
libavfilter/vf_blackdetect.c

index 3931d8d79e421f9e89661df0eca161683b38a6c4..a4f99ef376f5d335349034f8e776d6fb596b4c98 100644 (file)
@@ -6532,11 +6532,20 @@ Default is disabled.
 
 Detect video intervals that are (almost) completely black. Can be
 useful to detect chapter transitions, commercials, or invalid
-recordings. Output lines contains the time for the start, end and
-duration of the detected black interval expressed in seconds.
-
-In order to display the output lines, you need to set the loglevel at
-least to the AV_LOG_INFO value.
+recordings.
+
+The filter outputs its detection analysis to both the log as well as
+frame metadata. If a black segment of at least the specified minimum
+duration is found, a line with the start and end timestamps as well
+as duration is printed to the log with level @code{info}. In addition,
+a log line with level @code{debug} is printed per frame showing the
+black amount detected for that frame.
+
+The filter also attaches metadata to the first frame of a black
+segment with key @code{lavfi.black_start} and to the first frame
+after the black segment ends with key @code{lavfi.black_end}. The
+value is the frame's timestamp. This metadata is added regardless
+of the minimum duration specified.
 
 The filter accepts the following options:
 
index 06ef9988d1f4db1edb4910a4d4f806379acc112e..4b5d8ff56181eddd9cee2f8f33ad2995b4ce27fc 100644 (file)
@@ -136,7 +136,6 @@ static int request_frame(AVFilterLink *outlink)
     return ret;
 }
 
-// TODO: document metadata
 static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
 {
     AVFilterContext *ctx = inlink->dst;