ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Sun Aug 7 15:51:47 2016 +0200| [1562a4c4f3eb3d2daae12ab8c722c177ed130f83] | committer: Paul B Mahol
doc/filters: reorganize some entries, move scale_npp to right section Also remove select entry in audio section, probably error in merge. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1562a4c4f3eb3d2daae12ab8c722c177ed130f83 --- doc/filters.texi | 637 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 333 insertions(+), 304 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 9df2a7e..969df5e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -974,6 +974,23 @@ slope Specify the band-width of a filter in width_type units. @end table +@section aloop + +Loop audio samples. + +The filter accepts the following options: + +@table @option +@item loop +Set the number of loops. + +@item size +Set maximal number of samples. + +@item start +Set first sample of loop. +@end table + @anchor{amerge} @section amerge @@ -1347,6 +1364,23 @@ aresample=async=1000 @end example @end itemize +@section areverse + +Reverse an audio clip. + +Warning: This filter requires memory to buffer the entire clip, so trimming +is suggested. + +@subsection Examples + +@itemize +@item +Take the first 5 seconds of a clip, and reverse it. +@example +atrim=end=5,areverse +@end example +@end itemize + @section asetnsamples Set the number of samples per each output audio frame. @@ -3475,47 +3509,6 @@ channels. Default is 0.3. Set level of input signal of original channel. Default is 0.8. @end table -@section scale_npp - -Use the NVIDIA Performance Primitives (libnpp) to perform scaling and/or pixel -format conversion on CUDA video frames. Setting the output width and height -works in the same way as for the @var{scale} filter. - -The following additional options are accepted: -@table @option -@item format -The pixel format of the output CUDA frames. If set to the string "same" (the -default), the input format will be kept. Note that automatic format negotiation -and conversion is not yet supported for hardware frames - -@item interp_algo -The interpolation algorithm used for resizing. One of the following: -@table @option -@item nn -Nearest neighbour. - -@item linear -@item cubic -@item cubic2p_bspline -2-parameter cubic (B=1, C=0) - -@item cubic2p_catmullrom -2-parameter cubic (B=0, C=1/2) - -@item cubic2p_b05c03 -2-parameter cubic (B=1/2, C=3/10) - -@item super -Supersampling - -@item lanczos -@end table - -@end table - -@section select -Select frames to pass in output. - @section treble Boost or cut treble (upper) frequencies of the audio using a two-pole @@ -6384,111 +6377,6 @@ drawbox=x=-t:y=0.5*(ih-iw/2.4)-t:w=iw+t*2:h=iw/2.4+t*2:t=2:c=red @end example @end itemize -@section drawgraph, adrawgraph - -Draw a graph using input video or audio metadata. - -It accepts the following parameters: - -@table @option -@item m1 -Set 1st frame metadata key from which metadata values will be used to draw a graph. - -@item fg1 -Set 1st foreground color expression. - -@item m2 -Set 2nd frame metadata key from which metadata values will be used to draw a graph. - -@item fg2 -Set 2nd foreground color expression. - -@item m3 -Set 3rd frame metadata key from which metadata values will be used to draw a graph. - -@item fg3 -Set 3rd foreground color expression. - -@item m4 -Set 4th frame metadata key from which metadata values will be used to draw a graph. - -@item fg4 -Set 4th foreground color expression. - -@item min -Set minimal value of metadata value. - -@item max -Set maximal value of metadata value. - -@item bg -Set graph background color. Default is white. - -@item mode -Set graph mode. - -Available values for mode is: -@table @samp -@item bar -@item dot -@item line -@end table - -Default is @code{line}. - -@item slide -Set slide mode. - -Available values for slide is: -@table @samp -@item frame -Draw new frame when right border is reached. - -@item replace -Replace old columns with new ones. - -@item scroll -Scroll from right to left. - -@item rscroll -Scroll from left to right. - -@item picture -Draw single picture. -@end table - -Default is @code{frame}. - -@item size -Set size of graph video. For the syntax of this option, check the -@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. -The default value is @code{900x256}. - -The foreground color expressions can use the following variables: -@table @option -@item MIN -Minimal value of metadata value. - -@item MAX -Maximal value of metadata value. - -@item VAL -Current metadata key value. -@end table - -The color is defined as 0xAABBGGRR. -@end table - -Example using metadata from @ref{signalstats} filter: -@example -signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255 -@end example - -Example using metadata from @ref{ebur128} filter: -@example -ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5 -@end example - @section drawgrid Draw a grid on the input image. @@ -9014,23 +8902,21 @@ The formula that generates the correction is: where @var{r_0} is halve of the image diagonal and @var{r_src} and @var{r_tgt} are the distances from the focal point in the source and target images, respectively. -@section loop, aloop +@section loop -Loop video frames or audio samples. +Loop video frames. -Those filters accepts the following options: +The filter accepts the following options: @table @option @item loop Set the number of loops. @item size -Set maximal size in number of frames for @code{loop} filter or maximal number -of samples in case of @code{aloop} filter. +Set maximal size in number of frames. @item start -Set first frame of loop for @code{loop} filter or first sample of loop in case -of @code{aloop} filter. +Set first frame of loop. @end table @anchor{lut3d} @@ -9334,173 +9220,63 @@ format=rgb24,mergeplanes=0x000102:yuv444p @end example @end itemize -@section metadata, ametadata +@section mpdecimate -Manipulate frame metadata. +Drop frames that do not differ greatly from the previous frame in +order to reduce frame rate. -This filter accepts the following options: +The main use of this filter is for very-low-bitrate encoding +(e.g. streaming over dialup modem), but it could in theory be used for +fixing movies that were inverse-telecined incorrectly. -@table @option -@item mode -Set mode of operation of the filter. +A description of the accepted options follows. -Can be one of the following: +@table @option +@item max +Set the maximum number of consecutive frames which can be dropped (if +positive), or the minimum interval between dropped frames (if +negative). If the value is 0, the frame is dropped unregarding the +number of previous sequentially dropped frames. -@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. +Default value is 0. -@item add -Add new metadata @code{key} and @code{value}. If key is already available -do nothing. +@item hi +@item lo +@item frac +Set the dropping threshold values. -@item modify -Modify value of already present key. +Values for @option{hi} and @option{lo} are for 8x8 pixel blocks and +represent actual pixel value differences, so a threshold of 64 +corresponds to 1 unit of difference for each pixel, or the same spread +out differently over the block. -@item delete -If @code{value} is set, delete only keys that have such value. -Otherwise, delete key. +A frame is a candidate for dropping if no 8x8 blocks differ by more +than a threshold of @option{hi}, and if no more than @option{frac} blocks (1 +meaning the whole image) differ by more than a threshold of @option{lo}. -@item print -Print key and its value if metadata was found. If @code{key} is not set print all -metadata values available in frame. +Default value for @option{hi} is 64*12, default value for @option{lo} is +64*5, and default value for @option{frac} is 0.33. @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 function -Which function to use when comparing metadata value and @code{value}. +@section negate -Can be one of following: +Negate input video. -@table @samp -@item same_str -Values are interpreted as strings, returns true if metadata value is same as @code{value}. +It accepts an integer in input; if non-zero it negates the +alpha component (if available). The default value in input is 0. -@item starts_with -Values are interpreted as strings, returns true if metadata value starts with -the @code{value} option string. +@section nnedi -@item less -Values are interpreted as floats, returns true if metadata value is less than @code{value}. +Deinterlace video using neural network edge directed interpolation. -@item equal -Values are interpreted as floats, returns true if @code{value} is equal with metadata value. +This filter accepts the following options: -@item greater -Values are interpreted as floats, returns true if metadata value is greater than @code{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. - -@item file -If specified in @code{print} mode, output is written to the named file. Instead of -plain filename any writable url can be specified. Filename ``-'' is a shorthand -for standard output. If @code{file} option is not set, output is written to the log -with AV_LOG_INFO loglevel. -@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 -signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)' -@end example -@item -Print silencedetect output to file @file{metadata.txt}. -@example -silencedetect,ametadata=mode=print:file=metadata.txt -@end example -@item -Direct all metadata to a pipe with file descriptor 4. -@example -metadata=mode=print:file='pipe\:4' -@end example -@end itemize - -@section mpdecimate - -Drop frames that do not differ greatly from the previous frame in -order to reduce frame rate. - -The main use of this filter is for very-low-bitrate encoding -(e.g. streaming over dialup modem), but it could in theory be used for -fixing movies that were inverse-telecined incorrectly. - -A description of the accepted options follows. - -@table @option -@item max -Set the maximum number of consecutive frames which can be dropped (if -positive), or the minimum interval between dropped frames (if -negative). If the value is 0, the frame is dropped unregarding the -number of previous sequentially dropped frames. - -Default value is 0. - -@item hi -@item lo -@item frac -Set the dropping threshold values. - -Values for @option{hi} and @option{lo} are for 8x8 pixel blocks and -represent actual pixel value differences, so a threshold of 64 -corresponds to 1 unit of difference for each pixel, or the same spread -out differently over the block. - -A frame is a candidate for dropping if no 8x8 blocks differ by more -than a threshold of @option{hi}, and if no more than @option{frac} blocks (1 -meaning the whole image) differ by more than a threshold of @option{lo}. - -Default value for @option{hi} is 64*12, default value for @option{lo} is -64*5, and default value for @option{frac} is 0.33. -@end table - - -@section negate - -Negate input video. - -It accepts an integer in input; if non-zero it negates the -alpha component (if available). The default value in input is 0. - -@section nnedi - -Deinterlace video using neural network edge directed interpolation. - -This filter accepts the following options: - -@table @option -@item weights -Mandatory option, without binary file filter can not work. -Currently file can be found here: -https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin +@table @option +@item weights +Mandatory option, without binary file filter can not work. +Currently file can be found here: +https://github.com/dubhater/vapoursynth-nnedi3/blob/master/src/nnedi3_weights.bin @item deint Set which frames to deinterlace, by default it is @code{all}. @@ -11062,9 +10838,9 @@ pixels will slow things down on a large logo. This filter uses the repeat_field flag from the Video ES headers and hard repeats fields based on its value. -@section reverse, areverse +@section reverse -Reverse a clip. +Reverse a video clip. Warning: This filter requires memory to buffer the entire clip, so trimming is suggested. @@ -11570,6 +11346,44 @@ If the specified expression is not valid, it is kept at its current value. @end table +@section scale_npp + +Use the NVIDIA Performance Primitives (libnpp) to perform scaling and/or pixel +format conversion on CUDA video frames. Setting the output width and height +works in the same way as for the @var{scale} filter. + +The following additional options are accepted: +@table @option +@item format +The pixel format of the output CUDA frames. If set to the string "same" (the +default), the input format will be kept. Note that automatic format negotiation +and conversion is not yet supported for hardware frames + +@item interp_algo +The interpolation algorithm used for resizing. One of the following: +@table @option +@item nn +Nearest neighbour. + +@item linear +@item cubic +@item cubic2p_bspline +2-parameter cubic (B=1, C=0) + +@item cubic2p_catmullrom +2-parameter cubic (B=0, C=1/2) + +@item cubic2p_b05c03 +2-parameter cubic (B=1/2, C=3/10) + +@item super +Supersampling + +@item lanczos +@end table + +@end table + @section scale2ref Scale (resize) the input video, based on a reference video. @@ -15277,6 +15091,111 @@ do not have exactly the same duration in the first file. @end itemize +@section drawgraph, adrawgraph + +Draw a graph using input video or audio metadata. + +It accepts the following parameters: + +@table @option +@item m1 +Set 1st frame metadata key from which metadata values will be used to draw a graph. + +@item fg1 +Set 1st foreground color expression. + +@item m2 +Set 2nd frame metadata key from which metadata values will be used to draw a graph. + +@item fg2 +Set 2nd foreground color expression. + +@item m3 +Set 3rd frame metadata key from which metadata values will be used to draw a graph. + +@item fg3 +Set 3rd foreground color expression. + +@item m4 +Set 4th frame metadata key from which metadata values will be used to draw a graph. + +@item fg4 +Set 4th foreground color expression. + +@item min +Set minimal value of metadata value. + +@item max +Set maximal value of metadata value. + +@item bg +Set graph background color. Default is white. + +@item mode +Set graph mode. + +Available values for mode is: +@table @samp +@item bar +@item dot +@item line +@end table + +Default is @code{line}. + +@item slide +Set slide mode. + +Available values for slide is: +@table @samp +@item frame +Draw new frame when right border is reached. + +@item replace +Replace old columns with new ones. + +@item scroll +Scroll from right to left. + +@item rscroll +Scroll from left to right. + +@item picture +Draw single picture. +@end table + +Default is @code{frame}. + +@item size +Set size of graph video. For the syntax of this option, check the +@ref{video size syntax,,"Video size" section in the ffmpeg-utils manual,ffmpeg-utils}. +The default value is @code{900x256}. + +The foreground color expressions can use the following variables: +@table @option +@item MIN +Minimal value of metadata value. + +@item MAX +Maximal value of metadata value. + +@item VAL +Current metadata key value. +@end table + +The color is defined as 0xAABBGGRR. +@end table + +Example using metadata from @ref{signalstats} filter: +@example +signalstats,drawgraph=lavfi.signalstats.YAVG:min=0:max=255 +@end example + +Example using metadata from @ref{ebur128} filter: +@example +ebur128=metadata=1,adrawgraph=lavfi.r128.M:min=-120:max=5 +@end example + @anchor{ebur128} @section ebur128 @@ -15433,6 +15352,116 @@ select='if(gt(random(0), 0.2), 1, 2)':n=2 [tmp], boxblur=2:2, [tmp] interleave @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 function +Which function to use when comparing metadata value and @code{value}. + +Can be one of following: + +@table @samp +@item same_str +Values are interpreted as strings, returns true if metadata value is same as @code{value}. + +@item starts_with +Values are interpreted as strings, returns true if metadata value starts with +the @code{value} option string. + +@item less +Values are interpreted as floats, returns true if metadata value is less than @code{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 metadata value is greater than @code{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. + +@item file +If specified in @code{print} mode, output is written to the named file. Instead of +plain filename any writable url can be specified. Filename ``-'' is a shorthand +for standard output. If @code{file} option is not set, output is written to the log +with AV_LOG_INFO loglevel. +@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 +signalstats,metadata=print:key=lavfi.signalstats.YDIF:value=0:function=expr:expr='between(VALUE1,0,1)' +@end example +@item +Print silencedetect output to file @file{metadata.txt}. +@example +silencedetect,ametadata=mode=print:file=metadata.txt +@end example +@item +Direct all metadata to a pipe with file descriptor 4. +@example +metadata=mode=print:file='pipe\:4' +@end example +@end itemize + @section perms, aperms Set read/write permissions for the output frames. _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog