Manipulate frame metadata.
This filter accepts the following options:
- mode
-
Set mode of operation of the filter.
Can be one of the following:
- select
-
If both
value
andkey
is set, select frames which have such metadata. If onlykey
is set, select every frame that has such key in metadata. - add
-
Add new metadata
key
andvalue
. If key is already available do nothing. - modify
-
Modify value of already present key.
- delete
-
If
value
is set, delete only keys that have such value. Otherwise, delete key. -
Print key and its value if metadata was found. If
key
is not set print all metadata values available in frame.
- key
-
Set key used with all modes. Must be set for all modes except
print
. - value
-
Set metadata value which will be used. This option is mandatory for
modify
andadd
mode. - function
-
Which function to use when comparing metadata value and
value
.Can be one of following:
- same_str
-
Values are interpreted as strings, returns true if metadata value is same as
value
. - starts_with
-
Values are interpreted as strings, returns true if metadata value starts with the
value
option string. - less
-
Values are interpreted as floats, returns true if metadata value is less than
value
. - equal
-
Values are interpreted as floats, returns true if
value
is equal with metadata value. - greater
-
Values are interpreted as floats, returns true if metadata value is greater than
value
. - expr
-
Values are interpreted as floats, returns true if expression from option
expr
evaluates to true.
- expr
-
Set expression which is used when
function
is set toexpr
. The expression is evaluated through the eval API and can contain the following constants:- VALUE1
-
Float representation of
value
from metadata key. - VALUE2
-
Float representation of
value
as supplied by user invalue
option.
- file
-
If specified in
print
mode, output is written to the named file. When filename equals "-" data is written to standard output. Iffile
option is not set, output is written to the log with AV_LOG_INFO loglevel.
Examples
-
Print all metadata values for frames with key
lavfi.singnalstats.YDIF
with values between 0 and 1.signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr=’between(VALUE1,0,1)’