History

doc/filters: clarify metadata and logging for blackdetect

Gyan Doshi committed 6 years ago

Commit 2e2fa2d1 parent 4e0cf812 files · +14 −6Browse files

Unified · Split

2 files
  1. doc/filters.texi +14 −5
  2. libavfilter/vf_blackdetect.c +0 −1
doc/filters.texi+14−5
@@ -6532,11 +6532,20 @@ Default is disabled. · 6531 unmodified lines
6532 6532
6533Detect video intervals that are (almost) completely black. Can be6533Detect video intervals that are (almost) completely black. Can be
6534useful to detect chapter transitions, commercials, or invalid6534useful to detect chapter transitions, commercials, or invalid
6535recordings. Output lines contains the time for the start, end and6535recordings.
6536duration of the detected black interval expressed in seconds.6536
6537 6537The filter outputs its detection analysis to both the log as well as
6538In order to display the output lines, you need to set the loglevel at6538frame metadata. If a black segment of at least the specified minimum
6539least to the AV_LOG_INFO value.6539duration is found, a line with the start and end timestamps as well
6540as duration is printed to the log with level @code{info}. In addition,
6541a log line with level @code{debug} is printed per frame showing the
6542black amount detected for that frame.
6543
6544The filter also attaches metadata to the first frame of a black
6545segment with key @code{lavfi.black_start} and to the first frame
6546after the black segment ends with key @code{lavfi.black_end}. The
6547value is the frame's timestamp. This metadata is added regardless
6548of the minimum duration specified.
6540 6549
6541The filter accepts the following options:6550The filter accepts the following options:
6542 6551
libavfilter/vf_blackdetect.c+0−1
@@ -136,7 +136,6 @@ static int request_frame(AVFilterLink *outlink) · 135 unmodified lines
136 return ret;136 return ret;
137}137}
138 138
139// TODO: document metadata
140static int filter_frame(AVFilterLink *inlink, AVFrame *picref)139static int filter_frame(AVFilterLink *inlink, AVFrame *picref)
141{140{
142 AVFilterContext *ctx = inlink->dst;141 AVFilterContext *ctx = inlink->dst;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t