X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=doc%2Ffilters.texi;h=93fdcec39fc2896d015505489211d412e2726a28;hb=77a72d348519584bac1499210619ea38adead130;hp=916655ab1a17734cf82d941fc752938371a5e775;hpb=faa1cb50ed7d2258932475ff571b7662f0089514;p=ffmpeg diff --git a/doc/filters.texi b/doc/filters.texi index 916655ab1a1..93fdcec39fc 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2016,13 +2016,13 @@ drawtext="fontsize=60:fontfile=FreeSerif.ttf:fontcolor=green:text=g:x=(w-max_gly @item Show text for 1 second every 3 seconds: @example -drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\\,3)\\,1):text='blink'" +drawtext="fontfile=FreeSerif.ttf:fontcolor=white:x=100:y=x/dar:draw=lt(mod(t\,3)\,1):text='blink'" @end example @item Use fontconfig to set the font. Note that the colons need to be escaped. @example -drawtext='fontfile=Linux Libertine O-40\\:style=Semibold:text=FFmpeg' +drawtext='fontfile=Linux Libertine O-40\:style=Semibold:text=FFmpeg' @end example @end itemize @@ -2186,6 +2186,9 @@ This filter accepts the following named parameters: @item fps Desired output framerate. +@item round +Rounding method. The default is @code{near}. + @end table @section framestep @@ -2823,7 +2826,7 @@ ffmpeg -i input -i logo1 -i logo2 -filter_complex # add a transparent color layer on top of the main video, # WxH specifies the size of the main input to the overlay filter -color=red@.3:WxH [over]; [in][over] overlay [out] +color=red@@.3:WxH [over]; [in][over] overlay [out] # play an original video and a filtered version (here with the deshake filter) # side by side @@ -3250,16 +3253,34 @@ Keep in mind that the sample aspect ratio set by the @code{setsar} filter may be changed by later filters in the filterchain, e.g. if another "setsar" or a "setdar" filter is applied. -The @code{setdar} and @code{setsar} filters accept a parameter string -which represents the wanted aspect ratio. The parameter can -be a floating point number string, an expression, or a string of the form -@var{num}:@var{den}, where @var{num} and @var{den} are the numerator -and denominator of the aspect ratio. If the parameter is not -specified, it is assumed the value "0:1". +The @code{setdar} and @code{setsar} filters accept a string in the +form @var{num}:@var{den} expressing an aspect ratio, or the following +named options, expressed as a sequence of @var{key}=@var{value} pairs, +separated by ":". + +@table @option +@item max +Set the maximum integer value to use for expressing numerator and +denominator when reducing the expressed aspect ratio to a rational. +Default value is @code{100}. + +@item r, ratio: +Set the aspect ratio used by the filter. + +The parameter can be a floating point number string, an expression, or +a string of the form @var{num}:@var{den}, where @var{num} and +@var{den} are the numerator and denominator of the aspect ratio. If +the parameter is not specified, it is assumed the value "0". +In case the form "@var{num}:@var{den}" the @code{:} character should +be escaped. +@end table + +If the keys are omitted in the named options list, the specifed values +are assumed to be @var{ratio} and @var{max} in that order. For example to change the display aspect ratio to 16:9, specify: @example -setdar=16:9 +setdar='16:9' @end example The example above is equivalent to: @@ -3269,7 +3290,13 @@ setdar=1.77777 To change the sample aspect ratio to 10:11, specify: @example -setsar=10:11 +setsar='10:11' +@end example + +To set a display aspect ratio of 16:9, and specify a maximum integer value of +1000 in the aspect ratio reduction, use the command: +@example +setdar=ratio='16:9':max=1000 @end example @section setfield