Revision 3275ac6a

View differences:

Makefile
108 108

  
109 109
$(HTMLPAGES) $(MANPAGES): doc/fftools-common-opts.texi
110 110

  
111
doc/ffmpeg.pod doc/ffmpeg-doc.html: doc/filters.texi
112
doc/ffplay.pod doc/ffplay-doc.html: doc/filters.texi
113

  
111 114
doc/%.html: TAG = HTML
112 115
doc/%.html: doc/%.texi
113 116
	$(M)cd doc && texi2html -monolithic -number $(<:doc/%=%)
doc/ffmpeg-doc.texi
290 290
@item -vlang @var{code}
291 291
Set the ISO 639 language code (3 letters) of the current video stream.
292 292

  
293
@item -vf @var{filter_graph}
294
@var{filter_graph} is a description of the filter graph to apply to
295
the input video.
296
Use the option "-filters" to show all the available filters (including
297
also sources and sinks).
298

  
293 299
@end table
294 300

  
295 301
@section Advanced Video Options
......
946 952
file to which you want to add them.
947 953
@c man end EXAMPLES
948 954

  
955
@include filters.texi
956

  
949 957
@ignore
950 958

  
951 959
@setfilename ffmpeg
doc/ffplay-doc.texi
56 56
Set window title (default is the input filename).
57 57
@item -loop @var{number}
58 58
Loops movie playback <number> times. 0 means forever.
59
@item -vf @var{filter_graph}
60
@var{filter_graph} is a description of the filter graph to apply to
61
the input video.
62
Use the option "-filters" to show all the available filters (including
63
also sources and sinks).
64

  
59 65
@end table
60 66

  
61 67
@section Advanced options
......
141 147

  
142 148
@c man end
143 149

  
150
@include filters.texi
151

  
144 152
@ignore
145 153

  
146 154
@setfilename ffplay
doc/filters.texi
1
@chapter Video Filters
2
@c man begin VIDEO FILTERS
3

  
4
When you configure your FFmpeg build, you can disable any of the
5
existing filters using --disable-filters.
6
The configure output will show the video filters included in your
7
build.
8

  
9
Below is a description of the currently available video filters.
10

  
11
@section crop
12

  
13
Crop the input video to @var{x}:@var{y}:@var{width}:@var{height}.
14

  
15
@example
16
./ffmpeg -i in.avi -vf "crop=0:0:0:240" out.avi
17
@end example
18

  
19
@var{x} and @var{y} specify the position of the top-left corner of the
20
output (non-cropped) area.
21

  
22
The default value of @var{x} and @var{y} is 0.
23

  
24
The @var{width} and @var{height} parameters specify the width and height
25
of the output (non-cropped) area.
26

  
27
A value of 0 is interpreted as the maximum possible size contained in
28
the area delimited by the top-left corner at position x:y.
29

  
30
For example the parameters:
31

  
32
@example
33
"crop=100:100:0:0"
34
@end example
35

  
36
will delimit the rectangle with the top-left corner placed at position
37
100:100 and the right-bottom corner corresponding to the right-bottom
38
corner of the input image.
39

  
40
The default value of @var{width} and @var{height} is 0.
41

  
42
@section format
43

  
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

  
48
The filter accepts a list of pixel format names, separated by ``:'',
49
for example ``yuv420p:monow:rgb24''.
50

  
51
The following command:
52

  
53
@example
54
./ffmpeg -i in.avi -vf "format=yuv420p" out.avi
55
@end example
56

  
57
will convert the input video to the format ``yuv420p''.
58

  
59
@section noformat
60

  
61
Force libavfilter not to use any of the specified pixel formats for the
62
input to the next filter.
63

  
64
The filter accepts a list of pixel format names, separated by ``:'',
65
for example ``yuv420p:monow:rgb24''.
66

  
67
The following command:
68

  
69
@example
70
./ffmpeg -i in.avi -vf "noformat=yuv420p, vflip" out.avi
71
@end example
72

  
73
will make libavfilter use a format different from ``yuv420p'' for the
74
input to the vflip filter.
75

  
76
@section null
77

  
78
Pass the source unchanged to the output.
79

  
80
@section pad
81

  
82
Add paddings to the input image, and places the original input at the
83
given coordinates @var{x}, @var{y}.
84

  
85
It accepts the following parameters:
86
@var{width}:@var{height}:@var{x}:@var{y}:@var{color}.
87

  
88
Follows the description of the accepted parameters.
89

  
90
@table @option
91
@item width, height
92

  
93
Specify the size of the output image with the paddings added. If the
94
value for @var{width} or @var{height} is 0, the corresponding input size
95
is used for the output.
96

  
97
The default value of @var{width} and @var{height} is 0.
98

  
99
@item x, y
100

  
101
Specify the offsets where to place the input image in the padded area
102
with respect to the top/left border of the output image.
103

  
104
The default value of @var{x} and @var{y} is 0.
105

  
106
@item color
107

  
108
Specify the color of the padded area, it can be the name of a color
109
(case insensitive match) or a 0xRRGGBB[AA] sequence.
110

  
111
The default value of @var{color} is ``black''.
112

  
113
@end table
114

  
115
@section scale
116

  
117
Scale the input video to @var{width}:@var{height} and/or convert the image format.
118

  
119
For example the command:
120

  
121
@example
122
./ffmpeg -i in.avi -vf "scale=200:100" out.avi
123
@end example
124

  
125
will scale the input video to a size of 200x100.
126

  
127
If the input image format is different from the format requested by
128
the next filter, the scale filter will convert the input to the
129
requested format.
130

  
131
If the value for @var{width} or @var{height} is 0, the respective input
132
size is used for the output.
133

  
134
If the value for @var{width} or @var{height} is -1, the scale filter will
135
use, for the respective output size, a value that maintains the aspect
136
ratio of the input image.
137

  
138
The default value of @var{width} and @var{height} is 0.
139

  
140
@section slicify
141

  
142
Pass the images of input video on to next video filter as multiple
143
slices.
144

  
145
@example
146
./ffmpeg -i in.avi -vf "slicify=32" out.avi
147
@end example
148

  
149
The filter accepts the slice height as parameter. If the parameter is
150
not specified it will use the default value of 16.
151

  
152
Adding this in the beginning of filter chains should make filtering
153
faster due to better use of the memory cache.
154

  
155
@section unsharp
156

  
157
Sharpen or blur the input video. It accepts the following parameters:
158

  
159
Negative values for the amount will blur the input video, while positive
160
values will sharpen. All parameters are optional and default to the
161
equivalent of the string '5:5:1.0:0:0:0.0'.
162

  
163
@table @option
164

  
165
@item luma_msize_x
166
Set the luma matrix horizontal size. It can be an integer between 3
167
and 13, default value is 5.
168

  
169
@item luma_msize_y
170
Set the luma matrix vertical size. It can be an integer between 3
171
and 13, default value is 5.
172

  
173
@item luma_amount
174
Set the luma effect strength. It can be a float number between -2.0
175
and 5.0, default value is 1.0.
176

  
177
@item chroma_msize_x
178
Set the chroma matrix horizontal size. It can be an integer between 3
179
and 13, default value is 0.
180

  
181
@item chroma_msize_y
182
Set the chroma matrix vertical size. It can be an integer between 3
183
and 13, default value is 0.
184

  
185
@item luma_amount
186
Set the chroma effect strength. It can be a float number between -2.0
187
and 5.0, default value is 0.0.
188

  
189
@end table
190

  
191
@example
192
# Strong luma sharpen effect parameters
193
unsharp=7:7:2.5
194

  
195
# Strong blur of both luma and chroma parameters
196
unsharp=7:7:-2:7:7:-2
197

  
198
# Use the default values with @command{ffmpeg}
199
./ffmpeg -i in.avi -vf "unsharp" out.mp4
200
@end example
201

  
202
@section vflip
203

  
204
Flip the input video vertically.
205

  
206
@example
207
./ffmpeg -i in.avi -vf "vflip" out.avi
208
@end example
209

  
210
@c man end VIDEO FILTERS
211

  
212
@chapter Video Sources
213
@c man begin VIDEO SOURCES
214

  
215
Below is a description of the currently available video sources.
216

  
217
@section nullsrc
218

  
219
Null video source, never return images. It is mainly useful as a
220
template and to be employed in analysis / debugging tools.
221

  
222
It accepts as optional parameter a string of the form
223
@var{width}:@var{height}, where @var{width} and @var{height} specify the size of
224
the configured source.
225

  
226
The default values of @var{width} and @var{height} are respectively 352
227
and 288 (corresponding to the CIF size format).
228

  
229
@c man end VIDEO SOURCES
230

  
231
@chapter Video Sinks
232
@c man begin VIDEO SINKS
233

  
234
Below is a description of the currently available video sinks.
235

  
236
@section nullsink
237

  
238
Null video sink, do absolutely nothing with the input video. It is
239
mainly useful as a template and to be employed in analysis / debugging
240
tools.
241

  
242
@c man end VIDEO SINKS
243

  
doc/libavfilter.texi
99 99
can be used to create and display an image representing the graph
100 100
described by the @var{GRAPH_DESCRIPTION} string.
101 101

  
102
@chapter Available video filters
103

  
104
When you configure your FFmpeg build, you can disable any of the
105
existing video filters.
106
The configure output will show the video filters included in your
107
build.
108

  
109
Below is a description of the currently available video filters.
110

  
111
@section crop
112

  
113
Crop the input video to @var{x}:@var{y}:@var{width}:@var{height}.
114

  
115
@example
116
./ffmpeg -i in.avi -vf "crop=0:0:0:240" out.avi
117
@end example
118

  
119
@var{x} and @var{y} specify the position of the top-left corner of the
120
output (non-cropped) area.
121

  
122
The default value of @var{x} and @var{y} is 0.
123

  
124
The @var{width} and @var{height} parameters specify the width and height
125
of the output (non-cropped) area.
126

  
127
A value of 0 is interpreted as the maximum possible size contained in
128
the area delimited by the top-left corner at position x:y.
129

  
130
For example the parameters:
131

  
132
@example
133
"crop=100:100:0:0"
134
@end example
135

  
136
will delimit the rectangle with the top-left corner placed at position
137
100:100 and the right-bottom corner corresponding to the right-bottom
138
corner of the input image.
139

  
140
The default value of @var{width} and @var{height} is 0.
141

  
142
@section format
143

  
144
Convert the input video to one of the specified pixel formats.
145
Libavfilter will try to pick one that is supported for the input to
146
the next filter.
147

  
148
The filter accepts a list of pixel format names, separated by ``:'',
149
for example ``yuv420p:monow:rgb24''.
150

  
151
The following command:
152

  
153
@example
154
./ffmpeg -i in.avi -vf "format=yuv420p" out.avi
155
@end example
156

  
157
will convert the input video to the format ``yuv420p''.
158

  
159
@section noformat
160

  
161
Force libavfilter not to use any of the specified pixel formats for the
162
input to the next filter.
163

  
164
The filter accepts a list of pixel format names, separated by ``:'',
165
for example ``yuv420p:monow:rgb24''.
166

  
167
The following command:
168

  
169
@example
170
./ffmpeg -i in.avi -vf "noformat=yuv420p, vflip" out.avi
171
@end example
172

  
173
will make libavfilter use a format different from ``yuv420p'' for the
174
input to the vflip filter.
175

  
176
@section null
177

  
178
Pass the source unchanged to the output.
179

  
180
@section pad
181

  
182
Add paddings to the input image, and places the original input at the
183
given coordinates @var{x}, @var{y}.
184

  
185
It accepts the following parameters:
186
@var{width}:@var{height}:@var{x}:@var{y}:@var{color}.
187

  
188
Follows the description of the accepted parameters.
189

  
190
@table @option
191
@item width, height
192

  
193
Specify the size of the output image with the paddings added. If the
194
value for @var{width} or @var{height} is 0, the corresponding input size
195
is used for the output.
196

  
197
The default value of @var{width} and @var{height} is 0.
198

  
199
@item x, y
200

  
201
Specify the offsets where to place the input image in the padded area
202
with respect to the top/left border of the output image.
203

  
204
The default value of @var{x} and @var{y} is 0.
205

  
206
@item color
207

  
208
Specify the color of the padded area, it can be the name of a color
209
(case insensitive match) or a 0xRRGGBB[AA] sequence.
210

  
211
The default value of @var{color} is ``black''.
212

  
213
@end table
214

  
215
@section scale
216

  
217
Scale the input video to @var{width}:@var{height} and/or convert the image format.
218

  
219
For example the command:
220

  
221
@example
222
./ffmpeg -i in.avi -vf "scale=200:100" out.avi
223
@end example
224

  
225
will scale the input video to a size of 200x100.
226

  
227
If the input image format is different from the format requested by
228
the next filter, the scale filter will convert the input to the
229
requested format.
230

  
231
If the value for @var{width} or @var{height} is 0, the respective input
232
size is used for the output.
233

  
234
If the value for @var{width} or @var{height} is -1, the scale filter will
235
use, for the respective output size, a value that maintains the aspect
236
ratio of the input image.
237

  
238
The default value of @var{width} and @var{height} is 0.
239

  
240
@section slicify
241

  
242
Pass the images of input video on to next video filter as multiple
243
slices.
244

  
245
@example
246
./ffmpeg -i in.avi -vf "slicify=32" out.avi
247
@end example
248

  
249
The filter accepts the slice height as parameter. If the parameter is
250
not specified it will use the default value of 16.
251

  
252
Adding this in the beginning of filter chains should make filtering
253
faster due to better use of the memory cache.
254

  
255
@section unsharp
256

  
257
Sharpen or blur the input video.
258

  
259
It accepts the following parameters:
260
@var{luma_msize_x}:@var{luma_msize_y}:@var{luma_amount}:@var{chroma_msize_x}:@var{chroma_msize_y}:@var{chroma_amount}
261

  
262
@table @option
263

  
264
@item luma_msize_x
265
Set the luma matrix horizontal size. It can be an integer between 3
266
and 13, default value is 5.
267

  
268
@item luma_msize_y
269
Set the luma matrix vertical size. It can be an integer between 3
270
and 13, default value is 5.
271

  
272
@item luma_amount
273
Set the luma effect strength. It can be a float number between -2.0
274
and 5.0, default value is 1.0.
275

  
276
@item chroma_msize_x
277
Set the chroma matrix horizontal size. It can be an integer between 3
278
and 13, default value is 0.
279

  
280
@item chroma_msize_y
281
Set the chroma matrix vertical size. It can be an integer between 3
282
and 13, default value is 0.
283

  
284
@item chroma_amount
285
Set the chroma effect strength. It can be a float number between -2.0
286
and 5.0, default value is 0.0.
287

  
288
@end table
289

  
290
Negative values for the amount will blur the input video, while positive
291
values will sharpen. All parameters are optional and default to the
292
equivalent of the string '5:5:1.0:0:0:0.0'.
293

  
294
@example
295
# Strong luma sharpen effect parameters
296
unsharp=7:7:2.5
297

  
298
# Strong blur of both luma and chroma parameters
299
unsharp=7:7:-2:7:7:-2
300

  
301
# Use the default values with @command{ffmpeg}
302
./ffmpeg -i in.avi -vf "unsharp" out.mp4
303
@end example
304

  
305
@section vflip
306

  
307
Flip the input video vertically.
308

  
309
@example
310
./ffmpeg -i in.avi -vf "vflip" out.avi
311
@end example
312

  
313
@chapter Available video sources
314

  
315
Below is a description of the currently available video sources.
316

  
317
@section nullsrc
318

  
319
Null video source, never return images. It is mainly useful as a
320
template and to be employed in analysis / debugging tools.
321

  
322
It accepts as optional parameter a string of the form
323
@var{width}:@var{height}, where @var{width} and @var{height} specify the size of
324
the configured source.
325

  
326
The default values of @var{width} and @var{height} are respectively 352
327
and 288 (corresponding to the CIF size format).
328

  
329
@chapter Available video sinks
330

  
331
Below is a description of the currently available video sinks.
332

  
333
@section nullsink
334

  
335
Null video sink, do absolutely nothing with the input video. It is
336
mainly useful as a template and to be employed in analysis / debugging
337
tools.
102
@include filters.texi
338 103

  
339 104
@bye

Also available in: Unified diff