]> git.sesse.net Git - ffmpeg/blob - doc/outdevs.texi
Merge commit 'f058f384a0d76bfd125f4738dceab7c890186432'
[ffmpeg] / doc / outdevs.texi
1 @chapter Output Devices
2 @c man begin OUTPUT DEVICES
3
4 Output devices are configured elements in FFmpeg that can write
5 multimedia data to an output device attached to your system.
6
7 When you configure your FFmpeg build, all the supported output devices
8 are enabled by default. You can list all available ones using the
9 configure option "--list-outdevs".
10
11 You can disable all the output devices using the configure option
12 "--disable-outdevs", and selectively enable an output device using the
13 option "--enable-outdev=@var{OUTDEV}", or you can disable a particular
14 input device using the option "--disable-outdev=@var{OUTDEV}".
15
16 The option "-formats" of the ff* tools will display the list of
17 enabled output devices (amongst the muxers).
18
19 A description of the currently available output devices follows.
20
21 @section alsa
22
23 ALSA (Advanced Linux Sound Architecture) output device.
24
25 @section caca
26
27 CACA output device.
28
29 This output device allows to show a video stream in CACA window.
30 Only one CACA window is allowed per application, so you can
31 have only one instance of this output device in an application.
32
33 To enable this output device you need to configure FFmpeg with
34 @code{--enable-libcaca}.
35 libcaca is a graphics library that outputs text instead of pixels.
36
37 For more information about libcaca, check:
38 @url{http://caca.zoy.org/wiki/libcaca}
39
40 @subsection Options
41
42 @table @option
43
44 @item window_title
45 Set the CACA window title, if not specified default to the filename
46 specified for the output device.
47
48 @item window_size
49 Set the CACA window size, can be a string of the form
50 @var{width}x@var{height} or a video size abbreviation.
51 If not specified it defaults to the size of the input video.
52
53 @item driver
54 Set display driver.
55
56 @item algorithm
57 Set dithering algorithm. Dithering is necessary
58 because the picture being rendered has usually far more colours than
59 the available palette.
60 The accepted values are listed with @code{-list_dither algorithms}.
61
62 @item antialias
63 Set antialias method. Antialiasing smoothens the rendered
64 image and avoids the commonly seen staircase effect.
65 The accepted values are listed with @code{-list_dither antialiases}.
66
67 @item charset
68 Set which characters are going to be used when rendering text.
69 The accepted values are listed with @code{-list_dither charsets}.
70
71 @item color
72 Set color to be used when rendering text.
73 The accepted values are listed with @code{-list_dither colors}.
74
75 @item list_drivers
76 If set to @option{true}, print a list of available drivers and exit.
77
78 @item list_dither
79 List available dither options related to the argument.
80 The argument must be one of @code{algorithms}, @code{antialiases},
81 @code{charsets}, @code{colors}.
82 @end table
83
84 @subsection Examples
85
86 @itemize
87 @item
88 The following command shows the @command{ffmpeg} output is an
89 CACA window, forcing its size to 80x25:
90 @example
91 ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
92 @end example
93
94 @item
95 Show the list of available drivers and exit:
96 @example
97 ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
98 @end example
99
100 @item
101 Show the list of available dither colors and exit:
102 @example
103 ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
104 @end example
105 @end itemize
106
107 @section fbdev
108
109 Linux framebuffer output device.
110
111 The Linux framebuffer is a graphic hardware-independent abstraction
112 layer to show graphics on a computer monitor, typically on the
113 console. It is accessed through a file device node, usually
114 @file{/dev/fb0}.
115
116 For more detailed information read the file
117 @file{Documentation/fb/framebuffer.txt} included in the Linux source tree.
118
119 @subsection Options
120 @table @option
121
122 @item xoffset
123 @item yoffset
124 Set x/y coordinate of top left corner. Default is 0.
125 @end table
126
127 @subsection Examples
128 Play a file on framebuffer device @file{/dev/fb0}.
129 Required pixel format depends on current framebuffer settings.
130 @example
131 ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
132 @end example
133
134 See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
135
136 @section oss
137
138 OSS (Open Sound System) output device.
139
140 @section pulse
141
142 PulseAudio output device.
143
144 To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
145
146 More information about PulseAudio can be found on @url{http://www.pulseaudio.org}
147
148 @subsection Options
149 @table @option
150
151 @item server
152 Connect to a specific PulseAudio server, specified by an IP address.
153 Default server is used when not provided.
154
155 @item name
156 Specify the application name PulseAudio will use when showing active clients,
157 by default it is the @code{LIBAVFORMAT_IDENT} string.
158
159 @item stream_name
160 Specify the stream name PulseAudio will use when showing active streams,
161 by default it is set to the specified output name.
162
163 @item device
164 Specify the device to use. Default device is used when not provided.
165 List of output devices can be obtained with command @command{pactl list sinks}.
166
167 @item buffer_size
168 @item buffer_duration
169 Control the size and duration of the PulseAudio buffer. A small buffer
170 gives more control, but requires more frequent updates.
171
172 @option{buffer_size} specifies size in bytes while
173 @option{buffer_duration} specifies duration in milliseconds.
174
175 When both options are provided then the highest value is used
176 (duration is recalculated to bytes using stream parameters). If they
177 are set to 0 (which is default), the device will use the default
178 PulseAudio duration value. By default PulseAudio set buffer duration
179 to around 2 seconds.
180 @end table
181
182 @subsection Examples
183 Play a file on default device on default server:
184 @example
185 ffmpeg  -i INPUT -f pulse "stream name"
186 @end example
187
188 @section sdl
189
190 SDL (Simple DirectMedia Layer) output device.
191
192 This output device allows to show a video stream in an SDL
193 window. Only one SDL window is allowed per application, so you can
194 have only one instance of this output device in an application.
195
196 To enable this output device you need libsdl installed on your system
197 when configuring your build.
198
199 For more information about SDL, check:
200 @url{http://www.libsdl.org/}
201
202 @subsection Options
203
204 @table @option
205
206 @item window_title
207 Set the SDL window title, if not specified default to the filename
208 specified for the output device.
209
210 @item icon_title
211 Set the name of the iconified SDL window, if not specified it is set
212 to the same value of @var{window_title}.
213
214 @item window_size
215 Set the SDL window size, can be a string of the form
216 @var{width}x@var{height} or a video size abbreviation.
217 If not specified it defaults to the size of the input video,
218 downscaled according to the aspect ratio.
219
220 @item window_fullscreen
221 Set fullscreen mode when non-zero value is provided.
222 Default value is zero.
223 @end table
224
225 @subsection Interactive commands
226
227 The window created by the device can be controlled through the
228 following interactive commands.
229
230 @table @key
231 @item q, ESC
232 Quit the device immediately.
233 @end table
234
235 @subsection Examples
236
237 The following command shows the @command{ffmpeg} output is an
238 SDL window, forcing its size to the qcif format:
239 @example
240 ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
241 @end example
242
243 @section sndio
244
245 sndio audio output device.
246
247 @section xv
248
249 XV (XVideo) output device.
250
251 This output device allows to show a video stream in a X Window System
252 window.
253
254 @subsection Options
255
256 @table @option
257 @item display_name
258 Specify the hardware display name, which determines the display and
259 communications domain to be used.
260
261 The display name or DISPLAY environment variable can be a string in
262 the format @var{hostname}[:@var{number}[.@var{screen_number}]].
263
264 @var{hostname} specifies the name of the host machine on which the
265 display is physically attached. @var{number} specifies the number of
266 the display server on that host machine. @var{screen_number} specifies
267 the screen to be used on that server.
268
269 If unspecified, it defaults to the value of the DISPLAY environment
270 variable.
271
272 For example, @code{dual-headed:0.1} would specify screen 1 of display
273 0 on the machine named ``dual-headed''.
274
275 Check the X11 specification for more detailed information about the
276 display name format.
277
278 @item window_size
279 Set the created window size, can be a string of the form
280 @var{width}x@var{height} or a video size abbreviation. If not
281 specified it defaults to the size of the input video.
282
283 @item window_x
284 @item window_y
285 Set the X and Y window offsets for the created window. They are both
286 set to 0 by default. The values may be ignored by the window manager.
287
288 @item window_title
289 Set the window title, if not specified default to the filename
290 specified for the output device.
291 @end table
292
293 For more information about XVideo see @url{http://www.x.org/}.
294
295 @subsection Examples
296
297 @itemize
298 @item
299 Decode, display and encode video input with @command{ffmpeg} at the
300 same time:
301 @example
302 ffmpeg -i INPUT OUTPUT -f xv display
303 @end example
304
305 @item
306 Decode and display the input video to multiple X11 windows:
307 @example
308 ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
309 @end example
310 @end itemize
311
312 @c man end OUTPUT DEVICES