Commit | Line | Data |
---|---|---|
1f09ab5e SS |
1 | \input texinfo @c -*- texinfo -*- |
2 | ||
3 | @settitle Video Filter Documentation | |
4 | @titlepage | |
5 | @sp 7 | |
6 | @center @titlefont{Video Filter Documentation} | |
7 | @sp 3 | |
8 | @end titlepage | |
9 | ||
10 | ||
11 | @chapter Introduction | |
12 | ||
13 | Libavfilter is the filtering API of FFmpeg. It is the substitute of the | |
14 | now deprecated 'vhooks' and started as a Google Summer of Code project. | |
15 | ||
16 | Integrating libavfilter into the main FFmpeg repository is a work in | |
17 | progress. If you wish to try the unfinished development code of | |
18 | libavfilter then check it out from the libavfilter repository into | |
19 | some directory of your choice by: | |
20 | ||
21 | @example | |
22 | svn checkout svn://svn.ffmpeg.org/soc/libavfilter | |
23 | @end example | |
24 | ||
25 | And then read the README file in the top directory to learn how to | |
26 | integrate it into ffmpeg and ffplay. | |
27 | ||
28 | But note that there may still be serious bugs in the code and its API | |
29 | and ABI should not be considered stable yet! | |
30 | ||
31 | In libavfilter, it is possible for filters to have multiple inputs and | |
32 | multiple outputs. | |
33 | To illustrate the sorts of things that are possible, we can | |
34 | use a complex filter graph. For example, the following one: | |
35 | ||
36 | @example | |
37 | input --> split --> fifo -----------------------> overlay --> output | |
38 | | ^ | |
39 | | | | |
40 | +------> fifo --> crop --> vflip --------+ | |
41 | @end example | |
42 | ||
43 | splits the stream in two streams, sends one stream through the crop filter | |
44 | and the vflip filter before merging it back with the other stream by | |
45 | overlaying it on top. You can use the following command to achieve this: | |
46 | ||
47 | @example | |
48 | ./ffmpeg -i in.avi -s 240x320 -vfilters "[in] split [T1], fifo, [T2] overlay= 0:240 [out]; [T1] fifo, crop=0:0:-1:240, vflip [T2] | |
49 | @end example | |
50 | ||
51 | where input_video.avi has a vertical resolution of 480 pixels. The | |
52 | result will be that in output the top half of the video is mirrored | |
53 | onto the bottom half. | |
54 | ||
55 | Video filters are loaded using the @var{-vfilters} option passed to | |
56 | ffmpeg or to ffplay. Filters in the same linear chain are separated by | |
57 | commas. In our example, @var{split, fifo, overlay} are in one linear | |
58 | chain, and @var{fifo, crop, vflip} are in another. The points where | |
59 | the linear chains join are labeled by names enclosed in square | |
60 | brackets. In our example, that is @var{[T1]} and @var{[T2]}. The magic | |
61 | labels @var{[in]} and @var{[out]} are the points where video is input | |
62 | and output. | |
63 | ||
64 | Some filters take in input a list of parameters: they are specified | |
65 | after the filter name and an equal sign, and are separated each other | |
66 | by a semicolon. | |
67 | ||
68 | There exist so-called @var{source filters} that do not have a video | |
69 | input, and we expect in the future some @var{sink filters} that will | |
70 | not have video output. | |
71 | ||
72 | @chapter Available video filters | |
73 | ||
74 | When you configure your FFmpeg build, you can disable any of the | |
75 | existing video filters. | |
76 | The configure output will show the video filters included in your | |
77 | build. | |
78 | ||
79 | Below is a description of the currently available video filters. | |
80 | ||
7b018b1d SS |
81 | @section null |
82 | ||
83 | Pass the source unchanged to the output. | |
84 | ||
1f09ab5e | 85 | @bye |