Legend:

FFmpeg has access to many filters and more are added on a regular basis. To see what filters are available with your build see ''ffmpeg -filters''.

3

FFmpeg has access to many filters and more are added on a regular basis. To see what filters are available with your build see `ffmpeg -filters`.

4

4

5

5

== Documentation ==

6

6

7

Refer to the [http://ffmpeg.org/ffmpeg-filters.html FFmpeg documentation] for each filters' documentation and examples. This wiki page is for user contributed examples and tips.

8

9

Contributions to this page are encouraged.

7

Refer to the [http://ffmpeg.org/ffmpeg-filters.html FFmpeg filters documentation] for more information and examples for each filter. This wiki page is for user contributed examples and tips, and contributions to this page are encouraged.

''iw'' is input width. In this example the input width is 640. 640/2 = 320. The ''-1'' tells the scale filter to preserve the aspect ratio of the output, so in this example the scale filter will choose a value of 240. See the [http://ffmpeg.org/ffmpeg-filters.html#scale FFmpeg documentation] for additional information.

16

`iw` is input width. In this example the input width is 640. 640/2 = 320. The `-1` tells the scale filter to preserve the aspect ratio of the output, so in this example the scale filter will choose a value of 240. See the [http://ffmpeg.org/ffmpeg-filters.html#scale FFmpeg documentation] for additional information.

19

17

20

18

=== Speed up your video ===

21

19

22

See [[How to speed up / slow down a video]] for syntax (the setpts filter)/time lapse etc.

20

See [[How to speed up / slow down a video]] for examples.

23

21

24

22

=== Filtergraph,Chain,Filter relationship ===

25

What follows the -vf in an ffmpeg command line is a Filtergraph description. This filtergraph may contain a number of chains, each of which may contain a number of filters.

23

What follows the `-vf` in an ffmpeg command line is a [http://ffmpeg.org/ffmpeg-filters.html#Filtergraph-description filtergraph] description. This filtergraph may contain a number of chains, each of which may contain a number of filters.

26

24

27

25

Whilst a full filtergraph description can be complicated, it is possible to simplify it for simpler graphs provided ambiguity is avoided.

Remembering that filters in a chain are separated by commas "," chains by a semicolon ";" and that if an input or output is not specified it is assumed to come from the preceding or sent to the following item in the chain.

Here four inputs are filtered together using the -filter_complex option. In this case all of the inputs are "-f lavfi -i testsrc" but could be other inputs. Within the filtergraph the first input is padded to the right and bottom by double its height and the other three inputs are individually filtered using hflip, negate, and edgedetect. The overlay filter is then used multiple times to arrange of latter three inputs on top of the first one. The offsets used in the overlay filter arrange the inputs into a grid shape.

43

Here four inputs are filtered together using the `-filter_complex` option. In this case all of the inputs are `-f lavfi -i testsrc` but could be other inputs. Within the filtergraph the first input is padded to the right and bottom by double its height and the other three inputs are individually filtered using [http://ffmpeg.org/ffmpeg-filters.html#hflip hflip], [http://ffmpeg.org/ffmpeg-filters.html#negate negate], and [http://ffmpeg.org/ffmpeg-filters.html#edgedetect edgedetect]. The [http://ffmpeg.org/ffmpeg-filters.html#overlay-1 overlay] video filter is then used multiple times to arrange of latter three inputs on top of the first one. The offsets used in the overlay filter arrange the inputs into a grid shape.

Note that the examples given in the documentation mix and match the use of "full quoting" and "\" escaping, and that use of unusual shells may upset escaping.

61

Note that the examples given in the documentation mix and match the use of "full quoting" and "\" escaping, and that use of unusual shells may upset escaping. See [http://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping Notes on filtergraph escaping] for more information.

62

64

63

=== Burnt in Timecode ===

65

PAL 25fps non drop frame

64

Using the [http://ffmpeg.org/ffmpeg-filters.html#drawtext-1 drawtext] video filter.

Filters bundled with libavfilter as of 3.56.101 (as configured with `--enable-gpl`). Filters relying on external libraries, such as frei0r, are not listed here. remember, you can get documentation for each on the ffmpeg documentation page, for instance [http://ffmpeg.org/ffmpeg-filters.html#aformat aformat's] documentation, etc.

109

{{{

110

abuffer |->A Buffer audio frames, and make them accessible to the filterchain.

111

abuffersink A->| Buffer audio frames, and make them available to the end of the filter graph.

super2xsai V->V Scale the input by 2x using the Super2xSaI pixel art algorithm.

234

swapuv V->V Swap U and V components.

235

telecine V->V Apply a telecine pattern.

236

testsrc |->V Generate test pattern.

237

thumbnail V->V Select the most representative frame in a given sequence of consecutive frames.

238

tile V->V Tile several successive frames together.

239

tinterlace V->V Perform temporal field interlacing.

240

transpose V->V Transpose input video.

241

treble A->A Boost or cut upper frequencies.

242

unsharp V->V Sharpen or blur the input video.

243

vflip V->V Flip the input video vertically.

244

volume A->A Change input volume.

245

volumedetect A->A Detect audio volume.

246

yadif V->V Deinterlace the input image.

109

Filters bundled with libavfilter as of 3.82.100 (as configured with `--enable-gpl`). Filters relying on external libraries, such as frei0r, are not listed here. See [http://ffmpeg.org/ffmpeg-filters.html FFmpeg filters documentation] for more information and examples for each filter.