diff options
author | Paul B Mahol <onemda@gmail.com> | 2016-02-06 11:19:45 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2016-02-10 09:55:39 +0100 |
commit | 4ca8879d19893562040670f488a9c47aea77beb4 (patch) | |
tree | 19da82448b1bccaf74cdd624367f43421465f086 /doc | |
parent | 674cc26f257c1b1e320d8e695b1b9cf74f8ef83b (diff) | |
download | ffmpeg-4ca8879d19893562040670f488a9c47aea77beb4.tar.gz |
avfilter: add metadata filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/filters.texi | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 8ae402af58..56de876dca 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -8445,6 +8445,100 @@ format=rgb24,mergeplanes=0x000102:yuv444p @end example @end itemize +@section metadata, ametadata + +Manipulate frame metadata. + +This filter accepts the following options: + +@table @option +@item mode +Set mode of operation of the filter. + +Can be one of the following: + +@table @samp +@item select +If both @code{value} and @code{key} is set, select frames +which have such metadata. If only @code{key} is set, select +every frame that has such key in metadata. + +@item add +Add new metadata @code{key} and @code{value}. If key is already available +do nothing. + +@item modify +Modify value of already present key. + +@item delete +If @code{value} is set, delete only keys that have such value. +Otherwise, delete key. + +@item print +Print key and its value if metadata was found. If @code{key} is not set print all +metadata values available in frame. +@end table + +@item key +Set key used with all modes. Must be set for all modes except @code{print}. + +@item value +Set metadata value which will be used. This option is mandatory for +@code{modify} and @code{add} mode. + +@item length +Set length of how many characters of two metadata values need to match to be +considered same. Default is all available characters. + +@item function +Which function to use when comparing metadata value and @code{value}. + +Can be one of following: + +@table @samp +@item string +Values are interpreted as strings, returns true if @code{value} is same as metadata value up +to N chars as set in @code{length} option. + +@item less +Values are interpreted as floats, returns true if @code{value} is less than metadata value. + +@item equal +Values are interpreted as floats, returns true if @code{value} is equal with metadata value. + +@item greater +Values are interpreted as floats, returns true if @code{value} is greater than metadata value. + +@item expr +Values are interpreted as floats, returns true if expression from option @code{expr} +evaluates to true. +@end table + +@item expr +Set expression which is used when @code{function} is set to @code{expr}. +The expression is evaluated through the eval API and can contain the following +constants: + +@table @option +@item VALUE1 +Float representation of @code{value} from metadata key. + +@item VALUE2 +Float representation of @code{value} as supplied by user in @code{value} option. +@end table +@end table + +@subsection Examples + +@itemize +@item +Print all metadata values for frames with key @code{lavfi.singnalstats.YDIF} with values +between 0 and 1. +@example +@end example +signalstats,metadata=print:key=lavfi.signalstats.YDIF:function=expr:expr='between(VALUE1,0,1)' +@end itemize + @section mpdecimate Drop frames that do not differ greatly from the previous frame in |