1FFMPEG-DEVICES(1)                                            FFMPEG-DEVICES(1)
2
3
4

NAME

6       ffmpeg-devices - FFmpeg devices
7

DESCRIPTION

9       This document describes the input and output devices provided by the
10       libavdevice library.
11

DEVICE OPTIONS

13       The libavdevice library provides the same interface as libavformat.
14       Namely, an input device is considered like a demuxer, and an output
15       device like a muxer, and the interface and generic device options are
16       the same provided by libavformat (see the ffmpeg-formats manual).
17
18       In addition each input or output device may support so-called private
19       options, which are specific for that component.
20
21       Options may be set by specifying -option value in the FFmpeg tools, or
22       by setting the value explicitly in the device "AVFormatContext" options
23       or using the libavutil/opt.h API for programmatic use.
24

INPUT DEVICES

26       Input devices are configured elements in FFmpeg which enable accessing
27       the data coming from a multimedia device attached to your system.
28
29       When you configure your FFmpeg build, all the supported input devices
30       are enabled by default. You can list all available ones using the
31       configure option "--list-indevs".
32
33       You can disable all the input devices using the configure option
34       "--disable-indevs", and selectively enable an input device using the
35       option "--enable-indev=INDEV", or you can disable a particular input
36       device using the option "--disable-indev=INDEV".
37
38       The option "-devices" of the ff* tools will display the list of
39       supported input devices.
40
41       A description of the currently available input devices follows.
42
43   alsa
44       ALSA (Advanced Linux Sound Architecture) input device.
45
46       To enable this input device during configuration you need libasound
47       installed on your system.
48
49       This device allows capturing from an ALSA device. The name of the
50       device to capture has to be an ALSA card identifier.
51
52       An ALSA identifier has the syntax:
53
54               hw:<CARD>[,<DEV>[,<SUBDEV>]]
55
56       where the DEV and SUBDEV components are optional.
57
58       The three arguments (in order: CARD,DEV,SUBDEV) specify card number or
59       identifier, device number and subdevice number (-1 means any).
60
61       To see the list of cards currently recognized by your system check the
62       files /proc/asound/cards and /proc/asound/devices.
63
64       For example to capture with ffmpeg from an ALSA device with card id 0,
65       you may run the command:
66
67               ffmpeg -f alsa -i hw:0 alsaout.wav
68
69       For more information see:
70       <http://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html>
71
72       Options
73
74       sample_rate
75           Set the sample rate in Hz. Default is 48000.
76
77       channels
78           Set the number of channels. Default is 2.
79
80   android_camera
81       Android camera input device.
82
83       This input devices uses the Android Camera2 NDK API which is available
84       on devices with API level 24+. The availability of android_camera is
85       autodetected during configuration.
86
87       This device allows capturing from all cameras on an Android device,
88       which are integrated into the Camera2 NDK API.
89
90       The available cameras are enumerated internally and can be selected
91       with the camera_index parameter. The input file string is discarded.
92
93       Generally the back facing camera has index 0 while the front facing
94       camera has index 1.
95
96       Options
97
98       video_size
99           Set the video size given as a string such as 640x480 or hd720.
100           Falls back to the first available configuration reported by Android
101           if requested video size is not available or by default.
102
103       framerate
104           Set the video framerate.  Falls back to the first available
105           configuration reported by Android if requested framerate is not
106           available or by default (-1).
107
108       camera_index
109           Set the index of the camera to use. Default is 0.
110
111       input_queue_size
112           Set the maximum number of frames to buffer. Default is 5.
113
114   avfoundation
115       AVFoundation input device.
116
117       AVFoundation is the currently recommended framework by Apple for
118       streamgrabbing on OSX >= 10.7 as well as on iOS.
119
120       The input filename has to be given in the following syntax:
121
122               -i "[[VIDEO]:[AUDIO]]"
123
124       The first entry selects the video input while the latter selects the
125       audio input.  The stream has to be specified by the device name or the
126       device index as shown by the device list.  Alternatively, the video
127       and/or audio input device can be chosen by index using the
128
129           B<-video_device_index E<lt>INDEXE<gt>>
130
131       and/or
132
133           B<-audio_device_index E<lt>INDEXE<gt>>
134
135       , overriding any device name or index given in the input filename.
136
137       All available devices can be enumerated by using -list_devices true,
138       listing all device names and corresponding indices.
139
140       There are two device name aliases:
141
142       "default"
143           Select the AVFoundation default device of the corresponding type.
144
145       "none"
146           Do not record the corresponding media type.  This is equivalent to
147           specifying an empty device name or index.
148
149       Options
150
151       AVFoundation supports the following options:
152
153       -list_devices <TRUE|FALSE>
154           If set to true, a list of all available input devices is given
155           showing all device names and indices.
156
157       -video_device_index <INDEX>
158           Specify the video device by its index. Overrides anything given in
159           the input filename.
160
161       -audio_device_index <INDEX>
162           Specify the audio device by its index. Overrides anything given in
163           the input filename.
164
165       -pixel_format <FORMAT>
166           Request the video device to use a specific pixel format.  If the
167           specified format is not supported, a list of available formats is
168           given and the first one in this list is used instead. Available
169           pixel formats are: "monob, rgb555be, rgb555le, rgb565be, rgb565le,
170           rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0,
171            bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16,
172           yuv422p10, yuv444p10,
173            yuv420p, nv12, yuyv422, gray"
174
175       -framerate
176           Set the grabbing frame rate. Default is "ntsc", corresponding to a
177           frame rate of "30000/1001".
178
179       -video_size
180           Set the video frame size.
181
182       -capture_cursor
183           Capture the mouse pointer. Default is 0.
184
185       -capture_mouse_clicks
186           Capture the screen mouse clicks. Default is 0.
187
188       -capture_raw_data
189           Capture the raw device data. Default is 0.  Using this option may
190           result in receiving the underlying data delivered to the
191           AVFoundation framework. E.g. for muxed devices that sends raw DV
192           data to the framework (like tape-based camcorders), setting this
193           option to false results in extracted video frames captured in the
194           designated pixel format only. Setting this option to true results
195           in receiving the raw DV stream untouched.
196
197       Examples
198
199       •   Print the list of AVFoundation supported devices and exit:
200
201                   $ ffmpeg -f avfoundation -list_devices true -i ""
202
203       •   Record video from video device 0 and audio from audio device 0 into
204           out.avi:
205
206                   $ ffmpeg -f avfoundation -i "0:0" out.avi
207
208       •   Record video from video device 2 and audio from audio device 1 into
209           out.avi:
210
211                   $ ffmpeg -f avfoundation -video_device_index 2 -i ":1" out.avi
212
213       •   Record video from the system default video device using the pixel
214           format bgr0 and do not record any audio into out.avi:
215
216                   $ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi
217
218       •   Record raw DV data from a suitable input device and write the
219           output into out.dv:
220
221                   $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv
222
223   bktr
224       BSD video input device.
225
226       Options
227
228       framerate
229           Set the frame rate.
230
231       video_size
232           Set the video frame size. Default is "vga".
233
234       standard
235           Available values are:
236
237           pal
238           ntsc
239           secam
240           paln
241           palm
242           ntscj
243
244   decklink
245       The decklink input device provides capture capabilities for Blackmagic
246       DeckLink devices.
247
248       To enable this input device, you need the Blackmagic DeckLink SDK and
249       you need to configure with the appropriate "--extra-cflags" and
250       "--extra-ldflags".  On Windows, you need to run the IDL files through
251       widl.
252
253       DeckLink is very picky about the formats it supports. Pixel format of
254       the input can be set with raw_format.  Framerate and video size must be
255       determined for your device with -list_formats 1. Audio sample rate is
256       always 48 kHz and the number of channels can be 2, 8 or 16. Note that
257       all audio channels are bundled in one single audio track.
258
259       Options
260
261       list_devices
262           If set to true, print a list of devices and exit.  Defaults to
263           false. This option is deprecated, please use the "-sources" option
264           of ffmpeg to list the available input devices.
265
266       list_formats
267           If set to true, print a list of supported formats and exit.
268           Defaults to false.
269
270       format_code <FourCC>
271           This sets the input video format to the format given by the FourCC.
272           To see the supported values of your device(s) use list_formats.
273           Note that there is a FourCC 'pal ' that can also be used as pal (3
274           letters).  Default behavior is autodetection of the input video
275           format, if the hardware supports it.
276
277       raw_format
278           Set the pixel format of the captured video.  Available values are:
279
280           auto
281               This is the default which means 8-bit YUV 422 or 8-bit ARGB if
282               format autodetection is used, 8-bit YUV 422 otherwise.
283
284           uyvy422
285               8-bit YUV 422.
286
287           yuv422p10
288               10-bit YUV 422.
289
290           argb
291               8-bit RGB.
292
293           bgra
294               8-bit RGB.
295
296           rgb10
297               10-bit RGB.
298
299       teletext_lines
300           If set to nonzero, an additional teletext stream will be captured
301           from the vertical ancillary data. Both SD PAL (576i) and HD (1080i
302           or 1080p) sources are supported. In case of HD sources, OP47
303           packets are decoded.
304
305           This option is a bitmask of the SD PAL VBI lines captured,
306           specifically lines 6 to 22, and lines 318 to 335. Line 6 is the LSB
307           in the mask. Selected lines which do not contain teletext
308           information will be ignored. You can use the special all constant
309           to select all possible lines, or standard to skip lines 6, 318 and
310           319, which are not compatible with all receivers.
311
312           For SD sources, ffmpeg needs to be compiled with
313           "--enable-libzvbi". For HD sources, on older (pre-4K) DeckLink card
314           models you have to capture in 10 bit mode.
315
316       channels
317           Defines number of audio channels to capture. Must be 2, 8 or 16.
318           Defaults to 2.
319
320       duplex_mode
321           Sets the decklink device duplex/profile mode. Must be unset, half,
322           full, one_sub_device_full, one_sub_device_half,
323           two_sub_device_full, four_sub_device_half Defaults to unset.
324
325           Note: DeckLink SDK 11.0 have replaced the duplex property by a
326           profile property.  For the DeckLink Duo 2 and DeckLink Quad 2, a
327           profile is shared between any 2 sub-devices that utilize the same
328           connectors. For the DeckLink 8K Pro, a profile is shared between
329           all 4 sub-devices. So DeckLink 8K Pro support four profiles.
330
331           Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
332           one_sub_device_full, one_sub_device_half, two_sub_device_full,
333           four_sub_device_half
334
335           Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: half,
336           full
337
338       timecode_format
339           Timecode type to include in the frame and video stream metadata.
340           Must be none, rp188vitc, rp188vitc2, rp188ltc, rp188hfr, rp188any,
341           vitc, vitc2, or serial.  Defaults to none (not included).
342
343           In order to properly support 50/60 fps timecodes, the ordering of
344           the queried timecode types for rp188any is HFR, VITC1, VITC2 and
345           LTC for >30 fps content. Note that this is slightly different to
346           the ordering used by the DeckLink API, which is HFR, VITC1, LTC,
347           VITC2.
348
349       video_input
350           Sets the video input source. Must be unset, sdi, hdmi, optical_sdi,
351           component, composite or s_video.  Defaults to unset.
352
353       audio_input
354           Sets the audio input source. Must be unset, embedded, aes_ebu,
355           analog, analog_xlr, analog_rca or microphone. Defaults to unset.
356
357       video_pts
358           Sets the video packet timestamp source. Must be video, audio,
359           reference, wallclock or abs_wallclock.  Defaults to video.
360
361       audio_pts
362           Sets the audio packet timestamp source. Must be video, audio,
363           reference, wallclock or abs_wallclock.  Defaults to audio.
364
365       draw_bars
366           If set to true, color bars are drawn in the event of a signal loss.
367           Defaults to true.
368
369       queue_size
370           Sets maximum input buffer size in bytes. If the buffering reaches
371           this value, incoming frames will be dropped.  Defaults to
372           1073741824.
373
374       audio_depth
375           Sets the audio sample bit depth. Must be 16 or 32.  Defaults to 16.
376
377       decklink_copyts
378           If set to true, timestamps are forwarded as they are without
379           removing the initial offset.  Defaults to false.
380
381       timestamp_align
382           Capture start time alignment in seconds. If set to nonzero, input
383           frames are dropped till the system timestamp aligns with configured
384           value.  Alignment difference of up to one frame duration is
385           tolerated.  This is useful for maintaining input synchronization
386           across N different hardware devices deployed for 'N-way'
387           redundancy. The system time of different hardware devices should be
388           synchronized with protocols such as NTP or PTP, before using this
389           option.  Note that this method is not foolproof. In some border
390           cases input synchronization may not happen due to thread scheduling
391           jitters in the OS.  Either sync could go wrong by 1 frame or in a
392           rarer case timestamp_align seconds.  Defaults to 0.
393
394       wait_for_tc (bool)
395           Drop frames till a frame with timecode is received. Sometimes
396           serial timecode isn't received with the first input frame. If that
397           happens, the stored stream timecode will be inaccurate. If this
398           option is set to true, input frames are dropped till a frame with
399           timecode is received.  Option timecode_format must be specified.
400           Defaults to false.
401
402       enable_klv(bool)
403           If set to true, extracts KLV data from VANC and outputs KLV
404           packets.  KLV VANC packets are joined based on MID and PSC fields
405           and aggregated into one KLV packet.  Defaults to false.
406
407       Examples
408
409       •   List input devices:
410
411                   ffmpeg -sources decklink
412
413       •   List supported formats:
414
415                   ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro'
416
417       •   Capture video clip at 1080i50:
418
419                   ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi
420
421       •   Capture video clip at 1080i50 10 bit:
422
423                   ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
424
425       •   Capture video clip at 1080i50 with 16 audio channels:
426
427                   ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi
428
429   dshow
430       Windows DirectShow input device.
431
432       DirectShow support is enabled when FFmpeg is built with the mingw-w64
433       project.  Currently only audio and video devices are supported.
434
435       Multiple devices may be opened as separate inputs, but they may also be
436       opened on the same input, which should improve synchronism between
437       them.
438
439       The input name should be in the format:
440
441               <TYPE>=<NAME>[:<TYPE>=<NAME>]
442
443       where TYPE can be either audio or video, and NAME is the device's name
444       or alternative name..
445
446       Options
447
448       If no options are specified, the device's defaults are used.  If the
449       device does not support the requested options, it will fail to open.
450
451       video_size
452           Set the video size in the captured video.
453
454       framerate
455           Set the frame rate in the captured video.
456
457       sample_rate
458           Set the sample rate (in Hz) of the captured audio.
459
460       sample_size
461           Set the sample size (in bits) of the captured audio.
462
463       channels
464           Set the number of channels in the captured audio.
465
466       list_devices
467           If set to true, print a list of devices and exit.
468
469       list_options
470           If set to true, print a list of selected device's options and exit.
471
472       video_device_number
473           Set video device number for devices with the same name (starts at
474           0, defaults to 0).
475
476       audio_device_number
477           Set audio device number for devices with the same name (starts at
478           0, defaults to 0).
479
480       pixel_format
481           Select pixel format to be used by DirectShow. This may only be set
482           when the video codec is not set or set to rawvideo.
483
484       audio_buffer_size
485           Set audio device buffer size in milliseconds (which can directly
486           impact latency, depending on the device).  Defaults to using the
487           audio device's default buffer size (typically some multiple of
488           500ms).  Setting this value too low can degrade performance.  See
489           also
490           <http://msdn.microsoft.com/en-us/library/windows/desktop/dd377582(v=vs.85).aspx>
491
492       video_pin_name
493           Select video capture pin to use by name or alternative name.
494
495       audio_pin_name
496           Select audio capture pin to use by name or alternative name.
497
498       crossbar_video_input_pin_number
499           Select video input pin number for crossbar device. This will be
500           routed to the crossbar device's Video Decoder output pin.  Note
501           that changing this value can affect future invocations (sets a new
502           default) until system reboot occurs.
503
504       crossbar_audio_input_pin_number
505           Select audio input pin number for crossbar device. This will be
506           routed to the crossbar device's Audio Decoder output pin.  Note
507           that changing this value can affect future invocations (sets a new
508           default) until system reboot occurs.
509
510       show_video_device_dialog
511           If set to true, before capture starts, popup a display dialog to
512           the end user, allowing them to change video filter properties and
513           configurations manually.  Note that for crossbar devices, adjusting
514           values in this dialog may be needed at times to toggle between PAL
515           (25 fps) and NTSC (29.97) input frame rates, sizes, interlacing,
516           etc.  Changing these values can enable different scan rates/frame
517           rates and avoiding green bars at the bottom, flickering scan lines,
518           etc.  Note that with some devices, changing these properties can
519           also affect future invocations (sets new defaults) until system
520           reboot occurs.
521
522       show_audio_device_dialog
523           If set to true, before capture starts, popup a display dialog to
524           the end user, allowing them to change audio filter properties and
525           configurations manually.
526
527       show_video_crossbar_connection_dialog
528           If set to true, before capture starts, popup a display dialog to
529           the end user, allowing them to manually modify crossbar pin
530           routings, when it opens a video device.
531
532       show_audio_crossbar_connection_dialog
533           If set to true, before capture starts, popup a display dialog to
534           the end user, allowing them to manually modify crossbar pin
535           routings, when it opens an audio device.
536
537       show_analog_tv_tuner_dialog
538           If set to true, before capture starts, popup a display dialog to
539           the end user, allowing them to manually modify TV channels and
540           frequencies.
541
542       show_analog_tv_tuner_audio_dialog
543           If set to true, before capture starts, popup a display dialog to
544           the end user, allowing them to manually modify TV audio (like mono
545           vs. stereo, Language A,B or C).
546
547       audio_device_load
548           Load an audio capture filter device from file instead of searching
549           it by name. It may load additional parameters too, if the filter
550           supports the serialization of its properties to.  To use this an
551           audio capture source has to be specified, but it can be anything
552           even fake one.
553
554       audio_device_save
555           Save the currently used audio capture filter device and its
556           parameters (if the filter supports it) to a file.  If a file with
557           the same name exists it will be overwritten.
558
559       video_device_load
560           Load a video capture filter device from file instead of searching
561           it by name. It may load additional parameters too, if the filter
562           supports the serialization of its properties to.  To use this a
563           video capture source has to be specified, but it can be anything
564           even fake one.
565
566       video_device_save
567           Save the currently used video capture filter device and its
568           parameters (if the filter supports it) to a file.  If a file with
569           the same name exists it will be overwritten.
570
571       use_video_device_timestamps
572           If set to false, the timestamp for video frames will be derived
573           from the wallclock instead of the timestamp provided by the capture
574           device. This allows working around devices that provide unreliable
575           timestamps.
576
577       Examples
578
579       •   Print the list of DirectShow supported devices and exit:
580
581                   $ ffmpeg -list_devices true -f dshow -i dummy
582
583       •   Open video device Camera:
584
585                   $ ffmpeg -f dshow -i video="Camera"
586
587       •   Open second video device with name Camera:
588
589                   $ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
590
591       •   Open video device Camera and audio device Microphone:
592
593                   $ ffmpeg -f dshow -i video="Camera":audio="Microphone"
594
595       •   Print the list of supported options in selected device and exit:
596
597                   $ ffmpeg -list_options true -f dshow -i video="Camera"
598
599       •   Specify pin names to capture by name or alternative name, specify
600           alternative device name:
601
602                   $ ffmpeg -f dshow -audio_pin_name "Audio Out" -video_pin_name 2 -i video=video="@device_pnp_\\?\pci#ven_1a0a&dev_6200&subsys_62021461&rev_01#4&e2c7dd6&0&00e1#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\{ca465100-deb0-4d59-818f-8c477184adf6}":audio="Microphone"
603
604       •   Configure a crossbar device, specifying crossbar pins, allow user
605           to adjust video capture properties at startup:
606
607                   $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0
608                        -crossbar_audio_input_pin_number 3 -i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture"
609
610   fbdev
611       Linux framebuffer input device.
612
613       The Linux framebuffer is a graphic hardware-independent abstraction
614       layer to show graphics on a computer monitor, typically on the console.
615       It is accessed through a file device node, usually /dev/fb0.
616
617       For more detailed information read the file
618       Documentation/fb/framebuffer.txt included in the Linux source tree.
619
620       See also <http://linux-fbdev.sourceforge.net/>, and fbset(1).
621
622       To record from the framebuffer device /dev/fb0 with ffmpeg:
623
624               ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi
625
626       You can take a single screenshot image with the command:
627
628               ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg
629
630       Options
631
632       framerate
633           Set the frame rate. Default is 25.
634
635   gdigrab
636       Win32 GDI-based screen capture device.
637
638       This device allows you to capture a region of the display on Windows.
639
640       There are two options for the input filename:
641
642               desktop
643
644       or
645
646               title=<window_title>
647
648       The first option will capture the entire desktop, or a fixed region of
649       the desktop. The second option will instead capture the contents of a
650       single window, regardless of its position on the screen.
651
652       For example, to grab the entire desktop using ffmpeg:
653
654               ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg
655
656       Grab a 640x480 region at position "10,20":
657
658               ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg
659
660       Grab the contents of the window named "Calculator"
661
662               ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg
663
664       Options
665
666       draw_mouse
667           Specify whether to draw the mouse pointer. Use the value 0 to not
668           draw the pointer. Default value is 1.
669
670       framerate
671           Set the grabbing frame rate. Default value is "ntsc", corresponding
672           to a frame rate of "30000/1001".
673
674       show_region
675           Show grabbed region on screen.
676
677           If show_region is specified with 1, then the grabbing region will
678           be indicated on screen. With this option, it is easy to know what
679           is being grabbed if only a portion of the screen is grabbed.
680
681           Note that show_region is incompatible with grabbing the contents of
682           a single window.
683
684           For example:
685
686                   ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg
687
688       video_size
689           Set the video frame size. The default is to capture the full screen
690           if desktop is selected, or the full window size if
691           title=window_title is selected.
692
693       offset_x
694           When capturing a region with video_size, set the distance from the
695           left edge of the screen or desktop.
696
697           Note that the offset calculation is from the top left corner of the
698           primary monitor on Windows. If you have a monitor positioned to the
699           left of your primary monitor, you will need to use a negative
700           offset_x value to move the region to that monitor.
701
702       offset_y
703           When capturing a region with video_size, set the distance from the
704           top edge of the screen or desktop.
705
706           Note that the offset calculation is from the top left corner of the
707           primary monitor on Windows. If you have a monitor positioned above
708           your primary monitor, you will need to use a negative offset_y
709           value to move the region to that monitor.
710
711   iec61883
712       FireWire DV/HDV input device using libiec61883.
713
714       To enable this input device, you need libiec61883, libraw1394 and
715       libavc1394 installed on your system. Use the configure option
716       "--enable-libiec61883" to compile with the device enabled.
717
718       The iec61883 capture device supports capturing from a video device
719       connected via IEEE1394 (FireWire), using libiec61883 and the new Linux
720       FireWire stack (juju). This is the default DV/HDV input method in Linux
721       Kernel 2.6.37 and later, since the old FireWire stack was removed.
722
723       Specify the FireWire port to be used as input file, or "auto" to choose
724       the first port connected.
725
726       Options
727
728       dvtype
729           Override autodetection of DV/HDV. This should only be used if auto
730           detection does not work, or if usage of a different device type
731           should be prohibited. Treating a DV device as HDV (or vice versa)
732           will not work and result in undefined behavior.  The values auto,
733           dv and hdv are supported.
734
735       dvbuffer
736           Set maximum size of buffer for incoming data, in frames. For DV,
737           this is an exact value. For HDV, it is not frame exact, since HDV
738           does not have a fixed frame size.
739
740       dvguid
741           Select the capture device by specifying its GUID. Capturing will
742           only be performed from the specified device and fails if no device
743           with the given GUID is found. This is useful to select the input if
744           multiple devices are connected at the same time.  Look at
745           /sys/bus/firewire/devices to find out the GUIDs.
746
747       Examples
748
749       •   Grab and show the input of a FireWire DV/HDV device.
750
751                   ffplay -f iec61883 -i auto
752
753       •   Grab and record the input of a FireWire DV/HDV device, using a
754           packet buffer of 100000 packets if the source is HDV.
755
756                   ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg
757
758   jack
759       JACK input device.
760
761       To enable this input device during configuration you need libjack
762       installed on your system.
763
764       A JACK input device creates one or more JACK writable clients, one for
765       each audio channel, with name client_name:input_N, where client_name is
766       the name provided by the application, and N is a number which
767       identifies the channel.  Each writable client will send the acquired
768       data to the FFmpeg input device.
769
770       Once you have created one or more JACK readable clients, you need to
771       connect them to one or more JACK writable clients.
772
773       To connect or disconnect JACK clients you can use the jack_connect and
774       jack_disconnect programs, or do it through a graphical interface, for
775       example with qjackctl.
776
777       To list the JACK clients and their properties you can invoke the
778       command jack_lsp.
779
780       Follows an example which shows how to capture a JACK readable client
781       with ffmpeg.
782
783               # Create a JACK writable client with name "ffmpeg".
784               $ ffmpeg -f jack -i ffmpeg -y out.wav
785
786               # Start the sample jack_metro readable client.
787               $ jack_metro -b 120 -d 0.2 -f 4000
788
789               # List the current JACK clients.
790               $ jack_lsp -c
791               system:capture_1
792               system:capture_2
793               system:playback_1
794               system:playback_2
795               ffmpeg:input_1
796               metro:120_bpm
797
798               # Connect metro to the ffmpeg writable client.
799               $ jack_connect metro:120_bpm ffmpeg:input_1
800
801       For more information read: <http://jackaudio.org/>
802
803       Options
804
805       channels
806           Set the number of channels. Default is 2.
807
808   kmsgrab
809       KMS video input device.
810
811       Captures the KMS scanout framebuffer associated with a specified CRTC
812       or plane as a DRM object that can be passed to other hardware
813       functions.
814
815       Requires either DRM master or CAP_SYS_ADMIN to run.
816
817       If you don't understand what all of that means, you probably don't want
818       this.  Look at x11grab instead.
819
820       Options
821
822       device
823           DRM device to capture on.  Defaults to /dev/dri/card0.
824
825       format
826           Pixel format of the framebuffer.  This can be autodetected if you
827           are running Linux 5.7 or later, but needs to be provided for
828           earlier versions.  Defaults to bgr0, which is the most common
829           format used by the Linux console and Xorg X server.
830
831       format_modifier
832           Format modifier to signal on output frames.  This is necessary to
833           import correctly into some APIs.  It can be autodetected if you are
834           running Linux 5.7 or later, but will need to be provided explicitly
835           when needed in earlier versions.  See the libdrm documentation for
836           possible values.
837
838       crtc_id
839           KMS CRTC ID to define the capture source.  The first active plane
840           on the given CRTC will be used.
841
842       plane_id
843           KMS plane ID to define the capture source.  Defaults to the first
844           active plane found if neither crtc_id nor plane_id are specified.
845
846       framerate
847           Framerate to capture at.  This is not synchronised to any page
848           flipping or framebuffer changes - it just defines the interval at
849           which the framebuffer is sampled.  Sampling faster than the
850           framebuffer update rate will generate independent frames with the
851           same content.  Defaults to 30.
852
853       Examples
854
855       •   Capture from the first active plane, download the result to normal
856           frames and encode.  This will only work if the framebuffer is both
857           linear and mappable - if not, the result may be scrambled or fail
858           to download.
859
860                   ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4
861
862       •   Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert
863           to NV12 and encode as H.264.
864
865                   ffmpeg -crtc_id 42 -framerate 60 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi output.mp4
866
867       •   To capture only part of a plane the output can be cropped - this
868           can be used to capture a single window, as long as it has a known
869           absolute position and size.  For example, to capture and encode the
870           middle quarter of a 1920x1080 plane:
871
872                   ffmpeg -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,crop=960:540:480:270,scale_vaapi=960:540:nv12' -c:v h264_vaapi output.mp4
873
874   lavfi
875       Libavfilter input virtual device.
876
877       This input device reads data from the open output pads of a libavfilter
878       filtergraph.
879
880       For each filtergraph open output, the input device will create a
881       corresponding stream which is mapped to the generated output. Currently
882       only video data is supported. The filtergraph is specified through the
883       option graph.
884
885       Options
886
887       graph
888           Specify the filtergraph to use as input. Each video open output
889           must be labelled by a unique string of the form "outN", where N is
890           a number starting from 0 corresponding to the mapped input stream
891           generated by the device.  The first unlabelled output is
892           automatically assigned to the "out0" label, but all the others need
893           to be specified explicitly.
894
895           The suffix "+subcc" can be appended to the output label to create
896           an extra stream with the closed captions packets attached to that
897           output (experimental; only for EIA-608 / CEA-708 for now).  The
898           subcc streams are created after all the normal streams, in the
899           order of the corresponding stream.  For example, if there is
900           "out19+subcc", "out7+subcc" and up to "out42", the stream #43 is
901           subcc for stream #7 and stream #44 is subcc for stream #19.
902
903           If not specified defaults to the filename specified for the input
904           device.
905
906       graph_file
907           Set the filename of the filtergraph to be read and sent to the
908           other filters. Syntax of the filtergraph is the same as the one
909           specified by the option graph.
910
911       dumpgraph
912           Dump graph to stderr.
913
914       Examples
915
916       •   Create a color video stream and play it back with ffplay:
917
918                   ffplay -f lavfi -graph "color=c=pink [out0]" dummy
919
920       •   As the previous example, but use filename for specifying the graph
921           description, and omit the "out0" label:
922
923                   ffplay -f lavfi color=c=pink
924
925       •   Create three different video test filtered sources and play them:
926
927                   ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
928
929       •   Read an audio stream from a file using the amovie source and play
930           it back with ffplay:
931
932                   ffplay -f lavfi "amovie=test.wav"
933
934       •   Read an audio stream and a video stream and play it back with
935           ffplay:
936
937                   ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
938
939       •   Dump decoded frames to images and closed captions to a file
940           (experimental):
941
942                   ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin
943
944   libcdio
945       Audio-CD input device based on libcdio.
946
947       To enable this input device during configuration you need libcdio
948       installed on your system. It requires the configure option
949       "--enable-libcdio".
950
951       This device allows playing and grabbing from an Audio-CD.
952
953       For example to copy with ffmpeg the entire Audio-CD in /dev/sr0, you
954       may run the command:
955
956               ffmpeg -f libcdio -i /dev/sr0 cd.wav
957
958       Options
959
960       speed
961           Set drive reading speed. Default value is 0.
962
963           The speed is specified CD-ROM speed units. The speed is set through
964           the libcdio "cdio_cddap_speed_set" function. On many CD-ROM drives,
965           specifying a value too large will result in using the fastest
966           speed.
967
968       paranoia_mode
969           Set paranoia recovery mode flags. It accepts one of the following
970           values:
971
972           disable
973           verify
974           overlap
975           neverskip
976           full
977
978           Default value is disable.
979
980           For more information about the available recovery modes, consult
981           the paranoia project documentation.
982
983   libdc1394
984       IIDC1394 input device, based on libdc1394 and libraw1394.
985
986       Requires the configure option "--enable-libdc1394".
987
988       Options
989
990       framerate
991           Set the frame rate. Default is "ntsc", corresponding to a frame
992           rate of "30000/1001".
993
994       pixel_format
995           Select the pixel format. Default is "uyvy422".
996
997       video_size
998           Set the video size given as a string such as "640x480" or "hd720".
999           Default is "qvga".
1000
1001   openal
1002       The OpenAL input device provides audio capture on all systems with a
1003       working OpenAL 1.1 implementation.
1004
1005       To enable this input device during configuration, you need OpenAL
1006       headers and libraries installed on your system, and need to configure
1007       FFmpeg with "--enable-openal".
1008
1009       OpenAL headers and libraries should be provided as part of your OpenAL
1010       implementation, or as an additional download (an SDK). Depending on
1011       your installation you may need to specify additional flags via the
1012       "--extra-cflags" and "--extra-ldflags" for allowing the build system to
1013       locate the OpenAL headers and libraries.
1014
1015       An incomplete list of OpenAL implementations follows:
1016
1017       Creative
1018           The official Windows implementation, providing hardware
1019           acceleration with supported devices and software fallback.  See
1020           <http://openal.org/>.
1021
1022       OpenAL Soft
1023           Portable, open source (LGPL) software implementation. Includes
1024           backends for the most common sound APIs on the Windows, Linux,
1025           Solaris, and BSD operating systems.  See
1026           <http://kcat.strangesoft.net/openal.html>.
1027
1028       Apple
1029           OpenAL is part of Core Audio, the official Mac OS X Audio
1030           interface.  See
1031           <http://developer.apple.com/technologies/mac/audio-and-video.html>
1032
1033       This device allows one to capture from an audio input device handled
1034       through OpenAL.
1035
1036       You need to specify the name of the device to capture in the provided
1037       filename. If the empty string is provided, the device will
1038       automatically select the default device. You can get the list of the
1039       supported devices by using the option list_devices.
1040
1041       Options
1042
1043       channels
1044           Set the number of channels in the captured audio. Only the values 1
1045           (monaural) and 2 (stereo) are currently supported.  Defaults to 2.
1046
1047       sample_size
1048           Set the sample size (in bits) of the captured audio. Only the
1049           values 8 and 16 are currently supported. Defaults to 16.
1050
1051       sample_rate
1052           Set the sample rate (in Hz) of the captured audio.  Defaults to
1053           44.1k.
1054
1055       list_devices
1056           If set to true, print a list of devices and exit.  Defaults to
1057           false.
1058
1059       Examples
1060
1061       Print the list of OpenAL supported devices and exit:
1062
1063               $ ffmpeg -list_devices true -f openal -i dummy out.ogg
1064
1065       Capture from the OpenAL device DR-BT101 via PulseAudio:
1066
1067               $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
1068
1069       Capture from the default device (note the empty string '' as filename):
1070
1071               $ ffmpeg -f openal -i '' out.ogg
1072
1073       Capture from two devices simultaneously, writing to two different
1074       files, within the same ffmpeg command:
1075
1076               $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
1077
1078       Note: not all OpenAL implementations support multiple simultaneous
1079       capture - try the latest OpenAL Soft if the above does not work.
1080
1081   oss
1082       Open Sound System input device.
1083
1084       The filename to provide to the input device is the device node
1085       representing the OSS input device, and is usually set to /dev/dsp.
1086
1087       For example to grab from /dev/dsp using ffmpeg use the command:
1088
1089               ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
1090
1091       For more information about OSS see:
1092       <http://manuals.opensound.com/usersguide/dsp.html>
1093
1094       Options
1095
1096       sample_rate
1097           Set the sample rate in Hz. Default is 48000.
1098
1099       channels
1100           Set the number of channels. Default is 2.
1101
1102   pulse
1103       PulseAudio input device.
1104
1105       To enable this output device you need to configure FFmpeg with
1106       "--enable-libpulse".
1107
1108       The filename to provide to the input device is a source device or the
1109       string "default"
1110
1111       To list the PulseAudio source devices and their properties you can
1112       invoke the command pactl list sources.
1113
1114       More information about PulseAudio can be found on
1115       <http://www.pulseaudio.org>.
1116
1117       Options
1118
1119       server
1120           Connect to a specific PulseAudio server, specified by an IP
1121           address.  Default server is used when not provided.
1122
1123       name
1124           Specify the application name PulseAudio will use when showing
1125           active clients, by default it is the "LIBAVFORMAT_IDENT" string.
1126
1127       stream_name
1128           Specify the stream name PulseAudio will use when showing active
1129           streams, by default it is "record".
1130
1131       sample_rate
1132           Specify the samplerate in Hz, by default 48kHz is used.
1133
1134       channels
1135           Specify the channels in use, by default 2 (stereo) is set.
1136
1137       frame_size
1138           This option does nothing and is deprecated.
1139
1140       fragment_size
1141           Specify the size in bytes of the minimal buffering fragment in
1142           PulseAudio, it will affect the audio latency. By default it is set
1143           to 50 ms amount of data.
1144
1145       wallclock
1146           Set the initial PTS using the current time. Default is 1.
1147
1148       Examples
1149
1150       Record a stream from default device:
1151
1152               ffmpeg -f pulse -i default /tmp/pulse.wav
1153
1154   sndio
1155       sndio input device.
1156
1157       To enable this input device during configuration you need libsndio
1158       installed on your system.
1159
1160       The filename to provide to the input device is the device node
1161       representing the sndio input device, and is usually set to /dev/audio0.
1162
1163       For example to grab from /dev/audio0 using ffmpeg use the command:
1164
1165               ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
1166
1167       Options
1168
1169       sample_rate
1170           Set the sample rate in Hz. Default is 48000.
1171
1172       channels
1173           Set the number of channels. Default is 2.
1174
1175   video4linux2, v4l2
1176       Video4Linux2 input video device.
1177
1178       "v4l2" can be used as alias for "video4linux2".
1179
1180       If FFmpeg is built with v4l-utils support (by using the
1181       "--enable-libv4l2" configure option), it is possible to use it with the
1182       "-use_libv4l2" input device option.
1183
1184       The name of the device to grab is a file device node, usually Linux
1185       systems tend to automatically create such nodes when the device (e.g.
1186       an USB webcam) is plugged into the system, and has a name of the kind
1187       /dev/videoN, where N is a number associated to the device.
1188
1189       Video4Linux2 devices usually support a limited set of widthxheight
1190       sizes and frame rates. You can check which are supported using
1191       -list_formats all for Video4Linux2 devices.  Some devices, like TV
1192       cards, support one or more standards. It is possible to list all the
1193       supported standards using -list_standards all.
1194
1195       The time base for the timestamps is 1 microsecond. Depending on the
1196       kernel version and configuration, the timestamps may be derived from
1197       the real time clock (origin at the Unix Epoch) or the monotonic clock
1198       (origin usually at boot time, unaffected by NTP or manual changes to
1199       the clock). The -timestamps abs or -ts abs option can be used to force
1200       conversion into the real time clock.
1201
1202       Some usage examples of the video4linux2 device with ffmpeg and ffplay:
1203
1204       •   List supported formats for a video4linux2 device:
1205
1206                   ffplay -f video4linux2 -list_formats all /dev/video0
1207
1208       •   Grab and show the input of a video4linux2 device:
1209
1210                   ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
1211
1212       •   Grab and record the input of a video4linux2 device, leave the frame
1213           rate and size as previously set:
1214
1215                   ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
1216
1217       For more information about Video4Linux, check <http://linuxtv.org/>.
1218
1219       Options
1220
1221       standard
1222           Set the standard. Must be the name of a supported standard. To get
1223           a list of the supported standards, use the list_standards option.
1224
1225       channel
1226           Set the input channel number. Default to -1, which means using the
1227           previously selected channel.
1228
1229       video_size
1230           Set the video frame size. The argument must be a string in the form
1231           WIDTHxHEIGHT or a valid size abbreviation.
1232
1233       pixel_format
1234           Select the pixel format (only valid for raw video input).
1235
1236       input_format
1237           Set the preferred pixel format (for raw video) or a codec name.
1238           This option allows one to select the input format, when several are
1239           available.
1240
1241       framerate
1242           Set the preferred video frame rate.
1243
1244       list_formats
1245           List available formats (supported pixel formats, codecs, and frame
1246           sizes) and exit.
1247
1248           Available values are:
1249
1250           all Show all available (compressed and non-compressed) formats.
1251
1252           raw Show only raw video (non-compressed) formats.
1253
1254           compressed
1255               Show only compressed formats.
1256
1257       list_standards
1258           List supported standards and exit.
1259
1260           Available values are:
1261
1262           all Show all supported standards.
1263
1264       timestamps, ts
1265           Set type of timestamps for grabbed frames.
1266
1267           Available values are:
1268
1269           default
1270               Use timestamps from the kernel.
1271
1272           abs Use absolute timestamps (wall clock).
1273
1274           mono2abs
1275               Force conversion from monotonic to absolute timestamps.
1276
1277           Default value is "default".
1278
1279       use_libv4l2
1280           Use libv4l2 (v4l-utils) conversion functions. Default is 0.
1281
1282   vfwcap
1283       VfW (Video for Windows) capture input device.
1284
1285       The filename passed as input is the capture driver number, ranging from
1286       0 to 9. You may use "list" as filename to print a list of drivers. Any
1287       other filename will be interpreted as device number 0.
1288
1289       Options
1290
1291       video_size
1292           Set the video frame size.
1293
1294       framerate
1295           Set the grabbing frame rate. Default value is "ntsc", corresponding
1296           to a frame rate of "30000/1001".
1297
1298   x11grab
1299       X11 video input device.
1300
1301       To enable this input device during configuration you need libxcb
1302       installed on your system. It will be automatically detected during
1303       configuration.
1304
1305       This device allows one to capture a region of an X11 display.
1306
1307       The filename passed as input has the syntax:
1308
1309               [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>]
1310
1311       hostname:display_number.screen_number specifies the X11 display name of
1312       the screen to grab from. hostname can be omitted, and defaults to
1313       "localhost". The environment variable DISPLAY contains the default
1314       display name.
1315
1316       x_offset and y_offset specify the offsets of the grabbed area with
1317       respect to the top-left border of the X11 screen. They default to 0.
1318
1319       Check the X11 documentation (e.g. man X) for more detailed information.
1320
1321       Use the xdpyinfo program for getting basic information about the
1322       properties of your X11 display (e.g. grep for "name" or "dimensions").
1323
1324       For example to grab from :0.0 using ffmpeg:
1325
1326               ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
1327
1328       Grab at position "10,20":
1329
1330               ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
1331
1332       Options
1333
1334       select_region
1335           Specify whether to select the grabbing area graphically using the
1336           pointer.  A value of 1 prompts the user to select the grabbing area
1337           graphically by clicking and dragging. A single click with no
1338           dragging will select the whole screen. A region with zero width or
1339           height will also select the whole screen. This option overwrites
1340           the video_size, grab_x, and grab_y options. Default value is 0.
1341
1342       draw_mouse
1343           Specify whether to draw the mouse pointer. A value of 0 specifies
1344           not to draw the pointer. Default value is 1.
1345
1346       follow_mouse
1347           Make the grabbed area follow the mouse. The argument can be
1348           "centered" or a number of pixels PIXELS.
1349
1350           When it is specified with "centered", the grabbing region follows
1351           the mouse pointer and keeps the pointer at the center of region;
1352           otherwise, the region follows only when the mouse pointer reaches
1353           within PIXELS (greater than zero) to the edge of region.
1354
1355           For example:
1356
1357                   ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
1358
1359           To follow only when the mouse pointer reaches within 100 pixels to
1360           edge:
1361
1362                   ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
1363
1364       framerate
1365           Set the grabbing frame rate. Default value is "ntsc", corresponding
1366           to a frame rate of "30000/1001".
1367
1368       show_region
1369           Show grabbed region on screen.
1370
1371           If show_region is specified with 1, then the grabbing region will
1372           be indicated on screen. With this option, it is easy to know what
1373           is being grabbed if only a portion of the screen is grabbed.
1374
1375       region_border
1376           Set the region border thickness if -show_region 1 is used.  Range
1377           is 1 to 128 and default is 3 (XCB-based x11grab only).
1378
1379           For example:
1380
1381                   ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
1382
1383           With follow_mouse:
1384
1385                   ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
1386
1387       window_id
1388           Grab this window, instead of the whole screen. Default value is 0,
1389           which maps to the whole screen (root window).
1390
1391           The id of a window can be found using the xwininfo program,
1392           possibly with options -tree and -root.
1393
1394           If the window is later enlarged, the new area is not recorded.
1395           Video ends when the window is closed, unmapped (i.e., iconified) or
1396           shrunk beyond the video size (which defaults to the initial window
1397           size).
1398
1399           This option disables options follow_mouse and select_region.
1400
1401       video_size
1402           Set the video frame size. Default is the full desktop or window.
1403
1404       grab_x
1405       grab_y
1406           Set the grabbing region coordinates. They are expressed as offset
1407           from the top left corner of the X11 window and correspond to the
1408           x_offset and y_offset parameters in the device name. The default
1409           value for both options is 0.
1410

OUTPUT DEVICES

1412       Output devices are configured elements in FFmpeg that can write
1413       multimedia data to an output device attached to your system.
1414
1415       When you configure your FFmpeg build, all the supported output devices
1416       are enabled by default. You can list all available ones using the
1417       configure option "--list-outdevs".
1418
1419       You can disable all the output devices using the configure option
1420       "--disable-outdevs", and selectively enable an output device using the
1421       option "--enable-outdev=OUTDEV", or you can disable a particular input
1422       device using the option "--disable-outdev=OUTDEV".
1423
1424       The option "-devices" of the ff* tools will display the list of enabled
1425       output devices.
1426
1427       A description of the currently available output devices follows.
1428
1429   alsa
1430       ALSA (Advanced Linux Sound Architecture) output device.
1431
1432       Examples
1433
1434       •   Play a file on default ALSA device:
1435
1436                   ffmpeg -i INPUT -f alsa default
1437
1438       •   Play a file on soundcard 1, audio device 7:
1439
1440                   ffmpeg -i INPUT -f alsa hw:1,7
1441
1442   AudioToolbox
1443       AudioToolbox output device.
1444
1445       Allows native output to CoreAudio devices on OSX.
1446
1447       The output filename can be empty (or "-") to refer to the default
1448       system output device or a number that refers to the device index as
1449       shown using: "-list_devices true".
1450
1451       Alternatively, the audio input device can be chosen by index using the
1452
1453           B<-audio_device_index E<lt>INDEXE<gt>>
1454
1455       , overriding any device name or index given in the input filename.
1456
1457       All available devices can be enumerated by using -list_devices true,
1458       listing all device names, UIDs and corresponding indices.
1459
1460       Options
1461
1462       AudioToolbox supports the following options:
1463
1464       -audio_device_index <INDEX>
1465           Specify the audio device by its index. Overrides anything given in
1466           the output filename.
1467
1468       Examples
1469
1470       •   Print the list of supported devices and output a sine wave to the
1471           default device:
1472
1473                   $ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -list_devices true -
1474
1475       •   Output a sine wave to the device with the index 2, overriding any
1476           output filename:
1477
1478                   $ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -audio_device_index 2 -
1479
1480   caca
1481       CACA output device.
1482
1483       This output device allows one to show a video stream in CACA window.
1484       Only one CACA window is allowed per application, so you can have only
1485       one instance of this output device in an application.
1486
1487       To enable this output device you need to configure FFmpeg with
1488       "--enable-libcaca".  libcaca is a graphics library that outputs text
1489       instead of pixels.
1490
1491       For more information about libcaca, check:
1492       <http://caca.zoy.org/wiki/libcaca>
1493
1494       Options
1495
1496       window_title
1497           Set the CACA window title, if not specified default to the filename
1498           specified for the output device.
1499
1500       window_size
1501           Set the CACA window size, can be a string of the form widthxheight
1502           or a video size abbreviation.  If not specified it defaults to the
1503           size of the input video.
1504
1505       driver
1506           Set display driver.
1507
1508       algorithm
1509           Set dithering algorithm. Dithering is necessary because the picture
1510           being rendered has usually far more colours than the available
1511           palette.  The accepted values are listed with "-list_dither
1512           algorithms".
1513
1514       antialias
1515           Set antialias method. Antialiasing smoothens the rendered image and
1516           avoids the commonly seen staircase effect.  The accepted values are
1517           listed with "-list_dither antialiases".
1518
1519       charset
1520           Set which characters are going to be used when rendering text.  The
1521           accepted values are listed with "-list_dither charsets".
1522
1523       color
1524           Set color to be used when rendering text.  The accepted values are
1525           listed with "-list_dither colors".
1526
1527       list_drivers
1528           If set to true, print a list of available drivers and exit.
1529
1530       list_dither
1531           List available dither options related to the argument.  The
1532           argument must be one of "algorithms", "antialiases", "charsets",
1533           "colors".
1534
1535       Examples
1536
1537       •   The following command shows the ffmpeg output is an CACA window,
1538           forcing its size to 80x25:
1539
1540                   ffmpeg -i INPUT -c:v rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca -
1541
1542       •   Show the list of available drivers and exit:
1543
1544                   ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true -
1545
1546       •   Show the list of available dither colors and exit:
1547
1548                   ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
1549
1550   decklink
1551       The decklink output device provides playback capabilities for
1552       Blackmagic DeckLink devices.
1553
1554       To enable this output device, you need the Blackmagic DeckLink SDK and
1555       you need to configure with the appropriate "--extra-cflags" and
1556       "--extra-ldflags".  On Windows, you need to run the IDL files through
1557       widl.
1558
1559       DeckLink is very picky about the formats it supports. Pixel format is
1560       always uyvy422, framerate, field order and video size must be
1561       determined for your device with -list_formats 1. Audio sample rate is
1562       always 48 kHz.
1563
1564       Options
1565
1566       list_devices
1567           If set to true, print a list of devices and exit.  Defaults to
1568           false. This option is deprecated, please use the "-sinks" option of
1569           ffmpeg to list the available output devices.
1570
1571       list_formats
1572           If set to true, print a list of supported formats and exit.
1573           Defaults to false.
1574
1575       preroll
1576           Amount of time to preroll video in seconds.  Defaults to 0.5.
1577
1578       duplex_mode
1579           Sets the decklink device duplex/profile mode. Must be unset, half,
1580           full, one_sub_device_full, one_sub_device_half,
1581           two_sub_device_full, four_sub_device_half Defaults to unset.
1582
1583           Note: DeckLink SDK 11.0 have replaced the duplex property by a
1584           profile property.  For the DeckLink Duo 2 and DeckLink Quad 2, a
1585           profile is shared between any 2 sub-devices that utilize the same
1586           connectors. For the DeckLink 8K Pro, a profile is shared between
1587           all 4 sub-devices. So DeckLink 8K Pro support four profiles.
1588
1589           Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0):
1590           one_sub_device_full, one_sub_device_half, two_sub_device_full,
1591           four_sub_device_half
1592
1593           Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: half,
1594           full
1595
1596       timing_offset
1597           Sets the genlock timing pixel offset on the used output.  Defaults
1598           to unset.
1599
1600       link
1601           Sets the SDI video link configuration on the used output. Must be
1602           unset, single link SDI, dual link SDI or quad link SDI.  Defaults
1603           to unset.
1604
1605       sqd Enable Square Division Quad Split mode for Quad-link SDI output.
1606           Must be unset, true or false.  Defaults to unset.
1607
1608       level_a
1609           Enable SMPTE Level A mode on the used output.  Must be unset, true
1610           or false.  Defaults to unset.
1611
1612       Examples
1613
1614       •   List output devices:
1615
1616                   ffmpeg -sinks decklink
1617
1618       •   List supported formats:
1619
1620                   ffmpeg -i test.avi -f decklink -list_formats 1 'DeckLink Mini Monitor'
1621
1622       •   Play video clip:
1623
1624                   ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 'DeckLink Mini Monitor'
1625
1626       •   Play video clip with non-standard framerate or video size:
1627
1628                   ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink Mini Monitor'
1629
1630   fbdev
1631       Linux framebuffer output device.
1632
1633       The Linux framebuffer is a graphic hardware-independent abstraction
1634       layer to show graphics on a computer monitor, typically on the console.
1635       It is accessed through a file device node, usually /dev/fb0.
1636
1637       For more detailed information read the file
1638       Documentation/fb/framebuffer.txt included in the Linux source tree.
1639
1640       Options
1641
1642       xoffset
1643       yoffset
1644           Set x/y coordinate of top left corner. Default is 0.
1645
1646       Examples
1647
1648       Play a file on framebuffer device /dev/fb0.  Required pixel format
1649       depends on current framebuffer settings.
1650
1651               ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0
1652
1653       See also <http://linux-fbdev.sourceforge.net/>, and fbset(1).
1654
1655   opengl
1656       OpenGL output device.
1657
1658       To enable this output device you need to configure FFmpeg with
1659       "--enable-opengl".
1660
1661       This output device allows one to render to OpenGL context.  Context may
1662       be provided by application or default SDL window is created.
1663
1664       When device renders to external context, application must implement
1665       handlers for following messages: "AV_DEV_TO_APP_CREATE_WINDOW_BUFFER" -
1666       create OpenGL context on current thread.
1667       "AV_DEV_TO_APP_PREPARE_WINDOW_BUFFER" - make OpenGL context current.
1668       "AV_DEV_TO_APP_DISPLAY_WINDOW_BUFFER" - swap buffers.
1669       "AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER" - destroy OpenGL context.
1670       Application is also required to inform a device about current
1671       resolution by sending "AV_APP_TO_DEV_WINDOW_SIZE" message.
1672
1673       Options
1674
1675       background
1676           Set background color. Black is a default.
1677
1678       no_window
1679           Disables default SDL window when set to non-zero value.
1680           Application must provide OpenGL context and both "window_size_cb"
1681           and "window_swap_buffers_cb" callbacks when set.
1682
1683       window_title
1684           Set the SDL window title, if not specified default to the filename
1685           specified for the output device.  Ignored when no_window is set.
1686
1687       window_size
1688           Set preferred window size, can be a string of the form widthxheight
1689           or a video size abbreviation.  If not specified it defaults to the
1690           size of the input video, downscaled according to the aspect ratio.
1691           Mostly usable when no_window is not set.
1692
1693       Examples
1694
1695       Play a file on SDL window using OpenGL rendering:
1696
1697               ffmpeg  -i INPUT -f opengl "window title"
1698
1699   oss
1700       OSS (Open Sound System) output device.
1701
1702   pulse
1703       PulseAudio output device.
1704
1705       To enable this output device you need to configure FFmpeg with
1706       "--enable-libpulse".
1707
1708       More information about PulseAudio can be found on
1709       <http://www.pulseaudio.org>
1710
1711       Options
1712
1713       server
1714           Connect to a specific PulseAudio server, specified by an IP
1715           address.  Default server is used when not provided.
1716
1717       name
1718           Specify the application name PulseAudio will use when showing
1719           active clients, by default it is the "LIBAVFORMAT_IDENT" string.
1720
1721       stream_name
1722           Specify the stream name PulseAudio will use when showing active
1723           streams, by default it is set to the specified output name.
1724
1725       device
1726           Specify the device to use. Default device is used when not
1727           provided.  List of output devices can be obtained with command
1728           pactl list sinks.
1729
1730       buffer_size
1731       buffer_duration
1732           Control the size and duration of the PulseAudio buffer. A small
1733           buffer gives more control, but requires more frequent updates.
1734
1735           buffer_size specifies size in bytes while buffer_duration specifies
1736           duration in milliseconds.
1737
1738           When both options are provided then the highest value is used
1739           (duration is recalculated to bytes using stream parameters). If
1740           they are set to 0 (which is default), the device will use the
1741           default PulseAudio duration value. By default PulseAudio set buffer
1742           duration to around 2 seconds.
1743
1744       prebuf
1745           Specify pre-buffering size in bytes. The server does not start with
1746           playback before at least prebuf bytes are available in the buffer.
1747           By default this option is initialized to the same value as
1748           buffer_size or buffer_duration (whichever is bigger).
1749
1750       minreq
1751           Specify minimum request size in bytes. The server does not request
1752           less than minreq bytes from the client, instead waits until the
1753           buffer is free enough to request more bytes at once. It is
1754           recommended to not set this option, which will initialize this to a
1755           value that is deemed sensible by the server.
1756
1757       Examples
1758
1759       Play a file on default device on default server:
1760
1761               ffmpeg  -i INPUT -f pulse "stream name"
1762
1763   sdl
1764       SDL (Simple DirectMedia Layer) output device.
1765
1766       "sdl2" can be used as alias for "sdl".
1767
1768       This output device allows one to show a video stream in an SDL window.
1769       Only one SDL window is allowed per application, so you can have only
1770       one instance of this output device in an application.
1771
1772       To enable this output device you need libsdl installed on your system
1773       when configuring your build.
1774
1775       For more information about SDL, check: <http://www.libsdl.org/>
1776
1777       Options
1778
1779       window_title
1780           Set the SDL window title, if not specified default to the filename
1781           specified for the output device.
1782
1783       icon_title
1784           Set the name of the iconified SDL window, if not specified it is
1785           set to the same value of window_title.
1786
1787       window_size
1788           Set the SDL window size, can be a string of the form widthxheight
1789           or a video size abbreviation.  If not specified it defaults to the
1790           size of the input video, downscaled according to the aspect ratio.
1791
1792       window_x
1793       window_y
1794           Set the position of the window on the screen.
1795
1796       window_fullscreen
1797           Set fullscreen mode when non-zero value is provided.  Default value
1798           is zero.
1799
1800       window_enable_quit
1801           Enable quit action (using window button or keyboard key) when non-
1802           zero value is provided.  Default value is 1 (enable quit action)
1803
1804       Interactive commands
1805
1806       The window created by the device can be controlled through the
1807       following interactive commands.
1808
1809       q, ESC
1810           Quit the device immediately.
1811
1812       Examples
1813
1814       The following command shows the ffmpeg output is an SDL window, forcing
1815       its size to the qcif format:
1816
1817               ffmpeg -i INPUT -c:v rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
1818
1819   sndio
1820       sndio audio output device.
1821
1822   v4l2
1823       Video4Linux2 output device.
1824
1825   xv
1826       XV (XVideo) output device.
1827
1828       This output device allows one to show a video stream in a X Window
1829       System window.
1830
1831       Options
1832
1833       display_name
1834           Specify the hardware display name, which determines the display and
1835           communications domain to be used.
1836
1837           The display name or DISPLAY environment variable can be a string in
1838           the format hostname[:number[.screen_number]].
1839
1840           hostname specifies the name of the host machine on which the
1841           display is physically attached. number specifies the number of the
1842           display server on that host machine. screen_number specifies the
1843           screen to be used on that server.
1844
1845           If unspecified, it defaults to the value of the DISPLAY environment
1846           variable.
1847
1848           For example, "dual-headed:0.1" would specify screen 1 of display 0
1849           on the machine named ``dual-headed''.
1850
1851           Check the X11 specification for more detailed information about the
1852           display name format.
1853
1854       window_id
1855           When set to non-zero value then device doesn't create new window,
1856           but uses existing one with provided window_id. By default this
1857           options is set to zero and device creates its own window.
1858
1859       window_size
1860           Set the created window size, can be a string of the form
1861           widthxheight or a video size abbreviation. If not specified it
1862           defaults to the size of the input video.  Ignored when window_id is
1863           set.
1864
1865       window_x
1866       window_y
1867           Set the X and Y window offsets for the created window. They are
1868           both set to 0 by default. The values may be ignored by the window
1869           manager.  Ignored when window_id is set.
1870
1871       window_title
1872           Set the window title, if not specified default to the filename
1873           specified for the output device. Ignored when window_id is set.
1874
1875       For more information about XVideo see <http://www.x.org/>.
1876
1877       Examples
1878
1879       •   Decode, display and encode video input with ffmpeg at the same
1880           time:
1881
1882                   ffmpeg -i INPUT OUTPUT -f xv display
1883
1884       •   Decode and display the input video to multiple X11 windows:
1885
1886                   ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
1887

SEE ALSO

1889       ffmpeg(1), ffplay(1), ffprobe(1), libavdevice(3)
1890

AUTHORS

1892       The FFmpeg developers.
1893
1894       For details about the authorship, see the Git history of the project
1895       (https://git.ffmpeg.org/ffmpeg), e.g. by typing the command git log in
1896       the FFmpeg source directory, or browsing the online repository at
1897       <https://git.ffmpeg.org/ffmpeg>.
1898
1899       Maintainers for the specific components are listed in the file
1900       MAINTAINERS in the source code tree.
1901
1902
1903
1904                                                             FFMPEG-DEVICES(1)
Impressum