.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .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. \*(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- .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\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" 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 "AVPROBE 1" .TH AVPROBE 1 "2016-03-02" " " " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" avprobe \- avprobe media prober .SH "SYNOPSIS" .IX Header "SYNOPSIS" avprobe [options] [\fIinput_file\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" avprobe gathers information from multimedia streams and prints it in human\- and machine-readable fashion. .PP For example it can be used to check the format of the container used by a multimedia stream and the format and type of each media stream contained in it. .PP If a filename is specified in input, avprobe will try to open and probe the file content. If the file cannot be opened or recognized as a multimedia file, a positive exit code is returned. .PP avprobe may be employed both as a standalone application or in combination with a textual filter, which may perform more sophisticated processing, e.g. statistical processing or plotting. .PP Options are used to list some of the formats supported by avprobe or for specifying which information to display, and for setting how avprobe will show it. .PP avprobe output is designed to be easily parsable by a textual filter, and consists of one or more sections of the form: .PP .Vb 5 \& [SECTION] \& key1=val1 \& ... \& keyN=valN \& [/SECTION] .Ve .PP Metadata tags stored in the container or in the streams are recognized and printed in the corresponding \*(L"\s-1FORMAT\s0\*(R" or \*(L"\s-1STREAM\s0\*(R" section, and are prefixed by the string \*(L"\s-1TAG:\s0\*(R". .SH "OPTIONS" .IX Header "OPTIONS" All the numerical options, if not specified otherwise, accept in input a string representing a number, which may contain one of the International System number postfixes, for example 'K', 'M', 'G'. If 'i' is appended after the postfix, powers of 2 are used instead of powers of 10. The 'B' postfix multiplies the value for 8, and can be appended after another postfix or used alone. This allows using for example '\s-1KB\s0', 'MiB', 'G' and 'B' as postfix. .PP Options which do not take arguments are boolean options, and set the corresponding value to true. They can be set to false by prefixing with \*(L"no\*(R" the option name, for example using \*(L"\-nofoo\*(R" in the command line will set to false the boolean option with name \*(L"foo\*(R". .SS "Stream specifiers" .IX Subsection "Stream specifiers" Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers are used to precisely specify which stream(s) does a given option belong to. .PP A stream specifier is a string generally appended to the option name and separated from it by a colon. E.g. \f(CW\*(C`\-codec:a:1 ac3\*(C'\fR option contains \&\f(CW\*(C`a:1\*(C'\fR stream specifer, which matches the second audio stream. Therefore it would select the ac3 codec for the second audio stream. .PP A stream specifier can match several stream, the option is then applied to all of them. E.g. the stream specifier in \f(CW\*(C`\-b:a 128k\*(C'\fR matches all audio streams. .PP An empty stream specifier matches all streams, for example \f(CW\*(C`\-codec copy\*(C'\fR or \f(CW\*(C`\-codec: copy\*(C'\fR would copy all the streams without reencoding. .PP Possible forms of stream specifiers are: .IP "\fIstream_index\fR" 4 .IX Item "stream_index" Matches the stream with this index. E.g. \f(CW\*(C`\-threads:1 4\*(C'\fR would set the thread count for the second stream to 4. .IP "\fIstream_type\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4 .IX Item "stream_type[:stream_index]" \&\fIstream_type\fR is one of: 'v' for video, 'a' for audio, 's' for subtitle, \&'d' for data and 't' for attachments. If \fIstream_index\fR is given, then matches stream number \fIstream_index\fR of this type. Otherwise matches all streams of this type. .IP "\fBp:\fR\fIprogram_id\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4 .IX Item "p:program_id[:stream_index]" If \fIstream_index\fR is given, then matches stream number \fIstream_index\fR in program with id \fIprogram_id\fR. Otherwise matches all streams in this program. .SS "Generic options" .IX Subsection "Generic options" These options are shared amongst the av* tools. .IP "\fB\-L\fR" 4 .IX Item "-L" Show license. .IP "\fB\-h, \-?, \-help, \-\-help\fR" 4 .IX Item "-h, -?, -help, --help" Show help. .IP "\fB\-version\fR" 4 .IX Item "-version" Show version. .IP "\fB\-formats\fR" 4 .IX Item "-formats" Show available formats. .Sp The fields preceding the format names have the following meanings: .RS 4 .IP "\fBD\fR" 4 .IX Item "D" Decoding available .IP "\fBE\fR" 4 .IX Item "E" Encoding available .RE .RS 4 .RE .IP "\fB\-codecs\fR" 4 .IX Item "-codecs" Show available codecs. .Sp The fields preceding the codec names have the following meanings: .RS 4 .IP "\fBD\fR" 4 .IX Item "D" Decoding available .IP "\fBE\fR" 4 .IX Item "E" Encoding available .IP "\fBV/A/S\fR" 4 .IX Item "V/A/S" Video/audio/subtitle codec .IP "\fBS\fR" 4 .IX Item "S" Codec supports slices .IP "\fBD\fR" 4 .IX Item "D" Codec supports direct rendering .IP "\fBT\fR" 4 .IX Item "T" Codec can handle input truncated at random locations instead of only at frame boundaries .RE .RS 4 .RE .IP "\fB\-bsfs\fR" 4 .IX Item "-bsfs" Show available bitstream filters. .IP "\fB\-protocols\fR" 4 .IX Item "-protocols" Show available protocols. .IP "\fB\-filters\fR" 4 .IX Item "-filters" Show available libavfilter filters. .IP "\fB\-pix_fmts\fR" 4 .IX Item "-pix_fmts" Show available pixel formats. .IP "\fB\-sample_fmts\fR" 4 .IX Item "-sample_fmts" Show available sample formats. .IP "\fB\-loglevel\fR \fIloglevel\fR \fB| \-v\fR \fIloglevel\fR" 4 .IX Item "-loglevel loglevel | -v loglevel" Set the logging level used by the library. \&\fIloglevel\fR is a number or a string containing one of the following values: .RS 4 .IP "\fBquiet\fR" 4 .IX Item "quiet" .PD 0 .IP "\fBpanic\fR" 4 .IX Item "panic" .IP "\fBfatal\fR" 4 .IX Item "fatal" .IP "\fBerror\fR" 4 .IX Item "error" .IP "\fBwarning\fR" 4 .IX Item "warning" .IP "\fBinfo\fR" 4 .IX Item "info" .IP "\fBverbose\fR" 4 .IX Item "verbose" .IP "\fBdebug\fR" 4 .IX Item "debug" .RE .RS 4 .PD .Sp By default the program logs to stderr, if coloring is supported by the terminal, colors are used to mark errors and warnings. Log coloring can be disabled setting the environment variable \&\fB\s-1AV_LOG_FORCE_NOCOLOR\s0\fR or \fB\s-1NO_COLOR\s0\fR, or can be forced setting the environment variable \fB\s-1AV_LOG_FORCE_COLOR\s0\fR. The use of the environment variable \fB\s-1NO_COLOR\s0\fR is deprecated and will be dropped in a following Libav version. .RE .SS "AVOptions" .IX Subsection "AVOptions" These options are provided directly by the libavformat, libavdevice and libavcodec libraries. To see the list of available AVOptions, use the \&\fB\-help\fR option. They are separated into two categories: .IP "\fBgeneric\fR" 4 .IX Item "generic" These options can be set for any container, codec or device. Generic options are listed under AVFormatContext options for containers/devices and under AVCodecContext options for codecs. .IP "\fBprivate\fR" 4 .IX Item "private" These options are specific to the given container, device or codec. Private options are listed under their corresponding containers/devices/codecs. .PP For example to write an ID3v2.3 header instead of a default ID3v2.4 to an \s-1MP3\s0 file, use the \fBid3v2_version\fR private option of the \s-1MP3\s0 muxer: .PP .Vb 1 \& avconv \-i input.flac \-id3v2_version 3 out.mp3 .Ve .PP All codec AVOptions are obviously per-stream, so the chapter on stream specifiers applies to them .PP Note \fB\-nooption\fR syntax cannot be used for boolean AVOptions, use \fB\-option 0\fR/\fB\-option 1\fR. .PP Note2 old undocumented way of specifying per-stream AVOptions by prepending v/a/s to the options name is now obsolete and will be removed soon. .SS "Main options" .IX Subsection "Main options" .IP "\fB\-f\fR \fIformat\fR" 4 .IX Item "-f format" Force format to use. .IP "\fB\-unit\fR" 4 .IX Item "-unit" Show the unit of the displayed values. .IP "\fB\-prefix\fR" 4 .IX Item "-prefix" Use \s-1SI\s0 prefixes for the displayed values. Unless the \*(L"\-byte_binary_prefix\*(R" option is used all the prefixes are decimal. .IP "\fB\-byte_binary_prefix\fR" 4 .IX Item "-byte_binary_prefix" Force the use of binary prefixes for byte values. .IP "\fB\-sexagesimal\fR" 4 .IX Item "-sexagesimal" Use sexagesimal format \s-1HH:MM:SS\s0.MICROSECONDS for time values. .IP "\fB\-pretty\fR" 4 .IX Item "-pretty" Prettify the format of the displayed values, it corresponds to the options \*(L"\-unit \-prefix \-byte_binary_prefix \-sexagesimal\*(R". .IP "\fB\-show_format\fR" 4 .IX Item "-show_format" Show information about the container format of the input multimedia stream. .Sp All the container format information is printed within a section with name \*(L"\s-1FORMAT\s0\*(R". .IP "\fB\-show_packets\fR" 4 .IX Item "-show_packets" Show information about each packet contained in the input multimedia stream. .Sp The information for each single packet is printed within a dedicated section with name \*(L"\s-1PACKET\s0\*(R". .IP "\fB\-show_streams\fR" 4 .IX Item "-show_streams" Show information about each media stream contained in the input multimedia stream. .Sp Each media stream information is printed within a dedicated section with name \*(L"\s-1STREAM\s0\*(R". .SH "DEMUXERS" .IX Header "DEMUXERS" Demuxers are configured elements in Libav which allow to read the multimedia streams from a particular type of file. .PP When you configure your Libav build, all the supported demuxers are enabled by default. You can list all available ones using the configure option \*(L"\-\-list\-demuxers\*(R". .PP You can disable all the demuxers using the configure option \&\*(L"\-\-disable\-demuxers\*(R", and selectively enable a single demuxer with the option "\-\-enable\-demuxer=\fI\s-1DEMUXER\s0\fR\*(L", or disable it with the option \*(R"\-\-disable\-demuxer=\fI\s-1DEMUXER\s0\fR". .PP The option \*(L"\-formats\*(R" of the av* tools will display the list of enabled demuxers. .PP The description of some of the currently available demuxers follows. .SS "image2" .IX Subsection "image2" Image file demuxer. .PP This demuxer reads from a list of image files specified by a pattern. .PP The pattern may contain the string \*(L"%d\*(R" or "%0\fIN\fRd\*(L", which specifies the position of the characters representing a sequential number in each filename matched by the pattern. If the form \&\*(R"%d0\fIN\fRd" is used, the string representing the number in each filename is 0\-padded and \fIN\fR is the total number of 0\-padded digits representing the number. The literal character '%' can be specified in the pattern with the string \*(L"%%\*(R". .PP If the pattern contains \*(L"%d\*(R" or "%0\fIN\fRd", the first filename of the file list specified by the pattern must contain a number inclusively contained between 0 and 4, all the following numbers must be sequential. This limitation may be hopefully fixed. .PP The pattern may contain a suffix which is used to automatically determine the format of the images contained in the files. .PP For example the pattern \*(L"img\-%03d.bmp\*(R" will match a sequence of filenames of the form \fIimg\-001.bmp\fR, \fIimg\-002.bmp\fR, ..., \&\fIimg\-010.bmp\fR, etc.; the pattern \*(L"i%%m%%g\-%d.jpg\*(R" will match a sequence of filenames of the form \fIi%m%g\-1.jpg\fR, \&\fIi%m%g\-2.jpg\fR, ..., \fIi%m%g\-10.jpg\fR, etc. .PP The size, the pixel format, and the format of each image must be the same for all the files in the sequence. .PP The following example shows how to use \fBavconv\fR for creating a video from the images in the file sequence \fIimg\-001.jpeg\fR, \&\fIimg\-002.jpeg\fR, ..., assuming an input framerate of 10 frames per second: .PP .Vb 1 \& avconv \-i \*(Aqimg\-%03d.jpeg\*(Aq \-r 10 out.mkv .Ve .PP Note that the pattern must not necessarily contain \*(L"%d\*(R" or "%0\fIN\fRd", for example to convert a single image file \&\fIimg.jpeg\fR you can employ the command: .PP .Vb 1 \& avconv \-i img.jpeg img.png .Ve .SS "applehttp" .IX Subsection "applehttp" Apple \s-1HTTP\s0 Live Streaming demuxer. .PP This demuxer presents all AVStreams from all variant streams. The id field is set to the bitrate variant index number. By setting the discard flags on AVStreams (by pressing 'a' or 'v' in avplay), the caller can decide which variant streams to actually receive. The total bitrate of the variant that the stream belongs to is available in a metadata key named \*(L"variant_bitrate\*(R". .SH "MUXERS" .IX Header "MUXERS" Muxers are configured elements in Libav which allow writing multimedia streams to a particular type of file. .PP When you configure your Libav build, all the supported muxers are enabled by default. You can list all available muxers using the configure option \f(CW\*(C`\-\-list\-muxers\*(C'\fR. .PP You can disable all the muxers with the configure option \&\f(CW\*(C`\-\-disable\-muxers\*(C'\fR and selectively enable / disable single muxers with the options \f(CW\*(C`\-\-enable\-muxer=\f(CIMUXER\f(CW\*(C'\fR / \&\f(CW\*(C`\-\-disable\-muxer=\f(CIMUXER\f(CW\*(C'\fR. .PP The option \f(CW\*(C`\-formats\*(C'\fR of the av* tools will display the list of enabled muxers. .PP A description of some of the currently available muxers follows. .SS "crc" .IX Subsection "crc" \&\s-1CRC\s0 (Cyclic Redundancy Check) testing format. .PP This muxer computes and prints the Adler\-32 \s-1CRC\s0 of all the input audio and video frames. By default audio frames are converted to signed 16\-bit raw audio and video frames to raw video before computing the \&\s-1CRC\s0. .PP The output of the muxer consists of a single line of the form: CRC=0x\fI\s-1CRC\s0\fR, where \fI\s-1CRC\s0\fR is a hexadecimal number 0\-padded to 8 digits containing the \s-1CRC\s0 for all the decoded input frames. .PP For example to compute the \s-1CRC\s0 of the input, and store it in the file \&\fIout.crc\fR: .PP .Vb 1 \& avconv \-i INPUT \-f crc out.crc .Ve .PP You can print the \s-1CRC\s0 to stdout with the command: .PP .Vb 1 \& avconv \-i INPUT \-f crc \- .Ve .PP You can select the output format of each frame with \fBavconv\fR by specifying the audio and video codec and format. For example to compute the \s-1CRC\s0 of the input audio converted to \s-1PCM\s0 unsigned 8\-bit and the input video converted to \s-1MPEG\-2\s0 video, use the command: .PP .Vb 1 \& avconv \-i INPUT \-c:a pcm_u8 \-c:v mpeg2video \-f crc \- .Ve .PP See also the framecrc muxer. .SS "framecrc" .IX Subsection "framecrc" Per-frame \s-1CRC\s0 (Cyclic Redundancy Check) testing format. .PP This muxer computes and prints the Adler\-32 \s-1CRC\s0 for each decoded audio and video frame. By default audio frames are converted to signed 16\-bit raw audio and video frames to raw video before computing the \&\s-1CRC\s0. .PP The output of the muxer consists of a line for each audio and video frame of the form: \fIstream_index\fR, \fIframe_dts\fR, \&\fIframe_size\fR, 0x\fI\s-1CRC\s0\fR, where \fI\s-1CRC\s0\fR is a hexadecimal number 0\-padded to 8 digits containing the \s-1CRC\s0 of the decoded frame. .PP For example to compute the \s-1CRC\s0 of each decoded frame in the input, and store it in the file \fIout.crc\fR: .PP .Vb 1 \& avconv \-i INPUT \-f framecrc out.crc .Ve .PP You can print the \s-1CRC\s0 of each decoded frame to stdout with the command: .PP .Vb 1 \& avconv \-i INPUT \-f framecrc \- .Ve .PP You can select the output format of each frame with \fBavconv\fR by specifying the audio and video codec and format. For example, to compute the \s-1CRC\s0 of each decoded input audio frame converted to \s-1PCM\s0 unsigned 8\-bit and of each decoded input video frame converted to \&\s-1MPEG\-2\s0 video, use the command: .PP .Vb 1 \& avconv \-i INPUT \-c:a pcm_u8 \-c:v mpeg2video \-f framecrc \- .Ve .PP See also the crc muxer. .SS "image2" .IX Subsection "image2" Image file muxer. .PP The image file muxer writes video frames to image files. .PP The output filenames are specified by a pattern, which can be used to produce sequentially numbered series of files. The pattern may contain the string \*(L"%d\*(R" or "%0\fIN\fRd\*(L", this string specifies the position of the characters representing a numbering in the filenames. If the form \*(R"%0\fIN\fRd" is used, the string representing the number in each filename is 0\-padded to \fIN\fR digits. The literal character '%' can be specified in the pattern with the string \*(L"%%\*(R". .PP If the pattern contains \*(L"%d\*(R" or "%0\fIN\fRd", the first filename of the file list specified will contain the number 1, all the following numbers will be sequential. .PP The pattern may contain a suffix which is used to automatically determine the format of the image files to write. .PP For example the pattern \*(L"img\-%03d.bmp\*(R" will specify a sequence of filenames of the form \fIimg\-001.bmp\fR, \fIimg\-002.bmp\fR, ..., \&\fIimg\-010.bmp\fR, etc. The pattern \*(L"img%%\-%d.jpg\*(R" will specify a sequence of filenames of the form \fIimg%\-1.jpg\fR, \fIimg%\-2.jpg\fR, ..., \fIimg%\-10.jpg\fR, etc. .PP The following example shows how to use \fBavconv\fR for creating a sequence of files \fIimg\-001.jpeg\fR, \fIimg\-002.jpeg\fR, ..., taking one image every second from the input video: .PP .Vb 1 \& avconv \-i in.avi \-vsync 1 \-r 1 \-f image2 \*(Aqimg\-%03d.jpeg\*(Aq .Ve .PP Note that with \fBavconv\fR, if the format is not specified with the \&\f(CW\*(C`\-f\*(C'\fR option and the output filename specifies an image file format, the image2 muxer is automatically selected, so the previous command can be written as: .PP .Vb 1 \& avconv \-i in.avi \-vsync 1 \-r 1 \*(Aqimg\-%03d.jpeg\*(Aq .Ve .PP Note also that the pattern must not necessarily contain \*(L"%d\*(R" or "%0\fIN\fRd", for example to create a single image file \&\fIimg.jpeg\fR from the input video you can employ the command: .PP .Vb 1 \& avconv \-i in.avi \-f image2 \-frames:v 1 img.jpeg .Ve .SS "mpegts" .IX Subsection "mpegts" \&\s-1MPEG\s0 transport stream muxer. .PP This muxer implements \s-1ISO\s0 13818\-1 and part of \s-1ETSI\s0 \s-1EN\s0 300 468. .PP The muxer options are: .IP "\fB\-mpegts_original_network_id\fR \fInumber\fR" 4 .IX Item "-mpegts_original_network_id number" Set the original_network_id (default 0x0001). This is unique identifier of a network in \s-1DVB\s0. Its main use is in the unique identification of a service through the path Original_Network_ID, Transport_Stream_ID. .IP "\fB\-mpegts_transport_stream_id\fR \fInumber\fR" 4 .IX Item "-mpegts_transport_stream_id number" Set the transport_stream_id (default 0x0001). This identifies a transponder in \s-1DVB\s0. .IP "\fB\-mpegts_service_id\fR \fInumber\fR" 4 .IX Item "-mpegts_service_id number" Set the service_id (default 0x0001) also known as program in \s-1DVB\s0. .IP "\fB\-mpegts_pmt_start_pid\fR \fInumber\fR" 4 .IX Item "-mpegts_pmt_start_pid number" Set the first \s-1PID\s0 for \s-1PMT\s0 (default 0x1000, max 0x1f00). .IP "\fB\-mpegts_start_pid\fR \fInumber\fR" 4 .IX Item "-mpegts_start_pid number" Set the first \s-1PID\s0 for data packets (default 0x0100, max 0x0f00). .PP The recognized metadata settings in mpegts muxer are \f(CW\*(C`service_provider\*(C'\fR and \f(CW\*(C`service_name\*(C'\fR. If they are not set the default for \&\f(CW\*(C`service_provider\*(C'\fR is \*(L"Libav\*(R" and the default for \&\f(CW\*(C`service_name\*(C'\fR is \*(L"Service01\*(R". .PP .Vb 9 \& avconv \-i file.mpg \-c copy \e \& \-mpegts_original_network_id 0x1122 \e \& \-mpegts_transport_stream_id 0x3344 \e \& \-mpegts_service_id 0x5566 \e \& \-mpegts_pmt_start_pid 0x1500 \e \& \-mpegts_start_pid 0x150 \e \& \-metadata service_provider="Some provider" \e \& \-metadata service_name="Some Channel" \e \& \-y out.ts .Ve .SS "null" .IX Subsection "null" Null muxer. .PP This muxer does not generate any output file, it is mainly useful for testing or benchmarking purposes. .PP For example to benchmark decoding with \fBavconv\fR you can use the command: .PP .Vb 1 \& avconv \-benchmark \-i INPUT \-f null out.null .Ve .PP Note that the above command does not read or write the \fIout.null\fR file, but specifying the output file is required by the \fBavconv\fR syntax. .PP Alternatively you can write the command as: .PP .Vb 1 \& avconv \-benchmark \-i INPUT \-f null \- .Ve .SS "matroska" .IX Subsection "matroska" Matroska container muxer. .PP This muxer implements the matroska and webm container specs. .PP The recognized metadata settings in this muxer are: .IP "\fBtitle=\fR\fItitle name\fR" 4 .IX Item "title=title name" Name provided to a single track .IP "\fBlanguage=\fR\fIlanguage name\fR" 4 .IX Item "language=language name" Specifies the language of the track in the Matroska languages form .IP "\fBSTEREO_MODE=\fR\fImode\fR" 4 .IX Item "STEREO_MODE=mode" Stereo 3D video layout of two views in a single video track .RS 4 .IP "\fBmono\fR" 4 .IX Item "mono" video is not stereo .IP "\fBleft_right\fR" 4 .IX Item "left_right" Both views are arranged side by side, Left-eye view is on the left .IP "\fBbottom_top\fR" 4 .IX Item "bottom_top" Both views are arranged in top-bottom orientation, Left-eye view is at bottom .IP "\fBtop_bottom\fR" 4 .IX Item "top_bottom" Both views are arranged in top-bottom orientation, Left-eye view is on top .IP "\fBcheckerboard_rl\fR" 4 .IX Item "checkerboard_rl" Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first .IP "\fBcheckerboard_lr\fR" 4 .IX Item "checkerboard_lr" Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first .IP "\fBrow_interleaved_rl\fR" 4 .IX Item "row_interleaved_rl" Each view is constituted by a row based interleaving, Right-eye view is first row .IP "\fBrow_interleaved_lr\fR" 4 .IX Item "row_interleaved_lr" Each view is constituted by a row based interleaving, Left-eye view is first row .IP "\fBcol_interleaved_rl\fR" 4 .IX Item "col_interleaved_rl" Both views are arranged in a column based interleaving manner, Right-eye view is first column .IP "\fBcol_interleaved_lr\fR" 4 .IX Item "col_interleaved_lr" Both views are arranged in a column based interleaving manner, Left-eye view is first column .IP "\fBanaglyph_cyan_red\fR" 4 .IX Item "anaglyph_cyan_red" All frames are in anaglyph format viewable through red-cyan filters .IP "\fBright_left\fR" 4 .IX Item "right_left" Both views are arranged side by side, Right-eye view is on the left .IP "\fBanaglyph_green_magenta\fR" 4 .IX Item "anaglyph_green_magenta" All frames are in anaglyph format viewable through green-magenta filters .IP "\fBblock_lr\fR" 4 .IX Item "block_lr" Both eyes laced in one Block, Left-eye view is first .IP "\fBblock_rl\fR" 4 .IX Item "block_rl" Both eyes laced in one Block, Right-eye view is first .RE .RS 4 .RE .PP For example a 3D WebM clip can be created using the following command line: .PP .Vb 1 \& avconv \-i sample_left_right_clip.mpg \-an \-c:v libvpx \-metadata STEREO_MODE=left_right \-y stereo_clip.webm .Ve .SS "segment" .IX Subsection "segment" Basic stream segmenter. .PP The segmenter muxer outputs streams to a number of separate files of nearly fixed duration. Output filename pattern can be set in a fashion similar to image2. .PP Every segment starts with a video keyframe, if a video stream is present. The segment muxer works best with a single constant frame rate video. .PP Optionally it can generate a flat list of the created segments, one segment per line. .IP "\fBsegment_format\fR \fIformat\fR" 4 .IX Item "segment_format format" Override the inner container format, by default it is guessed by the filename extension. .IP "\fBsegment_time\fR \fIt\fR" 4 .IX Item "segment_time t" Set segment duration to \fIt\fR seconds. .IP "\fBsegment_list\fR \fIname\fR" 4 .IX Item "segment_list name" Generate also a listfile named \fIname\fR. .IP "\fBsegment_list_size\fR \fIsize\fR" 4 .IX Item "segment_list_size size" Overwrite the listfile once it reaches \fIsize\fR entries. .PP .Vb 1 \& avconv \-i in.mkv \-c copy \-map 0 \-f segment \-list out.list out%03d.nut .Ve .SH "PROTOCOLS" .IX Header "PROTOCOLS" Protocols are configured elements in Libav which allow to access resources which require the use of a particular protocol. .PP When you configure your Libav build, all the supported protocols are enabled by default. You can list all available ones using the configure option \*(L"\-\-list\-protocols\*(R". .PP You can disable all the protocols using the configure option \&\*(L"\-\-disable\-protocols\*(R", and selectively enable a protocol using the option "\-\-enable\-protocol=\fI\s-1PROTOCOL\s0\fR\*(L", or you can disable a particular protocol using the option \&\*(R"\-\-disable\-protocol=\fI\s-1PROTOCOL\s0\fR". .PP The option \*(L"\-protocols\*(R" of the av* tools will display the list of supported protocols. .PP A description of the currently available protocols follows. .SS "applehttp" .IX Subsection "applehttp" Read Apple \s-1HTTP\s0 Live Streaming compliant segmented stream as a uniform one. The M3U8 playlists describing the segments can be remote \s-1HTTP\s0 resources or local files, accessed using the standard file protocol. \&\s-1HTTP\s0 is default, specific protocol can be declared by specifying "+\fIproto\fR" after the applehttp \s-1URI\s0 scheme name, where \fIproto\fR is either \*(L"file\*(R" or \*(L"http\*(R". .PP .Vb 3 \& applehttp://host/path/to/remote/resource.m3u8 \& applehttp+http://host/path/to/remote/resource.m3u8 \& applehttp+file://path/to/local/resource.m3u8 .Ve .SS "concat" .IX Subsection "concat" Physical concatenation protocol. .PP Allow to read and seek from many resource in sequence as if they were a unique resource. .PP A \s-1URL\s0 accepted by this protocol has the syntax: .PP .Vb 1 \& concat:||...| .Ve .PP where \fI\s-1URL1\s0\fR, \fI\s-1URL2\s0\fR, ..., \fI\s-1URLN\s0\fR are the urls of the resource to be concatenated, each one possibly specifying a distinct protocol. .PP For example to read a sequence of files \fIsplit1.mpeg\fR, \&\fIsplit2.mpeg\fR, \fIsplit3.mpeg\fR with \fIavplay\fR use the command: .PP .Vb 1 \& avplay concat:split1.mpeg\e|split2.mpeg\e|split3.mpeg .Ve .PP Note that you may need to escape the character \*(L"|\*(R" which is special for many shells. .SS "file" .IX Subsection "file" File access protocol. .PP Allow to read from or read to a file. .PP For example to read from a file \fIinput.mpeg\fR with \fBavconv\fR use the command: .PP .Vb 1 \& avconv \-i file:input.mpeg output.mpeg .Ve .PP The av* tools default to the file protocol, that is a resource specified with the name \*(L"\s-1FILE\s0.mpeg\*(R" is interpreted as the \s-1URL\s0 \&\*(L"file:FILE.mpeg\*(R". .SS "gopher" .IX Subsection "gopher" Gopher protocol. .SS "http" .IX Subsection "http" \&\s-1HTTP\s0 (Hyper Text Transfer Protocol). .SS "mmst" .IX Subsection "mmst" \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1TCP\s0. .SS "mmsh" .IX Subsection "mmsh" \&\s-1MMS\s0 (Microsoft Media Server) protocol over \s-1HTTP\s0. .PP The required syntax is: .PP .Vb 1 \& mmsh://[:][/][/] .Ve .SS "md5" .IX Subsection "md5" \&\s-1MD5\s0 output protocol. .PP Computes the \s-1MD5\s0 hash of the data to be written, and on close writes this to the designated output or stdout if none is specified. It can be used to test muxers without writing an actual file. .PP Some examples follow. .PP .Vb 2 \& # Write the MD5 hash of the encoded AVI file to the file output.avi.md5. \& avconv \-i input.flv \-f avi \-y md5:output.avi.md5 \& \& # Write the MD5 hash of the encoded AVI file to stdout. \& avconv \-i input.flv \-f avi \-y md5: .Ve .PP Note that some formats (typically \s-1MOV\s0) require the output protocol to be seekable, so they will fail with the \s-1MD5\s0 output protocol. .SS "pipe" .IX Subsection "pipe" \&\s-1UNIX\s0 pipe access protocol. .PP Allow to read and write from \s-1UNIX\s0 pipes. .PP The accepted syntax is: .PP .Vb 1 \& pipe:[] .Ve .PP \&\fInumber\fR is the number corresponding to the file descriptor of the pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If \fInumber\fR is not specified, by default the stdout file descriptor will be used for writing, stdin for reading. .PP For example to read from stdin with \fBavconv\fR: .PP .Vb 3 \& cat test.wav | avconv \-i pipe:0 \& # ...this is the same as... \& cat test.wav | avconv \-i pipe: .Ve .PP For writing to stdout with \fBavconv\fR: .PP .Vb 3 \& avconv \-i test.wav \-f avi pipe:1 | cat > test.avi \& # ...this is the same as... \& avconv \-i test.wav \-f avi pipe: | cat > test.avi .Ve .PP Note that some formats (typically \s-1MOV\s0), require the output protocol to be seekable, so they will fail with the pipe output protocol. .SS "rtmp" .IX Subsection "rtmp" Real-Time Messaging Protocol. .PP The Real-Time Messaging Protocol (\s-1RTMP\s0) is used for streaming multimedia content across a \s-1TCP/IP\s0 network. .PP The required syntax is: .PP .Vb 1 \& rtmp://[:][/][/] .Ve .PP The accepted parameters are: .IP "\fBserver\fR" 4 .IX Item "server" The address of the \s-1RTMP\s0 server. .IP "\fBport\fR" 4 .IX Item "port" The number of the \s-1TCP\s0 port to use (by default is 1935). .IP "\fBapp\fR" 4 .IX Item "app" It is the name of the application to access. It usually corresponds to the path where the application is installed on the \s-1RTMP\s0 server (e.g. \fI/ondemand/\fR, \fI/flash/live/\fR, etc.). .IP "\fBplaypath\fR" 4 .IX Item "playpath" It is the path or name of the resource to play with reference to the application specified in \fIapp\fR, may be prefixed by \*(L"mp4:\*(R". .PP For example to read with \fIavplay\fR a multimedia resource named \&\*(L"sample\*(R" from the application \*(L"vod\*(R" from an \s-1RTMP\s0 server \*(L"myserver\*(R": .PP .Vb 1 \& avplay rtmp://myserver/vod/sample .Ve .SS "rtmp, rtmpe, rtmps, rtmpt, rtmpte" .IX Subsection "rtmp, rtmpe, rtmps, rtmpt, rtmpte" Real-Time Messaging Protocol and its variants supported through librtmp. .PP Requires the presence of the librtmp headers and library during configuration. You need to explicitly configure the build with \&\*(L"\-\-enable\-librtmp\*(R". If enabled this will replace the native \s-1RTMP\s0 protocol. .PP This protocol provides most client functions and a few server functions needed to support \s-1RTMP\s0, \s-1RTMP\s0 tunneled in \s-1HTTP\s0 (\s-1RTMPT\s0), encrypted \s-1RTMP\s0 (\s-1RTMPE\s0), \s-1RTMP\s0 over \s-1SSL/TLS\s0 (\s-1RTMPS\s0) and tunneled variants of these encrypted types (\s-1RTMPTE\s0, \s-1RTMPTS\s0). .PP The required syntax is: .PP .Vb 1 \& ://[:][/][/] .Ve .PP where \fIrtmp_proto\fR is one of the strings \*(L"rtmp\*(R", \*(L"rtmpt\*(R", \*(L"rtmpe\*(R", \&\*(L"rtmps\*(R", \*(L"rtmpte\*(R", \*(L"rtmpts\*(R" corresponding to each \s-1RTMP\s0 variant, and \&\fIserver\fR, \fIport\fR, \fIapp\fR and \fIplaypath\fR have the same meaning as specified for the \s-1RTMP\s0 native protocol. \&\fIoptions\fR contains a list of space-separated options of the form \&\fIkey\fR=\fIval\fR. .PP See the librtmp manual page (man 3 librtmp) for more information. .PP For example, to stream a file in real-time to an \s-1RTMP\s0 server using \&\fBavconv\fR: .PP .Vb 1 \& avconv \-re \-i myfile \-f flv rtmp://myserver/live/mystream .Ve .PP To play the same stream using \fIavplay\fR: .PP .Vb 1 \& avplay "rtmp://myserver/live/mystream live=1" .Ve .SS "rtp" .IX Subsection "rtp" Real-Time Protocol. .SS "rtsp" .IX Subsection "rtsp" \&\s-1RTSP\s0 is not technically a protocol handler in libavformat, it is a demuxer and muxer. The demuxer supports both normal \s-1RTSP\s0 (with data transferred over \s-1RTP\s0; this is used by e.g. Apple and Microsoft) and Real-RTSP (with data transferred over \s-1RDT\s0). .PP The muxer can be used to send a stream using \s-1RTSP\s0 \s-1ANNOUNCE\s0 to a server supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's \s-1RTSP\s0 server (\f(CW\*(C`http://github.com/revmischa/rtsp\-server\*(C'\fR)). .PP The required syntax for a \s-1RTSP\s0 url is: .PP .Vb 1 \& rtsp://[:]/ .Ve .PP The following options (set on the \fBavconv\fR/\fIavplay\fR command line, or set in code via \f(CW\*(C`AVOption\*(C'\fRs or in \f(CW\*(C`avformat_open_input\*(C'\fR), are supported: .PP Flags for \f(CW\*(C`rtsp_transport\*(C'\fR: .IP "\fBudp\fR" 4 .IX Item "udp" Use \s-1UDP\s0 as lower transport protocol. .IP "\fBtcp\fR" 4 .IX Item "tcp" Use \s-1TCP\s0 (interleaving within the \s-1RTSP\s0 control channel) as lower transport protocol. .IP "\fBudp_multicast\fR" 4 .IX Item "udp_multicast" Use \s-1UDP\s0 multicast as lower transport protocol. .IP "\fBhttp\fR" 4 .IX Item "http" Use \s-1HTTP\s0 tunneling as lower transport protocol, which is useful for passing proxies. .PP Multiple lower transport protocols may be specified, in that case they are tried one at a time (if the setup of one fails, the next one is tried). For the muxer, only the \f(CW\*(C`tcp\*(C'\fR and \f(CW\*(C`udp\*(C'\fR options are supported. .PP Flags for \f(CW\*(C`rtsp_flags\*(C'\fR: .IP "\fBfilter_src\fR" 4 .IX Item "filter_src" Accept packets only from negotiated peer address and port. .PP When receiving data over \s-1UDP\s0, the demuxer tries to reorder received packets (since they may arrive out of order, or packets may get lost totally). In order for this to be enabled, a maximum delay must be specified in the \&\f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext. .PP When watching multi-bitrate Real-RTSP streams with \fIavplay\fR, the streams to display can be chosen with \f(CW\*(C`\-vst\*(C'\fR \fIn\fR and \&\f(CW\*(C`\-ast\*(C'\fR \fIn\fR for video and audio respectively, and can be switched on the fly by pressing \f(CW\*(C`v\*(C'\fR and \f(CW\*(C`a\*(C'\fR. .PP Example command lines: .PP To watch a stream over \s-1UDP\s0, with a max reordering delay of 0.5 seconds: .PP .Vb 1 \& avplay \-max_delay 500000 \-rtsp_transport udp rtsp://server/video.mp4 .Ve .PP To watch a stream tunneled over \s-1HTTP:\s0 .PP .Vb 1 \& avplay \-rtsp_transport http rtsp://server/video.mp4 .Ve .PP To send a stream in realtime to a \s-1RTSP\s0 server, for others to watch: .PP .Vb 1 \& avconv \-re \-i \-f rtsp \-muxdelay 0.1 rtsp://server/live.sdp .Ve .SS "sap" .IX Subsection "sap" Session Announcement Protocol (\s-1RFC\s0 2974). This is not technically a protocol handler in libavformat, it is a muxer and demuxer. It is used for signalling of \s-1RTP\s0 streams, by announcing the \s-1SDP\s0 for the streams regularly on a separate port. .PP \fIMuxer\fR .IX Subsection "Muxer" .PP The syntax for a \s-1SAP\s0 url given to the muxer is: .PP .Vb 1 \& sap://[:][?] .Ve .PP The \s-1RTP\s0 packets are sent to \fIdestination\fR on port \fIport\fR, or to port 5004 if no port is specified. \&\fIoptions\fR is a \f(CW\*(C`&\*(C'\fR\-separated list. The following options are supported: .IP "\fBannounce_addr=\fR\fIaddress\fR" 4 .IX Item "announce_addr=address" Specify the destination \s-1IP\s0 address for sending the announcements to. If omitted, the announcements are sent to the commonly used \s-1SAP\s0 announcement multicast address 224.2.127.254 (sap.mcast.net), or ff0e::2:7ffe if \fIdestination\fR is an IPv6 address. .IP "\fBannounce_port=\fR\fIport\fR" 4 .IX Item "announce_port=port" Specify the port to send the announcements on, defaults to 9875 if not specified. .IP "\fBttl=\fR\fIttl\fR" 4 .IX Item "ttl=ttl" Specify the time to live value for the announcements and \s-1RTP\s0 packets, defaults to 255. .IP "\fBsame_port=\fR\fI0|1\fR" 4 .IX Item "same_port=0|1" If set to 1, send all \s-1RTP\s0 streams on the same port pair. If zero (the default), all streams are sent on unique ports, with each stream on a port 2 numbers higher than the previous. VLC/Live555 requires this to be set to 1, to be able to receive the stream. The \s-1RTP\s0 stack in libavformat for receiving requires all streams to be sent on unique ports. .PP Example command lines follow. .PP To broadcast a stream on the local subnet, for watching in \s-1VLC:\s0 .PP .Vb 1 \& avconv \-re \-i \-f sap sap://224.0.0.255?same_port=1 .Ve .PP Similarly, for watching in avplay: .PP .Vb 1 \& avconv \-re \-i \-f sap sap://224.0.0.255 .Ve .PP And for watching in avplay, over IPv6: .PP .Vb 1 \& avconv \-re \-i \-f sap sap://[ff0e::1:2:3:4] .Ve .PP \fIDemuxer\fR .IX Subsection "Demuxer" .PP The syntax for a \s-1SAP\s0 url given to the demuxer is: .PP .Vb 1 \& sap://[
][:] .Ve .PP \&\fIaddress\fR is the multicast address to listen for announcements on, if omitted, the default 224.2.127.254 (sap.mcast.net) is used. \fIport\fR is the port that is listened on, 9875 if omitted. .PP The demuxers listens for announcements on the given address and port. Once an announcement is received, it tries to receive that particular stream. .PP Example command lines follow. .PP To play back the first stream announced on the normal \s-1SAP\s0 multicast address: .PP .Vb 1 \& avplay sap:// .Ve .PP To play back the first stream announced on one the default IPv6 \s-1SAP\s0 multicast address: .PP .Vb 1 \& avplay sap://[ff0e::2:7ffe] .Ve .SS "tcp" .IX Subsection "tcp" Trasmission Control Protocol. .PP The required syntax for a \s-1TCP\s0 url is: .PP .Vb 1 \& tcp://:[?] .Ve .IP "\fBlisten\fR" 4 .IX Item "listen" Listen for an incoming connection .Sp .Vb 2 \& avconv \-i \-f tcp://:?listen \& avplay tcp://: .Ve .SS "udp" .IX Subsection "udp" User Datagram Protocol. .PP The required syntax for a \s-1UDP\s0 url is: .PP .Vb 1 \& udp://:[?] .Ve .PP \&\fIoptions\fR contains a list of &\-seperated options of the form \fIkey\fR=\fIval\fR. Follow the list of supported options. .IP "\fBbuffer_size=\fR\fIsize\fR" 4 .IX Item "buffer_size=size" set the \s-1UDP\s0 buffer size in bytes .IP "\fBlocalport=\fR\fIport\fR" 4 .IX Item "localport=port" override the local \s-1UDP\s0 port to bind with .IP "\fBlocaladdr=\fR\fIaddr\fR" 4 .IX Item "localaddr=addr" Choose the local \s-1IP\s0 address. This is useful e.g. if sending multicast and the host has multiple interfaces, where the user can choose which interface to send on by specifying the \s-1IP\s0 address of that interface. .IP "\fBpkt_size=\fR\fIsize\fR" 4 .IX Item "pkt_size=size" set the size in bytes of \s-1UDP\s0 packets .IP "\fBreuse=\fR\fI1|0\fR" 4 .IX Item "reuse=1|0" explicitly allow or disallow reusing \s-1UDP\s0 sockets .IP "\fBttl=\fR\fIttl\fR" 4 .IX Item "ttl=ttl" set the time to live value (for multicast only) .IP "\fBconnect=\fR\fI1|0\fR" 4 .IX Item "connect=1|0" Initialize the \s-1UDP\s0 socket with \f(CW\*(C`connect()\*(C'\fR. In this case, the destination address can't be changed with ff_udp_set_remote_url later. If the destination address isn't known at the start, this option can be specified in ff_udp_set_remote_url, too. This allows finding out the source address for the packets with getsockname, and makes writes return with \s-1AVERROR\s0(\s-1ECONNREFUSED\s0) if \*(L"destination unreachable\*(R" is received. For receiving, this gives the benefit of only receiving packets from the specified peer address/port. .PP Some usage examples of the udp protocol with \fBavconv\fR follow. .PP To stream over \s-1UDP\s0 to a remote endpoint: .PP .Vb 1 \& avconv \-i \-f udp://: .Ve .PP To stream in mpegts format over \s-1UDP\s0 using 188 sized \s-1UDP\s0 packets, using a large input buffer: .PP .Vb 1 \& avconv \-i \-f mpegts udp://:?pkt_size=188&buffer_size=65535 .Ve .PP To receive over \s-1UDP\s0 from a remote endpoint: .PP .Vb 1 \& avconv \-i udp://[]: .Ve .SH "INPUT DEVICES" .IX Header "INPUT DEVICES" Input devices are configured elements in Libav which allow to access the data coming from a multimedia device attached to your system. .PP When you configure your Libav 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 av* tools will display the list of supported input devices (amongst the demuxers). .PP A description of the currently available input devices follows. .SS "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:[,[,]] .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 \fBavconv\fR from an \s-1ALSA\s0 device with card id 0, you may run the command: .PP .Vb 1 \& avconv \-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> .SS "bktr" .IX Subsection "bktr" \&\s-1BSD\s0 video input device. .SS "dv1394" .IX Subsection "dv1394" Linux \s-1DV\s0 1394 input device. .SS "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 \&\fBavconv\fR: .PP .Vb 1 \& avconv \-f fbdev \-r 10 \-i /dev/fb0 out.avi .Ve .PP You can take a single screenshot image with the command: .PP .Vb 1 \& avconv \-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). .SS "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 Libav 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 \&\fIjack_connect\fR and \fIjack_disconnect\fR programs, or do it through a graphical interface, for example with \fIqjackctl\fR. .PP To list the \s-1JACK\s0 clients and their properties you can invoke the command \&\fIjack_lsp\fR. .PP Follows an example which shows how to capture a \s-1JACK\s0 readable client with \fBavconv\fR. .PP .Vb 2 \& # Create a JACK writable client with name "libav". \& $ avconv \-f jack \-i libav \-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 \& libav:input_1 \& metro:120_bpm \& \& # Connect metro to the avconv writable client. \& $ jack_connect metro:120_bpm libav:input_1 .Ve .PP For more information read: <\fBhttp://jackaudio.org/\fR> .SS "libdc1394" .IX Subsection "libdc1394" \&\s-1IIDC1394\s0 input device, based on libdc1394 and libraw1394. .SS "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 \fBavconv\fR use the command: .PP .Vb 1 \& avconv \-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> .SS "pulse" .IX Subsection "pulse" pulseaudio input device. .PP To enable this input device during configuration you need libpulse-simple installed in your system. .PP The filename to provide to the input device is a source device or the string \*(L"default\*(R" .PP To list the pulse source devices and their properties you can invoke the command \fIpactl list sources\fR. .PP .Vb 1 \& avconv \-f pulse \-i default /tmp/pulse.wav .Ve .PP \fI\fIserver\fI AVOption\fR .IX Subsection "server AVOption" .PP The syntax is: .PP .Vb 1 \& \-server .Ve .PP Connects to a specific server. .PP \fI\fIname\fI AVOption\fR .IX Subsection "name AVOption" .PP The syntax is: .PP .Vb 1 \& \-name .Ve .PP Specify the application name pulse will use when showing active clients, by default it is \*(L"libav\*(R" .PP \fI\fIstream_name\fI AVOption\fR .IX Subsection "stream_name AVOption" .PP The syntax is: .PP .Vb 1 \& \-stream_name .Ve .PP Specify the stream name pulse will use when showing active streams, by default it is \*(L"record\*(R" .PP \fI\fIsample_rate\fI AVOption\fR .IX Subsection "sample_rate AVOption" .PP The syntax is: .PP .Vb 1 \& \-sample_rate .Ve .PP Specify the samplerate in Hz, by default 48kHz is used. .PP \fI\fIchannels\fI AVOption\fR .IX Subsection "channels AVOption" .PP The syntax is: .PP .Vb 1 \& \-channels .Ve .PP Specify the channels in use, by default 2 (stereo) is set. .PP \fI\fIframe_size\fI AVOption\fR .IX Subsection "frame_size AVOption" .PP The syntax is: .PP .Vb 1 \& \-frame_size .Ve .PP Specify the number of byte per frame, by default it is set to 1024. .PP \fI\fIfragment_size\fI AVOption\fR .IX Subsection "fragment_size AVOption" .PP The syntax is: .PP .Vb 1 \& \-fragment_size .Ve .PP Specify the minimal buffering fragment in pulseaudio, it will affect the audio latency. By default it is unset. .SS "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 \fBavconv\fR use the command: .PP .Vb 1 \& avconv \-f sndio \-i /dev/audio0 /tmp/oss.wav .Ve .SS "video4linux and video4linux2" .IX Subsection "video4linux and video4linux2" Video4Linux and Video4Linux2 input video devices. .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 Video4Linux and Video4Linux2 devices only support a limited set of \&\fIwidth\fRx\fIheight\fR sizes and framerates. You can check which are supported for example with the command \fIdov4l\fR for Video4Linux devices and using \fB\-list_formats all\fR for Video4Linux2 devices. .PP If the size for the device is set to 0x0, the input device will try to autodetect the size to use. Only for the video4linux2 device, if the frame rate is set to 0/0 the input device will use the frame rate value already set in the driver. .PP Video4Linux support is deprecated since Linux 2.6.30, and will be dropped in later versions. .PP Follow some usage examples of the video4linux devices with the av* tools. .PP .Vb 3 \& # Grab and show the input of a video4linux device, frame rate is set \& # to the default of 25/1. \& avplay \-s 320x240 \-f video4linux /dev/video0 \& \& # Grab and show the input of a video4linux2 device, autoadjust size. \& avplay \-f video4linux2 /dev/video0 \& \& # Grab and record the input of a video4linux2 device, autoadjust size, \& # frame rate value defaults to 0/0 so it is read from the video4linux2 \& # driver. \& avconv \-f video4linux2 \-i /dev/video0 out.mpeg .Ve .SS "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. .SS "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 \& []:.[+,] .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 ommitted, 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 \fIdpyinfo\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 \fBavconv\fR: .PP .Vb 1 \& avconv \-f x11grab \-r 25 \-s cif \-i :0.0 out.mpg \& \& # Grab at position 10,20. \& avconv \-f x11grab \-r 25 \-s cif \-i :0.0+10,20 out.mpg .Ve .PP \fI\fIfollow_mouse\fI AVOption\fR .IX Subsection "follow_mouse AVOption" .PP The syntax is: .PP .Vb 1 \& \-follow_mouse centered| .Ve .PP 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. .PP For example: .PP .Vb 1 \& avconv \-f x11grab \-follow_mouse centered \-r 25 \-s cif \-i :0.0 out.mpg \& \& # Follows only when the mouse pointer reaches within 100 pixels to edge \& avconv \-f x11grab \-follow_mouse 100 \-r 25 \-s cif \-i :0.0 out.mpg .Ve .PP \fI\fIshow_region\fI AVOption\fR .IX Subsection "show_region AVOption" .PP The syntax is: .PP .Vb 1 \& \-show_region 1 .Ve .PP If \fIshow_region\fR AVOption is specified with \fI1\fR, then the grabbing region will be indicated on screen. With this option, it's easy to know what is being grabbed if only a portion of the screen is grabbed. .PP For example: .PP .Vb 1 \& avconv \-f x11grab \-show_region 1 \-r 25 \-s cif \-i :0.0+10,20 out.mpg \& \& # With follow_mouse \& avconv \-f x11grab \-follow_mouse centered \-show_region 1 \-r 25 \-s cif \-i :0.0 out.mpg .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIavconv\fR\|(1), \fIavplay\fR\|(1) and the Libav \s-1HTML\s0 documentation .SH "AUTHORS" .IX Header "AUTHORS" The Libav developers