You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

373 lines
9.5KB

  1. @chapter Audio Filters
  2. @c man begin AUDIO FILTERS
  3. When you configure your FFmpeg build, you can disable any of the
  4. existing filters using --disable-filters.
  5. The configure output will show the audio filters included in your
  6. build.
  7. Below is a description of the currently available audio filters.
  8. @section anull
  9. Pass the audio source unchanged to the output.
  10. @c man end AUDIO FILTERS
  11. @chapter Video Filters
  12. @c man begin VIDEO FILTERS
  13. When you configure your FFmpeg build, you can disable any of the
  14. existing filters using --disable-filters.
  15. The configure output will show the video filters included in your
  16. build.
  17. Below is a description of the currently available video filters.
  18. @section crop
  19. Crop the input video to @var{x}:@var{y}:@var{width}:@var{height}.
  20. @example
  21. ./ffmpeg -i in.avi -vf "crop=0:0:0:240" out.avi
  22. @end example
  23. @var{x} and @var{y} specify the position of the top-left corner of the
  24. output (non-cropped) area.
  25. The default value of @var{x} and @var{y} is 0.
  26. The @var{width} and @var{height} parameters specify the width and height
  27. of the output (non-cropped) area.
  28. A value of 0 is interpreted as the maximum possible size contained in
  29. the area delimited by the top-left corner at position x:y.
  30. For example the parameters:
  31. @example
  32. "crop=100:100:0:0"
  33. @end example
  34. will delimit the rectangle with the top-left corner placed at position
  35. 100:100 and the right-bottom corner corresponding to the right-bottom
  36. corner of the input image.
  37. The default value of @var{width} and @var{height} is 0.
  38. @section fifo
  39. Buffer input images and send them when they are requested.
  40. This filter is mainly useful when auto-inserted by the libavfilter
  41. framework.
  42. The filter does not take parameters.
  43. @section format
  44. Convert the input video to one of the specified pixel formats.
  45. Libavfilter will try to pick one that is supported for the input to
  46. the next filter.
  47. The filter accepts a list of pixel format names, separated by ``:'',
  48. for example ``yuv420p:monow:rgb24''.
  49. The following command:
  50. @example
  51. ./ffmpeg -i in.avi -vf "format=yuv420p" out.avi
  52. @end example
  53. will convert the input video to the format ``yuv420p''.
  54. @section hflip
  55. Flip the input video horizontally.
  56. For example to horizontally flip the video in input with
  57. @file{ffmpeg}:
  58. @example
  59. ffmpeg -i in.avi -vf "hflip" out.avi
  60. @end example
  61. @section noformat
  62. Force libavfilter not to use any of the specified pixel formats for the
  63. input to the next filter.
  64. The filter accepts a list of pixel format names, separated by ``:'',
  65. for example ``yuv420p:monow:rgb24''.
  66. The following command:
  67. @example
  68. ./ffmpeg -i in.avi -vf "noformat=yuv420p, vflip" out.avi
  69. @end example
  70. will make libavfilter use a format different from ``yuv420p'' for the
  71. input to the vflip filter.
  72. @section null
  73. Pass the video source unchanged to the output.
  74. @section pad
  75. Add paddings to the input image, and places the original input at the
  76. given coordinates @var{x}, @var{y}.
  77. It accepts the following parameters:
  78. @var{width}:@var{height}:@var{x}:@var{y}:@var{color}.
  79. Follows the description of the accepted parameters.
  80. @table @option
  81. @item width, height
  82. Specify the size of the output image with the paddings added. If the
  83. value for @var{width} or @var{height} is 0, the corresponding input size
  84. is used for the output.
  85. The default value of @var{width} and @var{height} is 0.
  86. @item x, y
  87. Specify the offsets where to place the input image in the padded area
  88. with respect to the top/left border of the output image.
  89. The default value of @var{x} and @var{y} is 0.
  90. @item color
  91. Specify the color of the padded area, it can be the name of a color
  92. (case insensitive match) or a 0xRRGGBB[AA] sequence.
  93. The default value of @var{color} is ``black''.
  94. @end table
  95. @section pixdesctest
  96. Pixel format descriptor test filter, mainly useful for internal
  97. testing. The output video should be equal to the input video.
  98. For example:
  99. @example
  100. format=monow, pixdesctest
  101. @end example
  102. can be used to test the monowhite pixel format descriptor definition.
  103. @section scale
  104. Scale the input video to @var{width}:@var{height} and/or convert the image format.
  105. For example the command:
  106. @example
  107. ./ffmpeg -i in.avi -vf "scale=200:100" out.avi
  108. @end example
  109. will scale the input video to a size of 200x100.
  110. If the input image format is different from the format requested by
  111. the next filter, the scale filter will convert the input to the
  112. requested format.
  113. If the value for @var{width} or @var{height} is 0, the respective input
  114. size is used for the output.
  115. If the value for @var{width} or @var{height} is -1, the scale filter will
  116. use, for the respective output size, a value that maintains the aspect
  117. ratio of the input image.
  118. The default value of @var{width} and @var{height} is 0.
  119. @section slicify
  120. Pass the images of input video on to next video filter as multiple
  121. slices.
  122. @example
  123. ./ffmpeg -i in.avi -vf "slicify=32" out.avi
  124. @end example
  125. The filter accepts the slice height as parameter. If the parameter is
  126. not specified it will use the default value of 16.
  127. Adding this in the beginning of filter chains should make filtering
  128. faster due to better use of the memory cache.
  129. @section unsharp
  130. Sharpen or blur the input video.
  131. It accepts the following parameters:
  132. @var{luma_msize_x}:@var{luma_msize_y}:@var{luma_amount}:@var{chroma_msize_x}:@var{chroma_msize_y}:@var{chroma_amount}
  133. Negative values for the amount will blur the input video, while positive
  134. values will sharpen. All parameters are optional and default to the
  135. equivalent of the string '5:5:1.0:0:0:0.0'.
  136. @table @option
  137. @item luma_msize_x
  138. Set the luma matrix horizontal size. It can be an integer between 3
  139. and 13, default value is 5.
  140. @item luma_msize_y
  141. Set the luma matrix vertical size. It can be an integer between 3
  142. and 13, default value is 5.
  143. @item luma_amount
  144. Set the luma effect strength. It can be a float number between -2.0
  145. and 5.0, default value is 1.0.
  146. @item chroma_msize_x
  147. Set the chroma matrix horizontal size. It can be an integer between 3
  148. and 13, default value is 0.
  149. @item chroma_msize_y
  150. Set the chroma matrix vertical size. It can be an integer between 3
  151. and 13, default value is 0.
  152. @item luma_amount
  153. Set the chroma effect strength. It can be a float number between -2.0
  154. and 5.0, default value is 0.0.
  155. @end table
  156. @example
  157. # Strong luma sharpen effect parameters
  158. unsharp=7:7:2.5
  159. # Strong blur of both luma and chroma parameters
  160. unsharp=7:7:-2:7:7:-2
  161. # Use the default values with @command{ffmpeg}
  162. ./ffmpeg -i in.avi -vf "unsharp" out.mp4
  163. @end example
  164. @section vflip
  165. Flip the input video vertically.
  166. @example
  167. ./ffmpeg -i in.avi -vf "vflip" out.avi
  168. @end example
  169. @c man end VIDEO FILTERS
  170. @chapter Video Sources
  171. @c man begin VIDEO SOURCES
  172. Below is a description of the currently available video sources.
  173. @section buffer
  174. Buffer video frames, and make them available to the filter chain.
  175. This source is mainly intended for a programmatic use, in particular
  176. through the interface defined in @file{libavfilter/vsrc_buffer.h}.
  177. It accepts the following parameters:
  178. @var{width}:@var{height}:@var{pix_fmt_string}
  179. All the parameters need to be explicitely defined.
  180. Follows the list of the accepted parameters.
  181. @table @option
  182. @item width, height
  183. Specify the width and height of the buffered video frames.
  184. @item pix_fmt_string
  185. A string representing the pixel format of the buffered video frames.
  186. It may be a number corresponding to a pixel format, or a pixel format
  187. name.
  188. @end table
  189. For example:
  190. @example
  191. buffer=320:240:yuv410p
  192. @end example
  193. will instruct the source to accept video frames with size 320x240 and
  194. with format "yuv410p". Since the pixel format with name "yuv410p"
  195. corresponds to the number 6 (check the enum PixelFormat definition in
  196. @file{libavutil/pixfmt.h}), this example corresponds to:
  197. @example
  198. buffer=320:240:6
  199. @end example
  200. @section color
  201. Provide an uniformly colored input.
  202. It accepts the following parameters:
  203. @var{color}:@var{frame_size}:@var{frame_rate}
  204. Follows the description of the accepted parameters.
  205. @table @option
  206. @item color
  207. Specify the color of the source. It can be the name of a color (case
  208. insensitive match) or a 0xRRGGBB[AA] sequence, possibly followed by an
  209. alpha specifier. The default value is "black".
  210. @item frame_size
  211. Specify the size of the sourced video, it may be a string of the form
  212. @var{width}x@var{heigth}, or the name of a size abbreviation. The
  213. default value is "320x240".
  214. @item frame_rate
  215. Specify the frame rate of the sourced video, as the number of frames
  216. generated per second. It has to be a string in the format
  217. @var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
  218. number or a valid video frame rate abbreviation. The default value is
  219. "25".
  220. @end table
  221. For example the following graph description will generate a red source
  222. with an opacity of 0.2, with size "qcif" and a frame rate of 10
  223. frames per second, which will be overlayed over the source connected
  224. to the pad with identifier "in".
  225. @example
  226. "color=red@@0.2:qcif:10 [color]; [in][color] overlay [out]"
  227. @end example
  228. @section nullsrc
  229. Null video source, never return images. It is mainly useful as a
  230. template and to be employed in analysis / debugging tools.
  231. It accepts as optional parameter a string of the form
  232. @var{width}:@var{height}, where @var{width} and @var{height} specify the size of
  233. the configured source.
  234. The default values of @var{width} and @var{height} are respectively 352
  235. and 288 (corresponding to the CIF size format).
  236. @c man end VIDEO SOURCES
  237. @chapter Video Sinks
  238. @c man begin VIDEO SINKS
  239. Below is a description of the currently available video sinks.
  240. @section nullsink
  241. Null video sink, do absolutely nothing with the input video. It is
  242. mainly useful as a template and to be employed in analysis / debugging
  243. tools.
  244. @c man end VIDEO SINKS