FFMPEG-DEVICES(1) FFMPEG-DEVICES(1) NNAAMMEE ffmpeg-devices - FFmpeg devices DDEESSCCRRIIPPTTIIOONN This document describes the input and output devices provided by the libavdevice library. DDEEVVIICCEE OOPPTTIIOONNSS The libavdevice library provides the same interface as libavformat. Namely, an input device is considered like a demuxer, and an output device like a muxer, and the interface and generic device options are the same provided by libavformat (see the ffmpeg-formats manual). In addition each input or output device may support so-called private options, which are specific for that component. Options may be set by specifying -_o_p_t_i_o_n _v_a_l_u_e in the FFmpeg tools, or by setting the value explicitly in the device "AVFormatContext" options or using the _l_i_b_a_v_u_t_i_l_/_o_p_t_._h API for programmatic use. IINNPPUUTT DDEEVVIICCEESS Input devices are configured elements in FFmpeg which enable accessing the data coming from a multimedia device attached to your system. When you configure your FFmpeg build, all the supported input devices are enabled by default. You can list all available ones using the con- figure option "--list-indevs". You can disable all the input devices using the configure option "--disable-indevs", and selectively enable an input device using the option "--enable-indev=_I_N_D_E_V", or you can disable a particular input device using the option "--disable-indev=_I_N_D_E_V". The option "-devices" of the ff* tools will display the list of sup- ported input devices. A description of the currently available input devices follows. aallssaa ALSA (Advanced Linux Sound Architecture) input device. To enable this input device during configuration you need libasound installed on your system. This device allows capturing from an ALSA device. The name of the device to capture has to be an ALSA card identifier. An ALSA identifier has the syntax: hw:[,[,]] where the _D_E_V and _S_U_B_D_E_V components are optional. The three arguments (in order: _C_A_R_D,_D_E_V,_S_U_B_D_E_V) specify card number or identifier, device number and subdevice number (-1 means any). To see the list of cards currently recognized by your system check the files _/_p_r_o_c_/_a_s_o_u_n_d_/_c_a_r_d_s and _/_p_r_o_c_/_a_s_o_u_n_d_/_d_e_v_i_c_e_s. For example to capture with ffffmmppeegg from an ALSA device with card id 0, you may run the command: ffmpeg -f alsa -i hw:0 alsaout.wav For more information see: _O_p_t_i_o_n_s ssaammppllee__rraattee Set the sample rate in Hz. Default is 48000. cchhaannnneellss Set the number of channels. Default is 2. aannddrrooiidd__ccaammeerraa Android camera input device. This input devices uses the Android Camera2 NDK API which is available on devices with API level 24+. The availability of android_camera is autodetected during configuration. This device allows capturing from all cameras on an Android device, which are integrated into the Camera2 NDK API. The available cameras are enumerated internally and can be selected with the _c_a_m_e_r_a___i_n_d_e_x parameter. The input file string is discarded. Generally the back facing camera has index 0 while the front facing camera has index 1. _O_p_t_i_o_n_s vviiddeeoo__ssiizzee Set the video size given as a string such as 640x480 or hd720. Falls back to the first available configuration reported by Android if requested video size is not available or by default. ffrraammeerraattee Set the video framerate. Falls back to the first available config- uration reported by Android if requested framerate is not available or by default (-1). ccaammeerraa__iinnddeexx Set the index of the camera to use. Default is 0. iinnppuutt__qquueeuuee__ssiizzee Set the maximum number of frames to buffer. Default is 5. aavvffoouunnddaattiioonn AVFoundation input device. AVFoundation is the currently recommended framework by Apple for streamgrabbing on OSX >= 10.7 as well as on iOS. The input filename has to be given in the following syntax: -i "[[VIDEO]:[AUDIO]]" The first entry selects the video input while the latter selects the audio input. The stream has to be specified by the device name or the device index as shown by the device list. Alternatively, the video and/or audio input device can be chosen by index using the B<-video_device_index EINDEXE> and/or B<-audio_device_index EINDEXE> , overriding any device name or index given in the input filename. All available devices can be enumerated by using --lliisstt__ddeevviicceess ttrruuee, listing all device names and corresponding indices. There are two device name aliases: "default" Select the AVFoundation default device of the corresponding type. "none" Do not record the corresponding media type. This is equivalent to specifying an empty device name or index. _O_p_t_i_o_n_s AVFoundation supports the following options: --lliisstt__ddeevviicceess <> If set to true, a list of all available input devices is given showing all device names and indices. --vviiddeeoo__ddeevviiccee__iinnddeexx <> Specify the video device by its index. Overrides anything given in the input filename. --aauuddiioo__ddeevviiccee__iinnddeexx <> Specify the audio device by its index. Overrides anything given in the input filename. --ppiixxeell__ffoorrmmaatt <> Request the video device to use a specific pixel format. If the specified format is not supported, a list of available formats is given and the first one in this list is used instead. Available pixel formats are: "monob, rgb555be, rgb555le, rgb565be, rgb565le, rgb24, bgr24, 0rgb, bgr0, 0bgr, rgb0, bgr48be, uyvy422, yuva444p, yuva444p16le, yuv444p, yuv422p16, yuv422p10, yuv444p10, yuv420p, nv12, yuyv422, gray" --ffrraammeerraattee Set the grabbing frame rate. Default is "ntsc", corresponding to a frame rate of "30000/1001". --vviiddeeoo__ssiizzee Set the video frame size. --ccaappttuurree__ccuurrssoorr Capture the mouse pointer. Default is 0. --ccaappttuurree__mmoouussee__cclliicckkss Capture the screen mouse clicks. Default is 0. --ccaappttuurree__rraaww__ddaattaa Capture the raw device data. Default is 0. Using this option may result in receiving the underlying data delivered to the AVFounda- tion framework. E.g. for muxed devices that sends raw DV data to the framework (like tape-based camcorders), setting this option to false results in extracted video frames captured in the designated pixel format only. Setting this option to true results in receiving the raw DV stream untouched. _E_x_a_m_p_l_e_s +o Print the list of AVFoundation supported devices and exit: $ ffmpeg -f avfoundation -list_devices true -i "" +o Record video from video device 0 and audio from audio device 0 into out.avi: $ ffmpeg -f avfoundation -i "0:0" out.avi +o Record video from video device 2 and audio from audio device 1 into out.avi: $ ffmpeg -f avfoundation -video_device_index 2 -i ":1" out.avi +o Record video from the system default video device using the pixel format bgr0 and do not record any audio into out.avi: $ ffmpeg -f avfoundation -pixel_format bgr0 -i "default:none" out.avi +o Record raw DV data from a suitable input device and write the out- put into out.dv: $ ffmpeg -f avfoundation -capture_raw_data true -i "zr100:none" out.dv bbkkttrr BSD video input device. _O_p_t_i_o_n_s ffrraammeerraattee Set the frame rate. vviiddeeoo__ssiizzee Set the video frame size. Default is "vga". ssttaannddaarrdd Available values are: ppaall nnttsscc sseeccaamm ppaallnn ppaallmm nnttssccjj ddeecckklliinnkk The decklink input device provides capture capabilities for Blackmagic DeckLink devices. To enable this input device, you need the Blackmagic DeckLink SDK and you need to configure with the appropriate "--extra-cflags" and "--extra-ldflags". On Windows, you need to run the IDL files through wwiiddll. DeckLink is very picky about the formats it supports. Pixel format of the input can be set with rraaww__ffoorrmmaatt. Framerate and video size must be determined for your device with --lliisstt__ffoorrmmaattss 11. Audio sample rate is always 48 kHz and the number of channels can be 2, 8 or 16. Note that all audio channels are bundled in one single audio track. _O_p_t_i_o_n_s lliisstt__ddeevviicceess If set to ttrruuee, print a list of devices and exit. Defaults to ffaallssee. This option is deprecated, please use the "-sources" option of ffmpeg to list the available input devices. lliisstt__ffoorrmmaattss If set to ttrruuee, print a list of supported formats and exit. Defaults to ffaallssee. ffoorrmmaatt__ccooddee <> This sets the input video format to the format given by the FourCC. To see the supported values of your device(s) use lliisstt__ffoorrmmaattss. Note that there is a FourCC ''ppaall '' that can also be used as ppaall (3 letters). Default behavior is autodetection of the input video format, if the hardware supports it. rraaww__ffoorrmmaatt Set the pixel format of the captured video. Available values are: aauuttoo This is the default which means 8-bit YUV 422 or 8-bit ARGB if format autodetection is used, 8-bit YUV 422 otherwise. uuyyvvyy442222 8-bit YUV 422. yyuuvv442222pp1100 10-bit YUV 422. aarrggbb 8-bit RGB. bbggrraa 8-bit RGB. rrggbb1100 10-bit RGB. tteelleetteexxtt__lliinneess If set to nonzero, an additional teletext stream will be captured from the vertical ancillary data. Both SD PAL (576i) and HD (1080i or 1080p) sources are supported. In case of HD sources, OP47 pack- ets are decoded. This option is a bitmask of the SD PAL VBI lines captured, specifi- cally lines 6 to 22, and lines 318 to 335. Line 6 is the LSB in the mask. Selected lines which do not contain teletext information will be ignored. You can use the special aallll constant to select all pos- sible lines, or ssttaannddaarrdd to skip lines 6, 318 and 319, which are not compatible with all receivers. For SD sources, ffmpeg needs to be compiled with "--enable-libzvbi". For HD sources, on older (pre-4K) DeckLink card models you have to capture in 10 bit mode. cchhaannnneellss Defines number of audio channels to capture. Must be 22, 88 or 1166. Defaults to 22. dduupplleexx__mmooddee Sets the decklink device duplex/profile mode. Must be uunnsseett, hhaallff, ffuullll, oonnee__ssuubb__ddeevviiccee__ffuullll, oonnee__ssuubb__ddeevviiccee__hhaallff, ttwwoo__ssuubb__ddeevviiccee__ffuullll, ffoouurr__ssuubb__ddeevviiccee__hhaallff Defaults to uunnsseett. Note: DeckLink SDK 11.0 have replaced the duplex property by a pro- file property. For the DeckLink Duo 2 and DeckLink Quad 2, a pro- file is shared between any 2 sub-devices that utilize the same con- nectors. For the DeckLink 8K Pro, a profile is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles. Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0): oonnee__ssuubb__ddeevviiccee__ffuullll, oonnee__ssuubb__ddeevviiccee__hhaallff, ttwwoo__ssuubb__ddeevviiccee__ffuullll, ffoouurr__ssuubb__ddeevviiccee__hhaallff Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: hhaallff, ffuullll ttiimmeeccooddee__ffoorrmmaatt Timecode type to include in the frame and video stream metadata. Must be nnoonnee, rrpp118888vviittcc, rrpp118888vviittcc22, rrpp118888llttcc, rrpp118888hhffrr, rrpp118888aannyy, vviittcc, vviittcc22, or sseerriiaall. Defaults to nnoonnee (not included). In order to properly support 50/60 fps timecodes, the ordering of the queried timecode types for rrpp118888aannyy is HFR, VITC1, VITC2 and LTC for >30 fps content. Note that this is slightly different to the ordering used by the DeckLink API, which is HFR, VITC1, LTC, VITC2. vviiddeeoo__iinnppuutt Sets the video input source. Must be uunnsseett, ssddii, hhddmmii, ooppttiiccaall__ssddii, ccoommppoonneenntt, ccoommppoossiittee or ss__vviiddeeoo. Defaults to uunnsseett. aauuddiioo__iinnppuutt Sets the audio input source. Must be uunnsseett, eemmbbeeddddeedd, aaeess__eebbuu, aannaa-- lloogg, aannaalloogg__xxllrr, aannaalloogg__rrccaa or mmiiccrroopphhoonnee. Defaults to uunnsseett. vviiddeeoo__ppttss Sets the video packet timestamp source. Must be vviiddeeoo, aauuddiioo, rreeff-- eerreennccee, wwaallllcclloocckk or aabbss__wwaallllcclloocckk. Defaults to vviiddeeoo. aauuddiioo__ppttss Sets the audio packet timestamp source. Must be vviiddeeoo, aauuddiioo, rreeff-- eerreennccee, wwaallllcclloocckk or aabbss__wwaallllcclloocckk. Defaults to aauuddiioo. ddrraaww__bbaarrss If set to ttrruuee, color bars are drawn in the event of a signal loss. Defaults to ttrruuee. qquueeuuee__ssiizzee Sets maximum input buffer size in bytes. If the buffering reaches this value, incoming frames will be dropped. Defaults to 11007733774411882244. aauuddiioo__ddeepptthh Sets the audio sample bit depth. Must be 1166 or 3322. Defaults to 1166. ddeecckklliinnkk__ccooppyyttss If set to ttrruuee, timestamps are forwarded as they are without remov- ing the initial offset. Defaults to ffaallssee. ttiimmeessttaammpp__aalliiggnn Capture start time alignment in seconds. If set to nonzero, input frames are dropped till the system timestamp aligns with configured value. Alignment difference of up to one frame duration is toler- ated. This is useful for maintaining input synchronization across N different hardware devices deployed for 'N-way' redundancy. The system time of different hardware devices should be synchronized with protocols such as NTP or PTP, before using this option. Note that this method is not foolproof. In some border cases input syn- chronization may not happen due to thread scheduling jitters in the OS. Either sync could go wrong by 1 frame or in a rarer case ttiimmee-- ssttaammpp__aalliiggnn seconds. Defaults to 00. wwaaiitt__ffoorr__ttcc ((_b_o_o_l)) Drop frames till a frame with timecode is received. Sometimes serial timecode isn't received with the first input frame. If that happens, the stored stream timecode will be inaccurate. If this option is set to ttrruuee, input frames are dropped till a frame with timecode is received. Option _t_i_m_e_c_o_d_e___f_o_r_m_a_t must be specified. Defaults to ffaallssee. eennaabbllee__kkllvv((_b_o_o_l)) If set to ttrruuee, extracts KLV data from VANC and outputs KLV pack- ets. KLV VANC packets are joined based on MID and PSC fields and aggregated into one KLV packet. Defaults to ffaallssee. _E_x_a_m_p_l_e_s +o List input devices: ffmpeg -sources decklink +o List supported formats: ffmpeg -f decklink -list_formats 1 -i 'Intensity Pro' +o Capture video clip at 1080i50: ffmpeg -format_code Hi50 -f decklink -i 'Intensity Pro' -c:a copy -c:v copy output.avi +o Capture video clip at 1080i50 10 bit: ffmpeg -raw_format yuv422p10 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi +o Capture video clip at 1080i50 with 16 audio channels: ffmpeg -channels 16 -format_code Hi50 -f decklink -i 'UltraStudio Mini Recorder' -c:a copy -c:v copy output.avi ddsshhooww Windows DirectShow input device. DirectShow support is enabled when FFmpeg is built with the mingw-w64 project. Currently only audio and video devices are supported. Multiple devices may be opened as separate inputs, but they may also be opened on the same input, which should improve synchronism between them. The input name should be in the format: =[:=] where _T_Y_P_E can be either _a_u_d_i_o or _v_i_d_e_o, and _N_A_M_E is the device's name or alternative name.. _O_p_t_i_o_n_s If no options are specified, the device's defaults are used. If the device does not support the requested options, it will fail to open. vviiddeeoo__ssiizzee Set the video size in the captured video. ffrraammeerraattee Set the frame rate in the captured video. ssaammppllee__rraattee Set the sample rate (in Hz) of the captured audio. ssaammppllee__ssiizzee Set the sample size (in bits) of the captured audio. cchhaannnneellss Set the number of channels in the captured audio. lliisstt__ddeevviicceess If set to ttrruuee, print a list of devices and exit. lliisstt__ooppttiioonnss If set to ttrruuee, print a list of selected device's options and exit. vviiddeeoo__ddeevviiccee__nnuummbbeerr Set video device number for devices with the same name (starts at 0, defaults to 0). aauuddiioo__ddeevviiccee__nnuummbbeerr Set audio device number for devices with the same name (starts at 0, defaults to 0). ppiixxeell__ffoorrmmaatt Select pixel format to be used by DirectShow. This may only be set when the video codec is not set or set to rawvideo. aauuddiioo__bbuuffffeerr__ssiizzee Set audio device buffer size in milliseconds (which can directly impact latency, depending on the device). Defaults to using the audio device's default buffer size (typically some multiple of 500ms). Setting this value too low can degrade performance. See also vviiddeeoo__ppiinn__nnaammee Select video capture pin to use by name or alternative name. aauuddiioo__ppiinn__nnaammee Select audio capture pin to use by name or alternative name. ccrroossssbbaarr__vviiddeeoo__iinnppuutt__ppiinn__nnuummbbeerr Select video input pin number for crossbar device. This will be routed to the crossbar device's Video Decoder output pin. Note that changing this value can affect future invocations (sets a new default) until system reboot occurs. ccrroossssbbaarr__aauuddiioo__iinnppuutt__ppiinn__nnuummbbeerr Select audio input pin number for crossbar device. This will be routed to the crossbar device's Audio Decoder output pin. Note that changing this value can affect future invocations (sets a new default) until system reboot occurs. sshhooww__vviiddeeoo__ddeevviiccee__ddiiaalloogg If set to ttrruuee, before capture starts, popup a display dialog to the end user, allowing them to change video filter properties and configurations manually. Note that for crossbar devices, adjusting values in this dialog may be needed at times to toggle between PAL (25 fps) and NTSC (29.97) input frame rates, sizes, interlacing, etc. Changing these values can enable different scan rates/frame rates and avoiding green bars at the bottom, flickering scan lines, etc. Note that with some devices, changing these properties can also affect future invocations (sets new defaults) until system reboot occurs. sshhooww__aauuddiioo__ddeevviiccee__ddiiaalloogg If set to ttrruuee, before capture starts, popup a display dialog to the end user, allowing them to change audio filter properties and configurations manually. sshhooww__vviiddeeoo__ccrroossssbbaarr__ccoonnnneeccttiioonn__ddiiaalloogg If set to ttrruuee, before capture starts, popup a display dialog to the end user, allowing them to manually modify crossbar pin rout- ings, when it opens a video device. sshhooww__aauuddiioo__ccrroossssbbaarr__ccoonnnneeccttiioonn__ddiiaalloogg If set to ttrruuee, before capture starts, popup a display dialog to the end user, allowing them to manually modify crossbar pin rout- ings, when it opens an audio device. sshhooww__aannaalloogg__ttvv__ttuunneerr__ddiiaalloogg If set to ttrruuee, before capture starts, popup a display dialog to the end user, allowing them to manually modify TV channels and fre- quencies. sshhooww__aannaalloogg__ttvv__ttuunneerr__aauuddiioo__ddiiaalloogg If set to ttrruuee, before capture starts, popup a display dialog to the end user, allowing them to manually modify TV audio (like mono vs. stereo, Language A,B or C). aauuddiioo__ddeevviiccee__llooaadd Load an audio capture filter device from file instead of searching it by name. It may load additional parameters too, if the filter supports the serialization of its properties to. To use this an audio capture source has to be specified, but it can be anything even fake one. aauuddiioo__ddeevviiccee__ssaavvee Save the currently used audio capture filter device and its parame- ters (if the filter supports it) to a file. If a file with the same name exists it will be overwritten. vviiddeeoo__ddeevviiccee__llooaadd Load a video capture filter device from file instead of searching it by name. It may load additional parameters too, if the filter supports the serialization of its properties to. To use this a video capture source has to be specified, but it can be anything even fake one. vviiddeeoo__ddeevviiccee__ssaavvee Save the currently used video capture filter device and its parame- ters (if the filter supports it) to a file. If a file with the same name exists it will be overwritten. uussee__vviiddeeoo__ddeevviiccee__ttiimmeessttaammppss If set to ffaallssee, the timestamp for video frames will be derived from the wallclock instead of the timestamp provided by the capture device. This allows working around devices that provide unreliable timestamps. _E_x_a_m_p_l_e_s +o Print the list of DirectShow supported devices and exit: $ ffmpeg -list_devices true -f dshow -i dummy +o Open video device _C_a_m_e_r_a: $ ffmpeg -f dshow -i video="Camera" +o Open second video device with name _C_a_m_e_r_a: $ ffmpeg -f dshow -video_device_number 1 -i video="Camera" +o Open video device _C_a_m_e_r_a and audio device _M_i_c_r_o_p_h_o_n_e: $ ffmpeg -f dshow -i video="Camera":audio="Microphone" +o Print the list of supported options in selected device and exit: $ ffmpeg -list_options true -f dshow -i video="Camera" +o Specify pin names to capture by name or alternative name, specify alternative device name: $ 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" +o Configure a crossbar device, specifying crossbar pins, allow user to adjust video capture properties at startup: $ ffmpeg -f dshow -show_video_device_dialog true -crossbar_video_input_pin_number 0 -crossbar_audio_input_pin_number 3 -i video="AVerMedia BDA Analog Capture":audio="AVerMedia BDA Analog Capture" ffbbddeevv Linux framebuffer input device. The Linux framebuffer is a graphic hardware-independent abstraction layer to show graphics on a computer monitor, typically on the console. It is accessed through a file device node, usually _/_d_e_v_/_f_b_0. For more detailed information read the file Documentation/fb/frame- buffer.txt included in the Linux source tree. See also , and _f_b_s_e_t(1). To record from the framebuffer device _/_d_e_v_/_f_b_0 with ffffmmppeegg: ffmpeg -f fbdev -framerate 10 -i /dev/fb0 out.avi You can take a single screenshot image with the command: ffmpeg -f fbdev -framerate 1 -i /dev/fb0 -frames:v 1 screenshot.jpeg _O_p_t_i_o_n_s ffrraammeerraattee Set the frame rate. Default is 25. ggddiiggrraabb Win32 GDI-based screen capture device. This device allows you to capture a region of the display on Windows. There are two options for the input filename: desktop or title= The first option will capture the entire desktop, or a fixed region of the desktop. The second option will instead capture the contents of a single window, regardless of its position on the screen. For example, to grab the entire desktop using ffffmmppeegg: ffmpeg -f gdigrab -framerate 6 -i desktop out.mpg Grab a 640x480 region at position "10,20": ffmpeg -f gdigrab -framerate 6 -offset_x 10 -offset_y 20 -video_size vga -i desktop out.mpg Grab the contents of the window named "Calculator" ffmpeg -f gdigrab -framerate 6 -i title=Calculator out.mpg _O_p_t_i_o_n_s ddrraaww__mmoouussee Specify whether to draw the mouse pointer. Use the value 0 to not draw the pointer. Default value is 1. ffrraammeerraattee Set the grabbing frame rate. Default value is "ntsc", corresponding to a frame rate of "30000/1001". sshhooww__rreeggiioonn Show grabbed region on screen. If _s_h_o_w___r_e_g_i_o_n is specified with 1, then the grabbing region will be indicated on screen. With this option, it is easy to know what is being grabbed if only a portion of the screen is grabbed. Note that _s_h_o_w___r_e_g_i_o_n is incompatible with grabbing the contents of a single window. For example: ffmpeg -f gdigrab -show_region 1 -framerate 6 -video_size cif -offset_x 10 -offset_y 20 -i desktop out.mpg vviiddeeoo__ssiizzee Set the video frame size. The default is to capture the full screen if _d_e_s_k_t_o_p is selected, or the full window size if _t_i_t_l_e_=_w_i_n_- _d_o_w___t_i_t_l_e is selected. ooffffsseett__xx When capturing a region with _v_i_d_e_o___s_i_z_e, set the distance from the left edge of the screen or desktop. Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned to the left of your primary monitor, you will need to use a negative _o_f_f_- _s_e_t___x value to move the region to that monitor. ooffffsseett__yy When capturing a region with _v_i_d_e_o___s_i_z_e, set the distance from the top edge of the screen or desktop. Note that the offset calculation is from the top left corner of the primary monitor on Windows. If you have a monitor positioned above your primary monitor, you will need to use a negative _o_f_f_s_e_t___y value to move the region to that monitor. iieecc6611888833 FireWire DV/HDV input device using libiec61883. To enable this input device, you need libiec61883, libraw1394 and libavc1394 installed on your system. Use the configure option "--enable-libiec61883" to compile with the device enabled. The iec61883 capture device supports capturing from a video device con- nected via IEEE1394 (FireWire), using libiec61883 and the new Linux FireWire stack (juju). This is the default DV/HDV input method in Linux Kernel 2.6.37 and later, since the old FireWire stack was removed. Specify the FireWire port to be used as input file, or "auto" to choose the first port connected. _O_p_t_i_o_n_s ddvvttyyppee Override autodetection of DV/HDV. This should only be used if auto detection does not work, or if usage of a different device type should be prohibited. Treating a DV device as HDV (or vice versa) will not work and result in undefined behavior. The values aauuttoo, ddvv and hhddvv are supported. ddvvbbuuffffeerr Set maximum size of buffer for incoming data, in frames. For DV, this is an exact value. For HDV, it is not frame exact, since HDV does not have a fixed frame size. ddvvgguuiidd Select the capture device by specifying its GUID. Capturing will only be performed from the specified device and fails if no device with the given GUID is found. This is useful to select the input if multiple devices are connected at the same time. Look at /sys/bus/firewire/devices to find out the GUIDs. _E_x_a_m_p_l_e_s +o Grab and show the input of a FireWire DV/HDV device. ffplay -f iec61883 -i auto +o Grab and record the input of a FireWire DV/HDV device, using a packet buffer of 100000 packets if the source is HDV. ffmpeg -f iec61883 -i auto -dvbuffer 100000 out.mpg jjaacckk JACK input device. To enable this input device during configuration you need libjack installed on your system. A JACK input device creates one or more JACK writable clients, one for each audio channel, with name _c_l_i_e_n_t___n_a_m_e:input__N, where _c_l_i_e_n_t___n_a_m_e is the name provided by the application, and _N is a number which identi- fies the channel. Each writable client will send the acquired data to the FFmpeg input device. Once you have created one or more JACK readable clients, you need to connect them to one or more JACK writable clients. To connect or disconnect JACK clients you can use the jjaacckk__ccoonnnneecctt and jjaacckk__ddiissccoonnnneecctt programs, or do it through a graphical interface, for example with qqjjaacckkccttll. To list the JACK clients and their properties you can invoke the com- mand jjaacckk__llsspp. Follows an example which shows how to capture a JACK readable client with ffffmmppeegg. # Create a JACK writable client with name "ffmpeg". $ ffmpeg -f jack -i ffmpeg -y out.wav # Start the sample jack_metro readable client. $ jack_metro -b 120 -d 0.2 -f 4000 # List the current JACK clients. $ jack_lsp -c system:capture_1 system:capture_2 system:playback_1 system:playback_2 ffmpeg:input_1 metro:120_bpm # Connect metro to the ffmpeg writable client. $ jack_connect metro:120_bpm ffmpeg:input_1 For more information read: _O_p_t_i_o_n_s cchhaannnneellss Set the number of channels. Default is 2. kkmmssggrraabb KMS video input device. Captures the KMS scanout framebuffer associated with a specified CRTC or plane as a DRM object that can be passed to other hardware func- tions. Requires either DRM master or CAP_SYS_ADMIN to run. If you don't understand what all of that means, you probably don't want this. Look at xx1111ggrraabb instead. _O_p_t_i_o_n_s ddeevviiccee DRM device to capture on. Defaults to //ddeevv//ddrrii//ccaarrdd00. ffoorrmmaatt Pixel format of the framebuffer. This can be autodetected if you are running Linux 5.7 or later, but needs to be provided for ear- lier versions. Defaults to bbggrr00, which is the most common format used by the Linux console and Xorg X server. ffoorrmmaatt__mmooddiiffiieerr Format modifier to signal on output frames. This is necessary to import correctly into some APIs. It can be autodetected if you are running Linux 5.7 or later, but will need to be provided explicitly when needed in earlier versions. See the libdrm documentation for possible values. ccrrttcc__iidd KMS CRTC ID to define the capture source. The first active plane on the given CRTC will be used. ppllaannee__iidd KMS plane ID to define the capture source. Defaults to the first active plane found if neither ccrrttcc__iidd nor ppllaannee__iidd are specified. ffrraammeerraattee Framerate to capture at. This is not synchronised to any page flipping or framebuffer changes - it just defines the interval at which the framebuffer is sampled. Sampling faster than the frame- buffer update rate will generate independent frames with the same content. Defaults to 30. _E_x_a_m_p_l_e_s +o Capture from the first active plane, download the result to normal frames and encode. This will only work if the framebuffer is both linear and mappable - if not, the result may be scrambled or fail to download. ffmpeg -f kmsgrab -i - -vf 'hwdownload,format=bgr0' output.mp4 +o Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and encode as H.264. 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 +o To capture only part of a plane the output can be cropped - this can be used to capture a single window, as long as it has a known absolute position and size. For example, to capture and encode the middle quarter of a 1920x1080 plane: 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 llaavvffii Libavfilter input virtual device. This input device reads data from the open output pads of a libavfilter filtergraph. For each filtergraph open output, the input device will create a corre- sponding stream which is mapped to the generated output. Currently only video data is supported. The filtergraph is specified through the option ggrraapphh. _O_p_t_i_o_n_s ggrraapphh Specify the filtergraph to use as input. Each video open output must be labelled by a unique string of the form "out_N", where _N is a number starting from 0 corresponding to the mapped input stream generated by the device. The first unlabelled output is automati- cally assigned to the "out0" label, but all the others need to be specified explicitly. The suffix "+subcc" can be appended to the output label to create an extra stream with the closed captions packets attached to that output (experimental; only for EIA-608 / CEA-708 for now). The subcc streams are created after all the normal streams, in the order of the corresponding stream. For example, if there is "out19+subcc", "out7+subcc" and up to "out42", the stream #43 is subcc for stream #7 and stream #44 is subcc for stream #19. If not specified defaults to the filename specified for the input device. ggrraapphh__ffiillee Set the filename of the filtergraph to be read and sent to the other filters. Syntax of the filtergraph is the same as the one specified by the option _g_r_a_p_h. dduummppggrraapphh Dump graph to stderr. _E_x_a_m_p_l_e_s +o Create a color video stream and play it back with ffffppllaayy: ffplay -f lavfi -graph "color=c=pink [out0]" dummy +o As the previous example, but use filename for specifying the graph description, and omit the "out0" label: ffplay -f lavfi color=c=pink +o Create three different video test filtered sources and play them: ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3 +o Read an audio stream from a file using the amovie source and play it back with ffffppllaayy: ffplay -f lavfi "amovie=test.wav" +o Read an audio stream and a video stream and play it back with ffffppllaayy: ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]" +o Dump decoded frames to images and closed captions to a file (exper- imental): ffmpeg -f lavfi -i "movie=test.ts[out0+subcc]" -map v frame%08d.png -map s -c copy -f rawvideo subcc.bin lliibbccddiioo Audio-CD input device based on libcdio. To enable this input device during configuration you need libcdio installed on your system. It requires the configure option "--enable-libcdio". This device allows playing and grabbing from an Audio-CD. For example to copy with ffffmmppeegg the entire Audio-CD in _/_d_e_v_/_s_r_0, you may run the command: ffmpeg -f libcdio -i /dev/sr0 cd.wav _O_p_t_i_o_n_s ssppeeeedd Set drive reading speed. Default value is 0. The speed is specified CD-ROM speed units. The speed is set through the libcdio "cdio_cddap_speed_set" function. On many CD-ROM drives, specifying a value too large will result in using the fastest speed. ppaarraannooiiaa__mmooddee Set paranoia recovery mode flags. It accepts one of the following values: ddiissaabbllee vveerriiffyy oovveerrllaapp nneevveerrsskkiipp ffuullll Default value is ddiissaabbllee. For more information about the available recovery modes, consult the paranoia project documentation. lliibbddcc11339944 IIDC1394 input device, based on libdc1394 and libraw1394. Requires the configure option "--enable-libdc1394". _O_p_t_i_o_n_s ffrraammeerraattee Set the frame rate. Default is "ntsc", corresponding to a frame rate of "30000/1001". ppiixxeell__ffoorrmmaatt Select the pixel format. Default is "uyvy422". vviiddeeoo__ssiizzee Set the video size given as a string such as "640x480" or "hd720". Default is "qvga". ooppeennaall The OpenAL input device provides audio capture on all systems with a working OpenAL 1.1 implementation. To enable this input device during configuration, you need OpenAL head- ers and libraries installed on your system, and need to configure FFm- peg with "--enable-openal". OpenAL headers and libraries should be provided as part of your OpenAL implementation, or as an additional download (an SDK). Depending on your installation you may need to specify additional flags via the "--extra-cflags" and "--extra-ldflags" for allowing the build system to locate the OpenAL headers and libraries. An incomplete list of OpenAL implementations follows: CCrreeaattiivvee The official Windows implementation, providing hardware accelera- tion with supported devices and software fallback. See . OOppeennAALL SSoofftt Portable, open source (LGPL) software implementation. Includes backends for the most common sound APIs on the Windows, Linux, Solaris, and BSD operating systems. See . AAppppllee OpenAL is part of Core Audio, the official Mac OS X Audio inter- face. See This device allows one to capture from an audio input device handled through OpenAL. You need to specify the name of the device to capture in the provided filename. If the empty string is provided, the device will automati- cally select the default device. You can get the list of the supported devices by using the option _l_i_s_t___d_e_v_i_c_e_s. _O_p_t_i_o_n_s cchhaannnneellss Set the number of channels in the captured audio. Only the values 11 (monaural) and 22 (stereo) are currently supported. Defaults to 22. ssaammppllee__ssiizzee Set the sample size (in bits) of the captured audio. Only the val- ues 88 and 1166 are currently supported. Defaults to 1166. ssaammppllee__rraattee Set the sample rate (in Hz) of the captured audio. Defaults to 4444..11kk. lliisstt__ddeevviicceess If set to ttrruuee, print a list of devices and exit. Defaults to ffaallssee. _E_x_a_m_p_l_e_s Print the list of OpenAL supported devices and exit: $ ffmpeg -list_devices true -f openal -i dummy out.ogg Capture from the OpenAL device _D_R_-_B_T_1_0_1 _v_i_a _P_u_l_s_e_A_u_d_i_o: $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg Capture from the default device (note the empty string '' as filename): $ ffmpeg -f openal -i '' out.ogg Capture from two devices simultaneously, writing to two different files, within the same ffffmmppeegg command: $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg Note: not all OpenAL implementations support multiple simultaneous cap- ture - try the latest OpenAL Soft if the above does not work. oossss Open Sound System input device. The filename to provide to the input device is the device node repre- senting the OSS input device, and is usually set to _/_d_e_v_/_d_s_p. For example to grab from _/_d_e_v_/_d_s_p using ffffmmppeegg use the command: ffmpeg -f oss -i /dev/dsp /tmp/oss.wav For more information about OSS see: _O_p_t_i_o_n_s ssaammppllee__rraattee Set the sample rate in Hz. Default is 48000. cchhaannnneellss Set the number of channels. Default is 2. ppuullssee PulseAudio input device. To enable this output device you need to configure FFmpeg with "--enable-libpulse". The filename to provide to the input device is a source device or the string "default" To list the PulseAudio source devices and their properties you can invoke the command ppaaccttll lliisstt ssoouurrcceess. More information about PulseAudio can be found on . _O_p_t_i_o_n_s sseerrvveerr Connect to a specific PulseAudio server, specified by an IP address. Default server is used when not provided. nnaammee Specify the application name PulseAudio will use when showing active clients, by default it is the "LIBAVFORMAT_IDENT" string. ssttrreeaamm__nnaammee Specify the stream name PulseAudio will use when showing active streams, by default it is "record". ssaammppllee__rraattee Specify the samplerate in Hz, by default 48kHz is used. cchhaannnneellss Specify the channels in use, by default 2 (stereo) is set. ffrraammee__ssiizzee This option does nothing and is deprecated. ffrraaggmmeenntt__ssiizzee Specify the size in bytes of the minimal buffering fragment in PulseAudio, it will affect the audio latency. By default it is set to 50 ms amount of data. wwaallllcclloocckk Set the initial PTS using the current time. Default is 1. _E_x_a_m_p_l_e_s Record a stream from default device: ffmpeg -f pulse -i default /tmp/pulse.wav ssnnddiioo sndio input device. To enable this input device during configuration you need libsndio installed on your system. The filename to provide to the input device is the device node repre- senting the sndio input device, and is usually set to _/_d_e_v_/_a_u_d_i_o_0. For example to grab from _/_d_e_v_/_a_u_d_i_o_0 using ffffmmppeegg use the command: ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav _O_p_t_i_o_n_s ssaammppllee__rraattee Set the sample rate in Hz. Default is 48000. cchhaannnneellss Set the number of channels. Default is 2. vviiddeeoo44lliinnuuxx22,, vv44ll22 Video4Linux2 input video device. "v4l2" can be used as alias for "video4linux2". If FFmpeg is built with v4l-utils support (by using the "--enable-libv4l2" configure option), it is possible to use it with the "-use_libv4l2" input device option. The name of the device to grab is a file device node, usually Linux systems tend to automatically create such nodes when the device (e.g. an USB webcam) is plugged into the system, and has a name of the kind _/_d_e_v_/_v_i_d_e_o_N, where _N is a number associated to the device. Video4Linux2 devices usually support a limited set of _w_i_d_t_hx_h_e_i_g_h_t sizes and frame rates. You can check which are supported using --lliisstt__ffoorrmmaattss aallll for Video4Linux2 devices. Some devices, like TV cards, support one or more standards. It is possible to list all the supported standards using --lliisstt__ssttaannddaarrddss aallll. The time base for the timestamps is 1 microsecond. Depending on the kernel version and configuration, the timestamps may be derived from the real time clock (origin at the Unix Epoch) or the monotonic clock (origin usually at boot time, unaffected by NTP or manual changes to the clock). The --ttiimmeessttaammppss aabbss or --ttss aabbss option can be used to force conversion into the real time clock. Some usage examples of the video4linux2 device with ffffmmppeegg and ffffppllaayy: +o List supported formats for a video4linux2 device: ffplay -f video4linux2 -list_formats all /dev/video0 +o Grab and show the input of a video4linux2 device: ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0 +o Grab and record the input of a video4linux2 device, leave the frame rate and size as previously set: ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg For more information about Video4Linux, check . _O_p_t_i_o_n_s ssttaannddaarrdd Set the standard. Must be the name of a supported standard. To get a list of the supported standards, use the lliisstt__ssttaannddaarrddss option. cchhaannnneell Set the input channel number. Default to -1, which means using the previously selected channel. vviiddeeoo__ssiizzee Set the video frame size. The argument must be a string in the form _W_I_D_T_Hx_H_E_I_G_H_T or a valid size abbreviation. ppiixxeell__ffoorrmmaatt Select the pixel format (only valid for raw video input). iinnppuutt__ffoorrmmaatt Set the preferred pixel format (for raw video) or a codec name. This option allows one to select the input format, when several are available. ffrraammeerraattee Set the preferred video frame rate. lliisstt__ffoorrmmaattss List available formats (supported pixel formats, codecs, and frame sizes) and exit. Available values are: aallll Show all available (compressed and non-compressed) formats. rraaww Show only raw video (non-compressed) formats. ccoommpprreesssseedd Show only compressed formats. lliisstt__ssttaannddaarrddss List supported standards and exit. Available values are: aallll Show all supported standards. ttiimmeessttaammppss,, ttss Set type of timestamps for grabbed frames. Available values are: ddeeffaauulltt Use timestamps from the kernel. aabbss Use absolute timestamps (wall clock). mmoonnoo22aabbss Force conversion from monotonic to absolute timestamps. Default value is "default". uussee__lliibbvv44ll22 Use libv4l2 (v4l-utils) conversion functions. Default is 0. vvffwwccaapp VfW (Video for Windows) capture input device. The filename passed as input is the capture driver number, ranging from 0 to 9. You may use "list" as filename to print a list of drivers. Any other filename will be interpreted as device number 0. _O_p_t_i_o_n_s vviiddeeoo__ssiizzee Set the video frame size. ffrraammeerraattee Set the grabbing frame rate. Default value is "ntsc", corresponding to a frame rate of "30000/1001". xx1111ggrraabb X11 video input device. To enable this input device during configuration you need libxcb installed on your system. It will be automatically detected during con- figuration. This device allows one to capture a region of an X11 display. The filename passed as input has the syntax: []:.[+,] _h_o_s_t_n_a_m_e:_d_i_s_p_l_a_y___n_u_m_b_e_r._s_c_r_e_e_n___n_u_m_b_e_r specifies the X11 display name of the screen to grab from. _h_o_s_t_n_a_m_e can be omitted, and defaults to "localhost". The environment variable DDIISSPPLLAAYY contains the default dis- play name. _x___o_f_f_s_e_t and _y___o_f_f_s_e_t specify the offsets of the grabbed area with respect to the top-left border of the X11 screen. They default to 0. Check the X11 documentation (e.g. mmaann XX) for more detailed information. Use the xxddppyyiinnffoo program for getting basic information about the prop- erties of your X11 display (e.g. grep for "name" or "dimensions"). For example to grab from _:_0_._0 using ffffmmppeegg: ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg Grab at position "10,20": ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg _O_p_t_i_o_n_s sseelleecctt__rreeggiioonn Specify whether to select the grabbing area graphically using the pointer. A value of 1 prompts the user to select the grabbing area graphically by clicking and dragging. A single click with no drag- ging will select the whole screen. A region with zero width or height will also select the whole screen. This option overwrites the _v_i_d_e_o___s_i_z_e, _g_r_a_b___x, and _g_r_a_b___y options. Default value is 0. ddrraaww__mmoouussee Specify whether to draw the mouse pointer. A value of 0 specifies not to draw the pointer. Default value is 1. ffoollllooww__mmoouussee Make the grabbed area follow the mouse. The argument can be "cen- tered" or a number of pixels _P_I_X_E_L_S. When it is specified with "centered", the grabbing region follows the mouse pointer and keeps the pointer at the center of region; otherwise, the region follows only when the mouse pointer reaches within _P_I_X_E_L_S (greater than zero) to the edge of region. For example: ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg To follow only when the mouse pointer reaches within 100 pixels to edge: ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg ffrraammeerraattee Set the grabbing frame rate. Default value is "ntsc", corresponding to a frame rate of "30000/1001". sshhooww__rreeggiioonn Show grabbed region on screen. If _s_h_o_w___r_e_g_i_o_n is specified with 1, then the grabbing region will be indicated on screen. With this option, it is easy to know what is being grabbed if only a portion of the screen is grabbed. rreeggiioonn__bboorrddeerr Set the region border thickness if --sshhooww__rreeggiioonn 11 is used. Range is 1 to 128 and default is 3 (XCB-based x11grab only). For example: ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg With _f_o_l_l_o_w___m_o_u_s_e: ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg wwiinnddooww__iidd Grab this window, instead of the whole screen. Default value is 0, which maps to the whole screen (root window). The id of a window can be found using the xxwwiinniinnffoo program, possi- bly with options -tree and -root. If the window is later enlarged, the new area is not recorded. Video ends when the window is closed, unmapped (i.e., iconified) or shrunk beyond the video size (which defaults to the initial window size). This option disables options ffoollllooww__mmoouussee and sseelleecctt__rreeggiioonn. vviiddeeoo__ssiizzee Set the video frame size. Default is the full desktop or window. ggrraabb__xx ggrraabb__yy Set the grabbing region coordinates. They are expressed as offset from the top left corner of the X11 window and correspond to the _x___o_f_f_s_e_t and _y___o_f_f_s_e_t parameters in the device name. The default value for both options is 0. OOUUTTPPUUTT DDEEVVIICCEESS Output devices are configured elements in FFmpeg that can write multi- media data to an output device attached to your system. When you configure your FFmpeg build, all the supported output devices are enabled by default. You can list all available ones using the con- figure option "--list-outdevs". You can disable all the output devices using the configure option "--disable-outdevs", and selectively enable an output device using the option "--enable-outdev=_O_U_T_D_E_V", or you can disable a particular input device using the option "--disable-outdev=_O_U_T_D_E_V". The option "-devices" of the ff* tools will display the list of enabled output devices. A description of the currently available output devices follows. aallssaa ALSA (Advanced Linux Sound Architecture) output device. _E_x_a_m_p_l_e_s +o Play a file on default ALSA device: ffmpeg -i INPUT -f alsa default +o Play a file on soundcard 1, audio device 7: ffmpeg -i INPUT -f alsa hw:1,7 AAuuddiiooTToooollbbooxx AudioToolbox output device. Allows native output to CoreAudio devices on OSX. The output filename can be empty (or "-") to refer to the default sys- tem output device or a number that refers to the device index as shown using: "-list_devices true". Alternatively, the audio input device can be chosen by index using the B<-audio_device_index EINDEXE> , overriding any device name or index given in the input filename. All available devices can be enumerated by using --lliisstt__ddeevviicceess ttrruuee, listing all device names, UIDs and corresponding indices. _O_p_t_i_o_n_s AudioToolbox supports the following options: --aauuddiioo__ddeevviiccee__iinnddeexx <> Specify the audio device by its index. Overrides anything given in the output filename. _E_x_a_m_p_l_e_s +o Print the list of supported devices and output a sine wave to the default device: $ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -list_devices true - +o Output a sine wave to the device with the index 2, overriding any output filename: $ ffmpeg -f lavfi -i sine=r=44100 -f audiotoolbox -audio_device_index 2 - ccaaccaa CACA output device. This output device allows one to show a video stream in CACA window. Only one CACA window is allowed per application, so you can have only one instance of this output device in an application. To enable this output device you need to configure FFmpeg with "--enable-libcaca". libcaca is a graphics library that outputs text instead of pixels. For more information about libcaca, check: _O_p_t_i_o_n_s wwiinnddooww__ttiittllee Set the CACA window title, if not specified default to the filename specified for the output device. wwiinnddooww__ssiizzee Set the CACA window size, can be a string of the form _w_i_d_t_hx_h_e_i_g_h_t or a video size abbreviation. If not specified it defaults to the size of the input video. ddrriivveerr Set display driver. aallggoorriitthhmm Set dithering algorithm. Dithering is necessary because the picture being rendered has usually far more colours than the available pal- ette. The accepted values are listed with "-list_dither algo- rithms". aannttiiaalliiaass Set antialias method. Antialiasing smoothens the rendered image and avoids the commonly seen staircase effect. The accepted values are listed with "-list_dither antialiases". cchhaarrsseett Set which characters are going to be used when rendering text. The accepted values are listed with "-list_dither charsets". ccoolloorr Set color to be used when rendering text. The accepted values are listed with "-list_dither colors". lliisstt__ddrriivveerrss If set to ttrruuee, print a list of available drivers and exit. lliisstt__ddiitthheerr List available dither options related to the argument. The argu- ment must be one of "algorithms", "antialiases", "charsets", "col- ors". _E_x_a_m_p_l_e_s +o The following command shows the ffffmmppeegg output is an CACA window, forcing its size to 80x25: ffmpeg -i INPUT -c:v rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca - +o Show the list of available drivers and exit: ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true - +o Show the list of available dither colors and exit: ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors - ddeecckklliinnkk The decklink output device provides playback capabilities for Black- magic DeckLink devices. To enable this output device, you need the Blackmagic DeckLink SDK and you need to configure with the appropriate "--extra-cflags" and "--extra-ldflags". On Windows, you need to run the IDL files through wwiiddll. DeckLink is very picky about the formats it supports. Pixel format is always uyvy422, framerate, field order and video size must be deter- mined for your device with --lliisstt__ffoorrmmaattss 11. Audio sample rate is always 48 kHz. _O_p_t_i_o_n_s lliisstt__ddeevviicceess If set to ttrruuee, print a list of devices and exit. Defaults to ffaallssee. This option is deprecated, please use the "-sinks" option of ffmpeg to list the available output devices. lliisstt__ffoorrmmaattss If set to ttrruuee, print a list of supported formats and exit. Defaults to ffaallssee. pprreerroollll Amount of time to preroll video in seconds. Defaults to 00..55. dduupplleexx__mmooddee Sets the decklink device duplex/profile mode. Must be uunnsseett, hhaallff, ffuullll, oonnee__ssuubb__ddeevviiccee__ffuullll, oonnee__ssuubb__ddeevviiccee__hhaallff, ttwwoo__ssuubb__ddeevviiccee__ffuullll, ffoouurr__ssuubb__ddeevviiccee__hhaallff Defaults to uunnsseett. Note: DeckLink SDK 11.0 have replaced the duplex property by a pro- file property. For the DeckLink Duo 2 and DeckLink Quad 2, a pro- file is shared between any 2 sub-devices that utilize the same con- nectors. For the DeckLink 8K Pro, a profile is shared between all 4 sub-devices. So DeckLink 8K Pro support four profiles. Valid profile modes for DeckLink 8K Pro(with DeckLink SDK >= 11.0): oonnee__ssuubb__ddeevviiccee__ffuullll, oonnee__ssuubb__ddeevviiccee__hhaallff, ttwwoo__ssuubb__ddeevviiccee__ffuullll, ffoouurr__ssuubb__ddeevviiccee__hhaallff Valid profile modes for DeckLink Quad 2 and DeckLink Duo 2: hhaallff, ffuullll ttiimmiinngg__ooffffsseett Sets the genlock timing pixel offset on the used output. Defaults to uunnsseett. lliinnkk Sets the SDI video link configuration on the used output. Must be uunnsseett, ssiinnggllee link SDI, dduuaall link SDI or qquuaadd link SDI. Defaults to uunnsseett. ssqqdd Enable Square Division Quad Split mode for Quad-link SDI output. Must be uunnsseett, ttrruuee or ffaallssee. Defaults to uunnsseett. lleevveell__aa Enable SMPTE Level A mode on the used output. Must be uunnsseett, ttrruuee or ffaallssee. Defaults to uunnsseett. _E_x_a_m_p_l_e_s +o List output devices: ffmpeg -sinks decklink +o List supported formats: ffmpeg -i test.avi -f decklink -list_formats 1 'DeckLink Mini Monitor' +o Play video clip: ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 'DeckLink Mini Monitor' +o Play video clip with non-standard framerate or video size: ffmpeg -i test.avi -f decklink -pix_fmt uyvy422 -s 720x486 -r 24000/1001 'DeckLink Mini Monitor' ffbbddeevv Linux framebuffer output device. The Linux framebuffer is a graphic hardware-independent abstraction layer to show graphics on a computer monitor, typically on the console. It is accessed through a file device node, usually _/_d_e_v_/_f_b_0. For more detailed information read the file _D_o_c_u_m_e_n_t_a_t_i_o_n_/_f_b_/_f_r_a_m_e_- _b_u_f_f_e_r_._t_x_t included in the Linux source tree. _O_p_t_i_o_n_s xxooffffsseett yyooffffsseett Set x/y coordinate of top left corner. Default is 0. _E_x_a_m_p_l_e_s Play a file on framebuffer device _/_d_e_v_/_f_b_0. Required pixel format depends on current framebuffer settings. ffmpeg -re -i INPUT -c:v rawvideo -pix_fmt bgra -f fbdev /dev/fb0 See also , and _f_b_s_e_t(1). ooppeennggll OpenGL output device. To enable this output device you need to configure FFmpeg with "--enable-opengl". This output device allows one to render to OpenGL context. Context may be provided by application or default SDL window is created. When device renders to external context, application must implement handlers for following messages: "AV_DEV_TO_APP_CREATE_WINDOW_BUFFER" - create OpenGL context on current thread. "AV_DEV_TO_APP_PREPARE_WIN- DOW_BUFFER" - make OpenGL context current. "AV_DEV_TO_APP_DISPLAY_WIN- DOW_BUFFER" - swap buffers. "AV_DEV_TO_APP_DESTROY_WINDOW_BUFFER" - destroy OpenGL context. Application is also required to inform a device about current resolution by sending "AV_APP_TO_DEV_WINDOW_SIZE" message. _O_p_t_i_o_n_s bbaacckkggrroouunndd Set background color. Black is a default. nnoo__wwiinnddooww Disables default SDL window when set to non-zero value. Applica- tion must provide OpenGL context and both "window_size_cb" and "window_swap_buffers_cb" callbacks when set. wwiinnddooww__ttiittllee Set the SDL window title, if not specified default to the filename specified for the output device. Ignored when nnoo__wwiinnddooww is set. wwiinnddooww__ssiizzee Set preferred window size, can be a string of the form widthxheight or a video size abbreviation. If not specified it defaults to the size of the input video, downscaled according to the aspect ratio. Mostly usable when nnoo__wwiinnddooww is not set. _E_x_a_m_p_l_e_s Play a file on SDL window using OpenGL rendering: ffmpeg -i INPUT -f opengl "window title" oossss OSS (Open Sound System) output device. ppuullssee PulseAudio output device. To enable this output device you need to configure FFmpeg with "--enable-libpulse". More information about PulseAudio can be found on _O_p_t_i_o_n_s sseerrvveerr Connect to a specific PulseAudio server, specified by an IP address. Default server is used when not provided. nnaammee Specify the application name PulseAudio will use when showing active clients, by default it is the "LIBAVFORMAT_IDENT" string. ssttrreeaamm__nnaammee Specify the stream name PulseAudio will use when showing active streams, by default it is set to the specified output name. ddeevviiccee Specify the device to use. Default device is used when not pro- vided. List of output devices can be obtained with command ppaaccttll lliisstt ssiinnkkss. bbuuffffeerr__ssiizzee bbuuffffeerr__dduurraattiioonn Control the size and duration of the PulseAudio buffer. A small buffer gives more control, but requires more frequent updates. bbuuffffeerr__ssiizzee specifies size in bytes while bbuuffffeerr__dduurraattiioonn specifies duration in milliseconds. When both options are provided then the highest value is used (duration is recalculated to bytes using stream parameters). If they are set to 0 (which is default), the device will use the default PulseAudio duration value. By default PulseAudio set buffer duration to around 2 seconds. pprreebbuuff Specify pre-buffering size in bytes. The server does not start with playback before at least pprreebbuuff bytes are available in the buffer. By default this option is initialized to the same value as bbuuff-- ffeerr__ssiizzee or bbuuffffeerr__dduurraattiioonn (whichever is bigger). mmiinnrreeqq Specify minimum request size in bytes. The server does not request less than mmiinnrreeqq bytes from the client, instead waits until the buffer is free enough to request more bytes at once. It is recom- mended to not set this option, which will initialize this to a value that is deemed sensible by the server. _E_x_a_m_p_l_e_s Play a file on default device on default server: ffmpeg -i INPUT -f pulse "stream name" ssddll SDL (Simple DirectMedia Layer) output device. "sdl2" can be used as alias for "sdl". This output device allows one to show a video stream in an SDL window. Only one SDL window is allowed per application, so you can have only one instance of this output device in an application. To enable this output device you need libsdl installed on your system when configuring your build. For more information about SDL, check: _O_p_t_i_o_n_s wwiinnddooww__ttiittllee Set the SDL window title, if not specified default to the filename specified for the output device. iiccoonn__ttiittllee Set the name of the iconified SDL window, if not specified it is set to the same value of _w_i_n_d_o_w___t_i_t_l_e. wwiinnddooww__ssiizzee Set the SDL window size, can be a string of the form _w_i_d_t_hx_h_e_i_g_h_t or a video size abbreviation. If not specified it defaults to the size of the input video, downscaled according to the aspect ratio. wwiinnddooww__xx wwiinnddooww__yy Set the position of the window on the screen. wwiinnddooww__ffuullllssccrreeeenn Set fullscreen mode when non-zero value is provided. Default value is zero. wwiinnddooww__eennaabbllee__qquuiitt Enable quit action (using window button or keyboard key) when non- zero value is provided. Default value is 1 (enable quit action) _I_n_t_e_r_a_c_t_i_v_e _c_o_m_m_a_n_d_s The window created by the device can be controlled through the follow- ing interactive commands. qq,, EESSCC Quit the device immediately. _E_x_a_m_p_l_e_s The following command shows the ffffmmppeegg output is an SDL window, forcing its size to the qcif format: ffmpeg -i INPUT -c:v rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output" ssnnddiioo sndio audio output device. vv44ll22 Video4Linux2 output device. xxvv XV (XVideo) output device. This output device allows one to show a video stream in a X Window Sys- tem window. _O_p_t_i_o_n_s ddiissppllaayy__nnaammee Specify the hardware display name, which determines the display and communications domain to be used. The display name or DISPLAY environment variable can be a string in the format _h_o_s_t_n_a_m_e[:_n_u_m_b_e_r[._s_c_r_e_e_n___n_u_m_b_e_r]]. _h_o_s_t_n_a_m_e specifies the name of the host machine on which the dis- play is physically attached. _n_u_m_b_e_r specifies the number of the display server on that host machine. _s_c_r_e_e_n___n_u_m_b_e_r specifies the screen to be used on that server. If unspecified, it defaults to the value of the DISPLAY environment variable. For example, "dual-headed:0.1" would specify screen 1 of display 0 on the machine named ``dual-headed''. Check the X11 specification for more detailed information about the display name format. wwiinnddooww__iidd When set to non-zero value then device doesn't create new window, but uses existing one with provided _w_i_n_d_o_w___i_d. By default this options is set to zero and device creates its own window. wwiinnddooww__ssiizzee Set the created window size, can be a string of the form _w_i_d_t_hx- _h_e_i_g_h_t or a video size abbreviation. If not specified it defaults to the size of the input video. Ignored when _w_i_n_d_o_w___i_d is set. wwiinnddooww__xx wwiinnddooww__yy Set the X and Y window offsets for the created window. They are both set to 0 by default. The values may be ignored by the window manager. Ignored when _w_i_n_d_o_w___i_d is set. wwiinnddooww__ttiittllee Set the window title, if not specified default to the filename specified for the output device. Ignored when _w_i_n_d_o_w___i_d is set. For more information about XVideo see . _E_x_a_m_p_l_e_s +o Decode, display and encode video input with ffffmmppeegg at the same time: ffmpeg -i INPUT OUTPUT -f xv display +o Decode and display the input video to multiple X11 windows: ffmpeg -i INPUT -f xv normal -vf negate -f xv negated SSEEEE AALLSSOO _f_f_m_p_e_g(1), _f_f_p_l_a_y(1), _f_f_p_r_o_b_e(1), _l_i_b_a_v_d_e_v_i_c_e(3) AAUUTTHHOORRSS The FFmpeg developers. For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command ggiitt lloogg in the FFmpeg source directory, or browsing the online repository at . Maintainers for the specific components are listed in the file _M_A_I_N_- _T_A_I_N_E_R_S in the source code tree. FFMPEG-DEVICES(1)