.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. | will give a .\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to .\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' .\" expand to `' in nroff, nothing in troff, for use with C<>. .tr \(*W-|\(bv\*(Tr .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "FFMPEG-DEVICES 1" .TH FFMPEG-DEVICES 1 "2013-12-14" " " " " .SH "NAME" ffmpeg\-devices \- FFmpeg devices .SH "DESCRIPTION" .IX Header "DESCRIPTION" This document describes the input and output devices provided by the libavdevice library. .SH "DEVICE OPTIONS" .IX Header "DEVICE OPTIONS" 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). .PP In addition each input or output device may support so-called private options, which are specific for that component. .PP Options may be set by specifying \-\fIoption\fR \fIvalue\fR in the FFmpeg tools, or by setting the value explicitly in the device \&\f(CW\*(C`AVFormatContext\*(C'\fR options or using the \fIlibavutil/opt.h\fR \s-1API\s0 for programmatic use. .SH "INPUT DEVICES" .IX Header "INPUT DEVICES" Input devices are configured elements in FFmpeg which allow to access the data coming from a multimedia device attached to your system. .PP When you configure your FFmpeg build, all the supported input devices are enabled by default. You can list all available ones using the configure option \*(L"\-\-list\-indevs\*(R". .PP You can disable all the input devices using the configure option \&\*(L"\-\-disable\-indevs\*(R", and selectively enable an input device using the option "\-\-enable\-indev=\fI\s-1INDEV\s0\fR\*(L", or you can disable a particular input device using the option \*(R"\-\-disable\-indev=\fI\s-1INDEV\s0\fR". .PP The option \*(L"\-formats\*(R" of the ff* tools will display the list of supported input devices (amongst the demuxers). .PP A description of the currently available input devices follows. .Sh "alsa" .IX Subsection "alsa" \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) input device. .PP To enable this input device during configuration you need libasound installed on your system. .PP This device allows capturing from an \s-1ALSA\s0 device. The name of the device to capture has to be an \s-1ALSA\s0 card identifier. .PP An \s-1ALSA\s0 identifier has the syntax: .PP .Vb 1 \& hw:<CARD>[,<DEV>[,<SUBDEV>]] .Ve .PP where the \fI\s-1DEV\s0\fR and \fI\s-1SUBDEV\s0\fR components are optional. .PP The three arguments (in order: \fI\s-1CARD\s0\fR,\fI\s-1DEV\s0\fR,\fI\s-1SUBDEV\s0\fR) specify card number or identifier, device number and subdevice number (\-1 means any). .PP To see the list of cards currently recognized by your system check the files \fI/proc/asound/cards\fR and \fI/proc/asound/devices\fR. .PP For example to capture with \fBffmpeg\fR from an \s-1ALSA\s0 device with card id 0, you may run the command: .PP .Vb 1 \& ffmpeg -f alsa -i hw:0 alsaout.wav .Ve .PP For more information see: <\fBhttp://www.alsa\-project.org/alsa\-doc/alsa\-lib/pcm.html\fR> .Sh "bktr" .IX Subsection "bktr" \&\s-1BSD\s0 video input device. .Sh "dshow" .IX Subsection "dshow" Windows DirectShow input device. .PP DirectShow support is enabled when FFmpeg is built with the mingw\-w64 project. Currently only audio and video devices are supported. .PP Multiple devices may be opened as separate inputs, but they may also be opened on the same input, which should improve synchronism between them. .PP The input name should be in the format: .PP .Vb 1 \& <TYPE>=<NAME>[:<TYPE>=<NAME>] .Ve .PP where \fI\s-1TYPE\s0\fR can be either \fIaudio\fR or \fIvideo\fR, and \fI\s-1NAME\s0\fR is the device's name. .PP \fIOptions\fR .IX Subsection "Options" .PP 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. .IP "\fBvideo_size\fR" 4 .IX Item "video_size" Set the video size in the captured video. .IP "\fBframerate\fR" 4 .IX Item "framerate" Set the frame rate in the captured video. .IP "\fBsample_rate\fR" 4 .IX Item "sample_rate" Set the sample rate (in Hz) of the captured audio. .IP "\fBsample_size\fR" 4 .IX Item "sample_size" Set the sample size (in bits) of the captured audio. .IP "\fBchannels\fR" 4 .IX Item "channels" Set the number of channels in the captured audio. .IP "\fBlist_devices\fR" 4 .IX Item "list_devices" If set to \fBtrue\fR, print a list of devices and exit. .IP "\fBlist_options\fR" 4 .IX Item "list_options" If set to \fBtrue\fR, print a list of selected device's options and exit. .IP "\fBvideo_device_number\fR" 4 .IX Item "video_device_number" Set video device number for devices with same name (starts at 0, defaults to 0). .IP "\fBaudio_device_number\fR" 4 .IX Item "audio_device_number" Set audio device number for devices with same name (starts at 0, defaults to 0). .IP "\fBpixel_format\fR" 4 .IX Item "pixel_format" Select pixel format to be used by DirectShow. This may only be set when the video codec is not set or set to rawvideo. .IP "\fBaudio_buffer_size\fR" 4 .IX Item "audio_buffer_size" 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 <\fBhttp://msdn.microsoft.com/en\-us/library/windows/desktop/dd377582(v=vs.85).aspx\fR> .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Print the list of DirectShow supported devices and exit: .Sp .Vb 1 \& $ ffmpeg -list_devices true -f dshow -i dummy .Ve .IP "\(bu" 4 Open video device \fICamera\fR: .Sp .Vb 1 \& $ ffmpeg -f dshow -i video="Camera" .Ve .IP "\(bu" 4 Open second video device with name \fICamera\fR: .Sp .Vb 1 \& $ ffmpeg -f dshow -video_device_number 1 -i video="Camera" .Ve .IP "\(bu" 4 Open video device \fICamera\fR and audio device \fIMicrophone\fR: .Sp .Vb 1 \& $ ffmpeg -f dshow -i video="Camera":audio="Microphone" .Ve .IP "\(bu" 4 Print the list of supported options in selected device and exit: .Sp .Vb 1 \& $ ffmpeg -list_options true -f dshow -i video="Camera" .Ve .Sh "dv1394" .IX Subsection "dv1394" Linux \s-1DV\s0 1394 input device. .Sh "fbdev" .IX Subsection "fbdev" Linux framebuffer input device. .PP 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 \&\fI/dev/fb0\fR. .PP For more detailed information read the file Documentation/fb/framebuffer.txt included in the Linux source tree. .PP To record from the framebuffer device \fI/dev/fb0\fR with \&\fBffmpeg\fR: .PP .Vb 1 \& ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi .Ve .PP You can take a single screenshot image with the command: .PP .Vb 1 \& ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg .Ve .PP See also <\fBhttp://linux\-fbdev.sourceforge.net/\fR>, and \fIfbset\fR\|(1). .Sh "iec61883" .IX Subsection "iec61883" FireWire \s-1DV/HDV\s0 input device using libiec61883. .PP To enable this input device, you need libiec61883, libraw1394 and libavc1394 installed on your system. Use the configure option \&\f(CW\*(C`\-\-enable\-libiec61883\*(C'\fR to compile with the device enabled. .PP The iec61883 capture device supports capturing from a video device connected via \s-1IEEE1394\s0 (FireWire), using libiec61883 and the new Linux FireWire stack (juju). This is the default \s-1DV/HDV\s0 input method in Linux Kernel 2.6.37 and later, since the old FireWire stack was removed. .PP Specify the FireWire port to be used as input file, or \*(L"auto\*(R" to choose the first port connected. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBdvtype\fR" 4 .IX Item "dvtype" Override autodetection of \s-1DV/HDV\s0. This should only be used if auto detection does not work, or if usage of a different device type should be prohibited. Treating a \s-1DV\s0 device as \s-1HDV\s0 (or vice versa) will not work and result in undefined behavior. The values \fBauto\fR, \fBdv\fR and \fBhdv\fR are supported. .IP "\fBdvbuffer\fR" 4 .IX Item "dvbuffer" Set maxiumum size of buffer for incoming data, in frames. For \s-1DV\s0, this is an exact value. For \s-1HDV\s0, it is not frame exact, since \s-1HDV\s0 does not have a fixed frame size. .IP "\fBdvguid\fR" 4 .IX Item "dvguid" Select the capture device by specifying it's \s-1GUID\s0. Capturing will only be performed from the specified device and fails if no device with the given \s-1GUID\s0 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. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Grab and show the input of a FireWire \s-1DV/HDV\s0 device. .Sp .Vb 1 \& ffplay -f iec61883 -i auto .Ve .IP "\(bu" 4 Grab and record the input of a FireWire \s-1DV/HDV\s0 device, using a packet buffer of 100000 packets if the source is \s-1HDV\s0. .Sp .Vb 1 \& ffmpeg -f iec61883 -i auto -hdvbuffer 100000 out.mpg .Ve .Sh "jack" .IX Subsection "jack" \&\s-1JACK\s0 input device. .PP To enable this input device during configuration you need libjack installed on your system. .PP A \s-1JACK\s0 input device creates one or more \s-1JACK\s0 writable clients, one for each audio channel, with name \fIclient_name\fR:input_\fIN\fR, where \&\fIclient_name\fR is the name provided by the application, and \fIN\fR is a number which identifies the channel. Each writable client will send the acquired data to the FFmpeg input device. .PP Once you have created one or more \s-1JACK\s0 readable clients, you need to connect them to one or more \s-1JACK\s0 writable clients. .PP To connect or disconnect \s-1JACK\s0 clients you can use the \fBjack_connect\fR and \fBjack_disconnect\fR programs, or do it through a graphical interface, for example with \fBqjackctl\fR. .PP To list the \s-1JACK\s0 clients and their properties you can invoke the command \&\fBjack_lsp\fR. .PP Follows an example which shows how to capture a \s-1JACK\s0 readable client with \fBffmpeg\fR. .PP .Vb 2 \& # Create a JACK writable client with name "ffmpeg". \& $ ffmpeg -f jack -i ffmpeg -y out.wav .Ve .PP .Vb 2 \& # Start the sample jack_metro readable client. \& $ jack_metro -b 120 -d 0.2 -f 4000 .Ve .PP .Vb 8 \& # 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 .Ve .PP .Vb 2 \& # Connect metro to the ffmpeg writable client. \& $ jack_connect metro:120_bpm ffmpeg:input_1 .Ve .PP For more information read: <\fBhttp://jackaudio.org/\fR> .Sh "lavfi" .IX Subsection "lavfi" Libavfilter input virtual device. .PP This input device reads data from the open output pads of a libavfilter filtergraph. .PP For each filtergraph open output, the input device will create a corresponding stream which is mapped to the generated output. Currently only video data is supported. The filtergraph is specified through the option \fBgraph\fR. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBgraph\fR" 4 .IX Item "graph" Specify the filtergraph to use as input. Each video open output must be labelled by a unique string of the form "out\fIN\fR", where \fIN\fR is a number starting from 0 corresponding to the mapped input stream generated by the device. The first unlabelled output is automatically assigned to the \*(L"out0\*(R" label, but all the others need to be specified explicitly. .Sp If not specified defaults to the filename specified for the input device. .IP "\fBgraph_file\fR" 4 .IX Item "graph_file" 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 \fIgraph\fR. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Create a color video stream and play it back with \fBffplay\fR: .Sp .Vb 1 \& ffplay -f lavfi -graph "color=c=pink [out0]" dummy .Ve .IP "\(bu" 4 As the previous example, but use filename for specifying the graph description, and omit the \*(L"out0\*(R" label: .Sp .Vb 1 \& ffplay -f lavfi color=c=pink .Ve .IP "\(bu" 4 Create three different video test filtered sources and play them: .Sp .Vb 1 \& ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3 .Ve .IP "\(bu" 4 Read an audio stream from a file using the amovie source and play it back with \fBffplay\fR: .Sp .Vb 1 \& ffplay -f lavfi "amovie=test.wav" .Ve .IP "\(bu" 4 Read an audio stream and a video stream and play it back with \&\fBffplay\fR: .Sp .Vb 1 \& ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]" .Ve .Sh "libdc1394" .IX Subsection "libdc1394" \&\s-1IIDC1394\s0 input device, based on libdc1394 and libraw1394. .Sh "openal" .IX Subsection "openal" The OpenAL input device provides audio capture on all systems with a working OpenAL 1.1 implementation. .PP To enable this input device during configuration, you need OpenAL headers and libraries installed on your system, and need to configure FFmpeg with \f(CW\*(C`\-\-enable\-openal\*(C'\fR. .PP OpenAL headers and libraries should be provided as part of your OpenAL implementation, or as an additional download (an \s-1SDK\s0). Depending on your installation you may need to specify additional flags via the \&\f(CW\*(C`\-\-extra\-cflags\*(C'\fR and \f(CW\*(C`\-\-extra\-ldflags\*(C'\fR for allowing the build system to locate the OpenAL headers and libraries. .PP An incomplete list of OpenAL implementations follows: .IP "\fBCreative\fR" 4 .IX Item "Creative" The official Windows implementation, providing hardware acceleration with supported devices and software fallback. See <\fBhttp://openal.org/\fR>. .IP "\fBOpenAL Soft\fR" 4 .IX Item "OpenAL Soft" Portable, open source (\s-1LGPL\s0) software implementation. Includes backends for the most common sound APIs on the Windows, Linux, Solaris, and \s-1BSD\s0 operating systems. See <\fBhttp://kcat.strangesoft.net/openal.html\fR>. .IP "\fBApple\fR" 4 .IX Item "Apple" OpenAL is part of Core Audio, the official Mac \s-1OS\s0 X Audio interface. See <\fBhttp://developer.apple.com/technologies/mac/audio\-and\-video.html\fR> .PP This device allows to capture from an audio input device handled through OpenAL. .PP You need to specify the name of the device to capture in the provided filename. If the empty string is provided, the device will automatically select the default device. You can get the list of the supported devices by using the option \fIlist_devices\fR. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBchannels\fR" 4 .IX Item "channels" Set the number of channels in the captured audio. Only the values \&\fB1\fR (monaural) and \fB2\fR (stereo) are currently supported. Defaults to \fB2\fR. .IP "\fBsample_size\fR" 4 .IX Item "sample_size" Set the sample size (in bits) of the captured audio. Only the values \&\fB8\fR and \fB16\fR are currently supported. Defaults to \&\fB16\fR. .IP "\fBsample_rate\fR" 4 .IX Item "sample_rate" Set the sample rate (in Hz) of the captured audio. Defaults to \fB44.1k\fR. .IP "\fBlist_devices\fR" 4 .IX Item "list_devices" If set to \fBtrue\fR, print a list of devices and exit. Defaults to \fBfalse\fR. .PP \fIExamples\fR .IX Subsection "Examples" .PP Print the list of OpenAL supported devices and exit: .PP .Vb 1 \& $ ffmpeg -list_devices true -f openal -i dummy out.ogg .Ve .PP Capture from the OpenAL device \fI\s-1DR\-BT101\s0 via PulseAudio\fR: .PP .Vb 1 \& $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg .Ve .PP Capture from the default device (note the empty string '' as filename): .PP .Vb 1 \& $ ffmpeg -f openal -i '' out.ogg .Ve .PP Capture from two devices simultaneously, writing to two different files, within the same \fBffmpeg\fR command: .PP .Vb 1 \& $ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg .Ve .PP Note: not all OpenAL implementations support multiple simultaneous capture \- try the latest OpenAL Soft if the above does not work. .Sh "oss" .IX Subsection "oss" Open Sound System input device. .PP The filename to provide to the input device is the device node representing the \s-1OSS\s0 input device, and is usually set to \&\fI/dev/dsp\fR. .PP For example to grab from \fI/dev/dsp\fR using \fBffmpeg\fR use the command: .PP .Vb 1 \& ffmpeg -f oss -i /dev/dsp /tmp/oss.wav .Ve .PP For more information about \s-1OSS\s0 see: <\fBhttp://manuals.opensound.com/usersguide/dsp.html\fR> .Sh "pulse" .IX Subsection "pulse" PulseAudio input device. .PP To enable this output device you need to configure FFmpeg with \f(CW\*(C`\-\-enable\-libpulse\*(C'\fR. .PP The filename to provide to the input device is a source device or the string \*(L"default\*(R" .PP To list the PulseAudio source devices and their properties you can invoke the command \fBpactl list sources\fR. .PP More information about PulseAudio can be found on <\fBhttp://www.pulseaudio.org\fR>. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBserver\fR" 4 .IX Item "server" Connect to a specific PulseAudio server, specified by an \s-1IP\s0 address. Default server is used when not provided. .IP "\fBname\fR" 4 .IX Item "name" Specify the application name PulseAudio will use when showing active clients, by default it is the \f(CW\*(C`LIBAVFORMAT_IDENT\*(C'\fR string. .IP "\fBstream_name\fR" 4 .IX Item "stream_name" Specify the stream name PulseAudio will use when showing active streams, by default it is \*(L"record\*(R". .IP "\fBsample_rate\fR" 4 .IX Item "sample_rate" Specify the samplerate in Hz, by default 48kHz is used. .IP "\fBchannels\fR" 4 .IX Item "channels" Specify the channels in use, by default 2 (stereo) is set. .IP "\fBframe_size\fR" 4 .IX Item "frame_size" Specify the number of bytes per frame, by default it is set to 1024. .IP "\fBfragment_size\fR" 4 .IX Item "fragment_size" Specify the minimal buffering fragment in PulseAudio, it will affect the audio latency. By default it is unset. .PP \fIExamples\fR .IX Subsection "Examples" .PP Record a stream from default device: .PP .Vb 1 \& ffmpeg -f pulse -i default /tmp/pulse.wav .Ve .Sh "sndio" .IX Subsection "sndio" sndio input device. .PP To enable this input device during configuration you need libsndio installed on your system. .PP The filename to provide to the input device is the device node representing the sndio input device, and is usually set to \&\fI/dev/audio0\fR. .PP For example to grab from \fI/dev/audio0\fR using \fBffmpeg\fR use the command: .PP .Vb 1 \& ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav .Ve .Sh "video4linux2, v4l2" .IX Subsection "video4linux2, v4l2" Video4Linux2 input video device. .PP \&\*(L"v4l2\*(R" can be used as alias for \*(L"video4linux2\*(R". .PP If FFmpeg is built with v4l\-utils support (by using the \&\f(CW\*(C`\-\-enable\-libv4l2\*(C'\fR configure option), it is possible to use it with the \&\f(CW\*(C`\-use_libv4l2\*(C'\fR input device option. .PP 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 \s-1USB\s0 webcam) is plugged into the system, and has a name of the kind \fI/dev/video\fIN\fI\fR, where \fIN\fR is a number associated to the device. .PP Video4Linux2 devices usually support a limited set of \&\fIwidth\fRx\fIheight\fR sizes and frame rates. You can check which are supported using \fB\-list_formats all\fR for Video4Linux2 devices. Some devices, like \s-1TV\s0 cards, support one or more standards. It is possible to list all the supported standards using \fB\-list_standards all\fR. .PP 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 \s-1NTP\s0 or manual changes to the clock). The \&\fB\-timestamps abs\fR or \fB\-ts abs\fR option can be used to force conversion into the real time clock. .PP Some usage examples of the video4linux2 device with \fBffmpeg\fR and \fBffplay\fR: .IP "\(bu" 4 Grab and show the input of a video4linux2 device: .Sp .Vb 1 \& ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0 .Ve .IP "\(bu" 4 Grab and record the input of a video4linux2 device, leave the frame rate and size as previously set: .Sp .Vb 1 \& ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg .Ve .PP For more information about Video4Linux, check <\fBhttp://linuxtv.org/\fR>. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBstandard\fR" 4 .IX Item "standard" Set the standard. Must be the name of a supported standard. To get a list of the supported standards, use the \fBlist_standards\fR option. .IP "\fBchannel\fR" 4 .IX Item "channel" Set the input channel number. Default to \-1, which means using the previously selected channel. .IP "\fBvideo_size\fR" 4 .IX Item "video_size" Set the video frame size. The argument must be a string in the form \&\fI\s-1WIDTH\s0\fRx\fI\s-1HEIGHT\s0\fR or a valid size abbreviation. .IP "\fBpixel_format\fR" 4 .IX Item "pixel_format" Select the pixel format (only valid for raw video input). .IP "\fBinput_format\fR" 4 .IX Item "input_format" Set the preferred pixel format (for raw video) or a codec name. This option allows to select the input format, when several are available. .IP "\fBframerate\fR" 4 .IX Item "framerate" Set the preferred video frame rate. .IP "\fBlist_formats\fR" 4 .IX Item "list_formats" List available formats (supported pixel formats, codecs, and frame sizes) and exit. .Sp Available values are: .RS 4 .IP "\fBall\fR" 4 .IX Item "all" Show all available (compressed and non\-compressed) formats. .IP "\fBraw\fR" 4 .IX Item "raw" Show only raw video (non\-compressed) formats. .IP "\fBcompressed\fR" 4 .IX Item "compressed" Show only compressed formats. .RE .RS 4 .RE .IP "\fBlist_standards\fR" 4 .IX Item "list_standards" List supported standards and exit. .Sp Available values are: .RS 4 .IP "\fBall\fR" 4 .IX Item "all" Show all supported standards. .RE .RS 4 .RE .IP "\fBtimestamps, ts\fR" 4 .IX Item "timestamps, ts" Set type of timestamps for grabbed frames. .Sp Available values are: .RS 4 .IP "\fBdefault\fR" 4 .IX Item "default" Use timestamps from the kernel. .IP "\fBabs\fR" 4 .IX Item "abs" Use absolute timestamps (wall clock). .IP "\fBmono2abs\fR" 4 .IX Item "mono2abs" Force conversion from monotonic to absolute timestamps. .RE .RS 4 .Sp Default value is \f(CW\*(C`default\*(C'\fR. .RE .Sh "vfwcap" .IX Subsection "vfwcap" VfW (Video for Windows) capture input device. .PP The filename passed as input is the capture driver number, ranging from 0 to 9. You may use \*(L"list\*(R" as filename to print a list of drivers. Any other filename will be interpreted as device number 0. .Sh "x11grab" .IX Subsection "x11grab" X11 video input device. .PP This device allows to capture a region of an X11 display. .PP The filename passed as input has the syntax: .PP .Vb 1 \& [<hostname>]:<display_number>.<screen_number>[+<x_offset>,<y_offset>] .Ve .PP \&\fIhostname\fR:\fIdisplay_number\fR.\fIscreen_number\fR specifies the X11 display name of the screen to grab from. \fIhostname\fR can be omitted, and defaults to \*(L"localhost\*(R". The environment variable \&\fB\s-1DISPLAY\s0\fR contains the default display name. .PP \&\fIx_offset\fR and \fIy_offset\fR specify the offsets of the grabbed area with respect to the top-left border of the X11 screen. They default to 0. .PP Check the X11 documentation (e.g. man X) for more detailed information. .PP Use the \fBdpyinfo\fR program for getting basic information about the properties of your X11 display (e.g. grep for \*(L"name\*(R" or \*(L"dimensions\*(R"). .PP For example to grab from \fI:0.0\fR using \fBffmpeg\fR: .PP .Vb 1 \& ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg .Ve .PP Grab at position \f(CW\*(C`10,20\*(C'\fR: .PP .Vb 1 \& ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg .Ve .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBdraw_mouse\fR" 4 .IX Item "draw_mouse" Specify whether to draw the mouse pointer. A value of \f(CW0\fR specify not to draw the pointer. Default value is \f(CW1\fR. .IP "\fBfollow_mouse\fR" 4 .IX Item "follow_mouse" Make the grabbed area follow the mouse. The argument can be \&\f(CW\*(C`centered\*(C'\fR or a number of pixels \fI\s-1PIXELS\s0\fR. .Sp When it is specified with \*(L"centered\*(R", 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 \fI\s-1PIXELS\s0\fR (greater than zero) to the edge of region. .Sp For example: .Sp .Vb 1 \& ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg .Ve .Sp To follow only when the mouse pointer reaches within 100 pixels to edge: .Sp .Vb 1 \& ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg .Ve .IP "\fBframerate\fR" 4 .IX Item "framerate" Set the grabbing frame rate. Default value is \f(CW\*(C`ntsc\*(C'\fR, corresponding to a frame rate of \f(CW\*(C`30000/1001\*(C'\fR. .IP "\fBshow_region\fR" 4 .IX Item "show_region" Show grabbed region on screen. .Sp If \fIshow_region\fR is specified with \f(CW1\fR, 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. .Sp For example: .Sp .Vb 1 \& ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg .Ve .Sp With \fIfollow_mouse\fR: .Sp .Vb 1 \& ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg .Ve .IP "\fBvideo_size\fR" 4 .IX Item "video_size" Set the video frame size. Default value is \f(CW\*(C`vga\*(C'\fR. .SH "OUTPUT DEVICES" .IX Header "OUTPUT DEVICES" Output devices are configured elements in FFmpeg that can write multimedia data to an output device attached to your system. .PP When you configure your FFmpeg build, all the supported output devices are enabled by default. You can list all available ones using the configure option \*(L"\-\-list\-outdevs\*(R". .PP You can disable all the output devices using the configure option \&\*(L"\-\-disable\-outdevs\*(R", and selectively enable an output device using the option "\-\-enable\-outdev=\fI\s-1OUTDEV\s0\fR\*(L", or you can disable a particular input device using the option \*(R"\-\-disable\-outdev=\fI\s-1OUTDEV\s0\fR". .PP The option \*(L"\-formats\*(R" of the ff* tools will display the list of enabled output devices (amongst the muxers). .PP A description of the currently available output devices follows. .Sh "alsa" .IX Subsection "alsa" \&\s-1ALSA\s0 (Advanced Linux Sound Architecture) output device. .Sh "caca" .IX Subsection "caca" \&\s-1CACA\s0 output device. .PP This output device allows to show a video stream in \s-1CACA\s0 window. Only one \s-1CACA\s0 window is allowed per application, so you can have only one instance of this output device in an application. .PP To enable this output device you need to configure FFmpeg with \&\f(CW\*(C`\-\-enable\-libcaca\*(C'\fR. libcaca is a graphics library that outputs text instead of pixels. .PP For more information about libcaca, check: <\fBhttp://caca.zoy.org/wiki/libcaca\fR> .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBwindow_title\fR" 4 .IX Item "window_title" Set the \s-1CACA\s0 window title, if not specified default to the filename specified for the output device. .IP "\fBwindow_size\fR" 4 .IX Item "window_size" Set the \s-1CACA\s0 window size, can be a string of the form \&\fIwidth\fRx\fIheight\fR or a video size abbreviation. If not specified it defaults to the size of the input video. .IP "\fBdriver\fR" 4 .IX Item "driver" Set display driver. .IP "\fBalgorithm\fR" 4 .IX Item "algorithm" Set dithering algorithm. Dithering is necessary because the picture being rendered has usually far more colours than the available palette. The accepted values are listed with \f(CW\*(C`\-list_dither algorithms\*(C'\fR. .IP "\fBantialias\fR" 4 .IX Item "antialias" Set antialias method. Antialiasing smoothens the rendered image and avoids the commonly seen staircase effect. The accepted values are listed with \f(CW\*(C`\-list_dither antialiases\*(C'\fR. .IP "\fBcharset\fR" 4 .IX Item "charset" Set which characters are going to be used when rendering text. The accepted values are listed with \f(CW\*(C`\-list_dither charsets\*(C'\fR. .IP "\fBcolor\fR" 4 .IX Item "color" Set color to be used when rendering text. The accepted values are listed with \f(CW\*(C`\-list_dither colors\*(C'\fR. .IP "\fBlist_drivers\fR" 4 .IX Item "list_drivers" If set to \fBtrue\fR, print a list of available drivers and exit. .IP "\fBlist_dither\fR" 4 .IX Item "list_dither" List available dither options related to the argument. The argument must be one of \f(CW\*(C`algorithms\*(C'\fR, \f(CW\*(C`antialiases\*(C'\fR, \&\f(CW\*(C`charsets\*(C'\fR, \f(CW\*(C`colors\*(C'\fR. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 The following command shows the \fBffmpeg\fR output is an \&\s-1CACA\s0 window, forcing its size to 80x25: .Sp .Vb 1 \& ffmpeg -i INPUT -vcodec rawvideo -pix_fmt rgb24 -window_size 80x25 -f caca - .Ve .IP "\(bu" 4 Show the list of available drivers and exit: .Sp .Vb 1 \& ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_drivers true - .Ve .IP "\(bu" 4 Show the list of available dither colors and exit: .Sp .Vb 1 \& ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors - .Ve .Sh "fbdev" .IX Subsection "fbdev" Linux framebuffer output device. .PP 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 \&\fI/dev/fb0\fR. .PP For more detailed information read the file \&\fIDocumentation/fb/framebuffer.txt\fR included in the Linux source tree. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBxoffset\fR" 4 .IX Item "xoffset" .PD 0 .IP "\fByoffset\fR" 4 .IX Item "yoffset" .PD Set x/y coordinate of top left corner. Default is 0. .PP \fIExamples\fR .IX Subsection "Examples" .PP Play a file on framebuffer device \fI/dev/fb0\fR. Required pixel format depends on current framebuffer settings. .PP .Vb 1 \& ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0 .Ve .PP See also <\fBhttp://linux\-fbdev.sourceforge.net/\fR>, and \fIfbset\fR\|(1). .Sh "oss" .IX Subsection "oss" \&\s-1OSS\s0 (Open Sound System) output device. .Sh "pulse" .IX Subsection "pulse" PulseAudio output device. .PP To enable this output device you need to configure FFmpeg with \f(CW\*(C`\-\-enable\-libpulse\*(C'\fR. .PP More information about PulseAudio can be found on <\fBhttp://www.pulseaudio.org\fR> .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBserver\fR" 4 .IX Item "server" Connect to a specific PulseAudio server, specified by an \s-1IP\s0 address. Default server is used when not provided. .IP "\fBname\fR" 4 .IX Item "name" Specify the application name PulseAudio will use when showing active clients, by default it is the \f(CW\*(C`LIBAVFORMAT_IDENT\*(C'\fR string. .IP "\fBstream_name\fR" 4 .IX Item "stream_name" Specify the stream name PulseAudio will use when showing active streams, by default it is set to the specified output name. .IP "\fBdevice\fR" 4 .IX Item "device" Specify the device to use. Default device is used when not provided. List of output devices can be obtained with command \fBpactl list sinks\fR. .PP \fIExamples\fR .IX Subsection "Examples" .PP Play a file on default device on default server: .PP .Vb 1 \& ffmpeg -i INPUT -f pulse "stream name" .Ve .Sh "sdl" .IX Subsection "sdl" \&\s-1SDL\s0 (Simple DirectMedia Layer) output device. .PP This output device allows to show a video stream in an \s-1SDL\s0 window. Only one \s-1SDL\s0 window is allowed per application, so you can have only one instance of this output device in an application. .PP To enable this output device you need libsdl installed on your system when configuring your build. .PP For more information about \s-1SDL\s0, check: <\fBhttp://www.libsdl.org/\fR> .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBwindow_title\fR" 4 .IX Item "window_title" Set the \s-1SDL\s0 window title, if not specified default to the filename specified for the output device. .IP "\fBicon_title\fR" 4 .IX Item "icon_title" Set the name of the iconified \s-1SDL\s0 window, if not specified it is set to the same value of \fIwindow_title\fR. .IP "\fBwindow_size\fR" 4 .IX Item "window_size" Set the \s-1SDL\s0 window size, can be a string of the form \&\fIwidth\fRx\fIheight\fR or a video size abbreviation. If not specified it defaults to the size of the input video, downscaled according to the aspect ratio. .IP "\fBwindow_fullscreen\fR" 4 .IX Item "window_fullscreen" Set fullscreen mode when non-zero value is provided. Zero is a default. .PP \fIExamples\fR .IX Subsection "Examples" .PP The following command shows the \fBffmpeg\fR output is an \&\s-1SDL\s0 window, forcing its size to the qcif format: .PP .Vb 1 \& ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output" .Ve .Sh "sndio" .IX Subsection "sndio" sndio audio output device. .Sh "xv" .IX Subsection "xv" \&\s-1XV\s0 (XVideo) output device. .PP This output device allows to show a video stream in a X Window System window. .PP \fIOptions\fR .IX Subsection "Options" .IP "\fBdisplay_name\fR" 4 .IX Item "display_name" Specify the hardware display name, which determines the display and communications domain to be used. .Sp The display name or \s-1DISPLAY\s0 environment variable can be a string in the format \fIhostname\fR[:\fInumber\fR[.\fIscreen_number\fR]]. .Sp \&\fIhostname\fR specifies the name of the host machine on which the display is physically attached. \fInumber\fR specifies the number of the display server on that host machine. \fIscreen_number\fR specifies the screen to be used on that server. .Sp If unspecified, it defaults to the value of the \s-1DISPLAY\s0 environment variable. .Sp For example, \f(CW\*(C`dual\-headed:0.1\*(C'\fR would specify screen 1 of display 0 on the machine named ``dual\-headed''. .Sp Check the X11 specification for more detailed information about the display name format. .IP "\fBwindow_size\fR" 4 .IX Item "window_size" Set the created window size, can be a string of the form \&\fIwidth\fRx\fIheight\fR or a video size abbreviation. If not specified it defaults to the size of the input video. .IP "\fBwindow_x\fR" 4 .IX Item "window_x" .PD 0 .IP "\fBwindow_y\fR" 4 .IX Item "window_y" .PD 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. .IP "\fBwindow_title\fR" 4 .IX Item "window_title" Set the window title, if not specified default to the filename specified for the output device. .PP For more information about XVideo see <\fBhttp://www.x.org/\fR>. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Decode, display and encode video input with \fBffmpeg\fR at the same time: .Sp .Vb 1 \& ffmpeg -i INPUT OUTPUT -f xv display .Ve .IP "\(bu" 4 Decode and display the input video to multiple X11 windows: .Sp .Vb 1 \& ffmpeg -i INPUT -f xv normal -vf negate -f xv negated .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1), \fIffserver\fR\|(1), \fIlibavdevice\fR\|(3) .SH "AUTHORS" .IX Header "AUTHORS" The FFmpeg developers. .PP For details about the authorship, see the Git history of the project (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command \&\fBgit log\fR in the FFmpeg source directory, or browsing the online repository at <\fBhttp://source.ffmpeg.org\fR>. .PP Maintainers for the specific components are listed in the file \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.