.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" 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" '' . ds C` . ds C' '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. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" 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 "AVPLAY 1" .TH AVPLAY 1 "2018-02-18" " " " " .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh avplay \- AVplay media player .PP avplay [options] \fIinput_file\fR .PP AVplay is a very simple and portable media player using the Libav libraries and the \s-1SDL\s0 library. It is mostly used as a testbed for the various Libav APIs. .PP All the numerical options, if not specified otherwise, accept in input a string representing a number, which may contain one of the \&\s-1SI\s0 unit prefixes, for example 'K', 'M', 'G'. If 'i' is appended after the prefix, binary prefixes are used, which are based on powers of 1024 instead of powers of 1000. The 'B' postfix multiplies the value by 8, and can be appended after a unit prefix or used alone. This allows using for example '\s-1KB\s0', 'MiB', 'G' and 'B' as number 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. .IP "\fBi:\fR\fIstream_id\fR" 4 .IX Item "i:stream_id" Match the stream by stream id (e.g. \s-1PID\s0 in MPEG-TS container). .IP "\fBm:\fR\fIkey\fR\fB[:\fR\fIvalue\fR\fB]\fR" 4 .IX Item "m:key[:value]" Matches streams with the metadata tag \fIkey\fR having the specified value. If \&\fIvalue\fR is not given, matches streams that contain the given tag with any value. .Sp Note that in \fBavconv\fR, matching by metadata will only work properly for input files. .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\fIarg\fR\fB]\fR" 4 .IX Item "-h, -?, -help, --help [arg]" Show help. An optional parameter may be specified to print help about a specific item. .Sp Possible values of \fIarg\fR are: .RS 4 .IP "\fBdecoder=\fR\fIdecoder_name\fR" 4 .IX Item "decoder=decoder_name" Print detailed information about the decoder named \fIdecoder_name\fR. Use the \&\fB\-decoders\fR option to get a list of all decoders. .IP "\fBencoder=\fR\fIencoder_name\fR" 4 .IX Item "encoder=encoder_name" Print detailed information about the encoder named \fIencoder_name\fR. Use the \&\fB\-encoders\fR option to get a list of all encoders. .IP "\fBdemuxer=\fR\fIdemuxer_name\fR" 4 .IX Item "demuxer=demuxer_name" Print detailed information about the demuxer named \fIdemuxer_name\fR. Use the \&\fB\-formats\fR option to get a list of all demuxers and muxers. .IP "\fBmuxer=\fR\fImuxer_name\fR" 4 .IX Item "muxer=muxer_name" Print detailed information about the muxer named \fImuxer_name\fR. Use the \&\fB\-formats\fR option to get a list of all muxers and demuxers. .IP "\fBfilter=\fR\fIfilter_name\fR" 4 .IX Item "filter=filter_name" Print detailed information about the filter name \fIfilter_name\fR. Use the \&\fB\-filters\fR option to get a list of all filters. .RE .RS 4 .RE .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 all codecs known to libavcodec. .Sp Note that the term 'codec' is used throughout this documentation as a shortcut for what is more correctly called a media bitstream format. .IP "\fB\-decoders\fR" 4 .IX Item "-decoders" Show available decoders. .IP "\fB\-encoders\fR" 4 .IX Item "-encoders" Show all available encoders. .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 .IP "\fB\-cpuflags mask (\fR\fIglobal\fR\fB)\fR" 4 .IX Item "-cpuflags mask (global)" Set a mask that's applied to autodetected \s-1CPU\s0 flags. This option is intended for testing. Do not use it unless you know what you're doing. .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 "Codec AVOptions" .IX Subsection "Codec AVOptions" .IP "\fB\-b[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-b[:stream_specifier] integer (output,audio,video)" set bitrate (in bits/s) .IP "\fB\-bt[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-bt[:stream_specifier] integer (output,video)" Set video bitrate tolerance (in bits/s). In 1\-pass mode, bitrate tolerance specifies how far ratecontrol is willing to deviate from the target average bitrate value. This is not related to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality. .IP "\fB\-flags[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput/output,audio,video\fR\fB)\fR" 4 .IX Item "-flags[:stream_specifier] flags (input/output,audio,video)" Possible values: .RS 4 .IP "\fBunaligned\fR" 4 .IX Item "unaligned" allow decoders to produce unaligned output .IP "\fBmv4\fR" 4 .IX Item "mv4" use four motion vectors per macroblock (\s-1MPEG\-4\s0) .IP "\fBqpel\fR" 4 .IX Item "qpel" use 1/4\-pel motion compensation .IP "\fBloop\fR" 4 .IX Item "loop" use loop filter .IP "\fBqscale\fR" 4 .IX Item "qscale" use fixed qscale .IP "\fBgmc\fR" 4 .IX Item "gmc" use gmc .IP "\fBmv0\fR" 4 .IX Item "mv0" always try a mb with mv=<0,0> .IP "\fBinput_preserved\fR" 4 .IX Item "input_preserved" .PD 0 .IP "\fBpass1\fR" 4 .IX Item "pass1" .PD use internal 2\-pass ratecontrol in first pass mode .IP "\fBpass2\fR" 4 .IX Item "pass2" use internal 2\-pass ratecontrol in second pass mode .IP "\fBgray\fR" 4 .IX Item "gray" only decode/encode grayscale .IP "\fBemu_edge\fR" 4 .IX Item "emu_edge" do not draw edges .IP "\fBpsnr\fR" 4 .IX Item "psnr" error[?] variables will be set during encoding .IP "\fBtruncated\fR" 4 .IX Item "truncated" .PD 0 .IP "\fBnaq\fR" 4 .IX Item "naq" .PD normalize adaptive quantization .IP "\fBildct\fR" 4 .IX Item "ildct" use interlaced \s-1DCT\s0 .IP "\fBlow_delay\fR" 4 .IX Item "low_delay" force low delay .IP "\fBglobal_header\fR" 4 .IX Item "global_header" place global headers in extradata instead of every keyframe .IP "\fBbitexact\fR" 4 .IX Item "bitexact" use only bitexact functions (except (I)DCT) .IP "\fBaic\fR" 4 .IX Item "aic" H.263 advanced intra coding / \s-1MPEG\-4 AC\s0 prediction .IP "\fBilme\fR" 4 .IX Item "ilme" interlaced motion estimation .IP "\fBcgop\fR" 4 .IX Item "cgop" closed \s-1GOP\s0 .IP "\fBoutput_corrupt\fR" 4 .IX Item "output_corrupt" Output even potentially corrupted frames .RE .RS 4 .RE .IP "\fB\-me_method[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-me_method[:stream_specifier] integer (output,video)" set motion estimation method .Sp Possible values: .RS 4 .IP "\fBzero\fR" 4 .IX Item "zero" zero motion estimation (fastest) .IP "\fBfull\fR" 4 .IX Item "full" full motion estimation (slowest) .IP "\fBepzs\fR" 4 .IX Item "epzs" \&\s-1EPZS\s0 motion estimation (default) .IP "\fBesa\fR" 4 .IX Item "esa" esa motion estimation (alias for full) .IP "\fBtesa\fR" 4 .IX Item "tesa" tesa motion estimation .IP "\fBdia\fR" 4 .IX Item "dia" diamond motion estimation (alias for \s-1EPZS\s0) .IP "\fBlog\fR" 4 .IX Item "log" log motion estimation .IP "\fBphods\fR" 4 .IX Item "phods" phods motion estimation .IP "\fBx1\fR" 4 .IX Item "x1" X1 motion estimation .IP "\fBhex\fR" 4 .IX Item "hex" hex motion estimation .IP "\fBumh\fR" 4 .IX Item "umh" umh motion estimation .RE .RS 4 .RE .IP "\fB\-g[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-g[:stream_specifier] integer (output,video)" set the group of picture (\s-1GOP\s0) size .IP "\fB\-ar[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,audio\fR\fB)\fR" 4 .IX Item "-ar[:stream_specifier] integer (input/output,audio)" set audio sampling rate (in Hz) .IP "\fB\-ac[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,audio\fR\fB)\fR" 4 .IX Item "-ac[:stream_specifier] integer (input/output,audio)" set number of audio channels .IP "\fB\-cutoff[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio\fR\fB)\fR" 4 .IX Item "-cutoff[:stream_specifier] integer (output,audio)" set cutoff bandwidth .IP "\fB\-frame_size[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio\fR\fB)\fR" 4 .IX Item "-frame_size[:stream_specifier] integer (output,audio)" .PD 0 .IP "\fB\-qcomp[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-qcomp[:stream_specifier] float (output,video)" .PD video quantizer scale compression (\s-1VBR\s0). Constant of ratecontrol equation. Recommended range for default rc_eq: 0.0\-1.0 .IP "\fB\-qblur[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-qblur[:stream_specifier] float (output,video)" video quantizer scale blur (\s-1VBR\s0) .IP "\fB\-qmin[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-qmin[:stream_specifier] integer (output,video)" minimum video quantizer scale (\s-1VBR\s0) .IP "\fB\-qmax[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-qmax[:stream_specifier] integer (output,video)" maximum video quantizer scale (\s-1VBR\s0) .IP "\fB\-qdiff[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-qdiff[:stream_specifier] integer (output,video)" maximum difference between the quantizer scales (\s-1VBR\s0) .IP "\fB\-bf[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-bf[:stream_specifier] integer (output,video)" use 'frames' B frames .IP "\fB\-b_qfactor[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-b_qfactor[:stream_specifier] float (output,video)" \&\s-1QP\s0 factor between P\- and B\-frames .IP "\fB\-rc_strategy[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_strategy[:stream_specifier] integer (output,video)" ratecontrol method .IP "\fB\-b_strategy[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-b_strategy[:stream_specifier] integer (output,video)" strategy to choose between I/P/B\-frames .IP "\fB\-ps[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-ps[:stream_specifier] integer (output,video)" \&\s-1RTP\s0 payload size in bytes .IP "\fB\-bug[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-bug[:stream_specifier] flags (input,video)" work around not autodetected encoder bugs .Sp Possible values: .RS 4 .IP "\fBautodetect\fR" 4 .IX Item "autodetect" .PD 0 .IP "\fBold_msmpeg4\fR" 4 .IX Item "old_msmpeg4" .PD some old lavc-generated MSMPEG4v3 files (no autodetection) .IP "\fBxvid_ilace\fR" 4 .IX Item "xvid_ilace" Xvid interlacing bug (autodetected if \s-1FOURCC\s0 == \s-1XVIX\s0) .IP "\fBump4\fR" 4 .IX Item "ump4" (autodetected if \s-1FOURCC\s0 == \s-1UMP4\s0) .IP "\fBno_padding\fR" 4 .IX Item "no_padding" padding bug (autodetected) .IP "\fBamv\fR" 4 .IX Item "amv" .PD 0 .IP "\fBac_vlc\fR" 4 .IX Item "ac_vlc" .PD illegal \s-1VLC\s0 bug (autodetected per \s-1FOURCC\s0) .IP "\fBqpel_chroma\fR" 4 .IX Item "qpel_chroma" .PD 0 .IP "\fBstd_qpel\fR" 4 .IX Item "std_qpel" .PD old standard qpel (autodetected per FOURCC/version) .IP "\fBqpel_chroma2\fR" 4 .IX Item "qpel_chroma2" .PD 0 .IP "\fBdirect_blocksize\fR" 4 .IX Item "direct_blocksize" .PD direct-qpel-blocksize bug (autodetected per FOURCC/version) .IP "\fBedge\fR" 4 .IX Item "edge" edge padding bug (autodetected per FOURCC/version) .IP "\fBhpel_chroma\fR" 4 .IX Item "hpel_chroma" .PD 0 .IP "\fBdc_clip\fR" 4 .IX Item "dc_clip" .IP "\fBms\fR" 4 .IX Item "ms" .PD work around various bugs in Microsoft's broken decoders .IP "\fBtrunc\fR" 4 .IX Item "trunc" truncated frames .RE .RS 4 .RE .IP "\fB\-strict[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,audio,video\fR\fB)\fR" 4 .IX Item "-strict[:stream_specifier] integer (input/output,audio,video)" how strictly to follow the standards .Sp Possible values: .RS 4 .IP "\fBvery\fR" 4 .IX Item "very" strictly conform to a older more strict version of the spec or reference software .IP "\fBstrict\fR" 4 .IX Item "strict" strictly conform to all the things in the spec no matter what the consequences .IP "\fBnormal\fR" 4 .IX Item "normal" .PD 0 .IP "\fBunofficial\fR" 4 .IX Item "unofficial" .PD allow unofficial extensions .IP "\fBexperimental\fR" 4 .IX Item "experimental" allow non-standardized experimental things .RE .RS 4 .RE .IP "\fB\-b_qoffset[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-b_qoffset[:stream_specifier] float (output,video)" \&\s-1QP\s0 offset between P\- and B\-frames .IP "\fB\-err_detect[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput,audio,video\fR\fB)\fR" 4 .IX Item "-err_detect[:stream_specifier] flags (input,audio,video)" set error detection flags .Sp Possible values: .RS 4 .IP "\fBcrccheck\fR" 4 .IX Item "crccheck" verify embedded CRCs .IP "\fBbitstream\fR" 4 .IX Item "bitstream" detect bitstream specification deviations .IP "\fBbuffer\fR" 4 .IX Item "buffer" detect improper bitstream length .IP "\fBexplode\fR" 4 .IX Item "explode" abort decoding on minor error detection .RE .RS 4 .RE .IP "\fB\-mpeg_quant[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mpeg_quant[:stream_specifier] integer (output,video)" use \s-1MPEG\s0 quantizers instead of H.263 .IP "\fB\-qsquish[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-qsquish[:stream_specifier] float (output,video)" how to keep quantizer between qmin and qmax (0 = clip, 1 = use differentiable function) .IP "\fB\-rc_qmod_amp[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_qmod_amp[:stream_specifier] float (output,video)" experimental quantizer modulation .IP "\fB\-rc_qmod_freq[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_qmod_freq[:stream_specifier] integer (output,video)" experimental quantizer modulation .IP "\fB\-rc_eq[:stream_specifier]\fR \fIstring\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_eq[:stream_specifier] string (output,video)" Set rate control equation. When computing the expression, besides the standard functions defined in the section 'Expression Evaluation', the following functions are available: bits2qp(bits), qp2bits(qp). Also the following constants are available: iTex pTex tex mv fCode iCount mcVar var isI isP isB avgQP qComp avgIITex avgPITex avgPPTex avgBPTex avgTex. .IP "\fB\-maxrate[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-maxrate[:stream_specifier] integer (output,audio,video)" Set maximum bitrate tolerance (in bits/s). Requires bufsize to be set. .IP "\fB\-minrate[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-minrate[:stream_specifier] integer (output,audio,video)" Set minimum bitrate tolerance (in bits/s). Most useful in setting up a \s-1CBR\s0 encode. It is of little use otherwise. .IP "\fB\-bufsize[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-bufsize[:stream_specifier] integer (output,audio,video)" set ratecontrol buffer size (in bits) .IP "\fB\-rc_buf_aggressivity[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_buf_aggressivity[:stream_specifier] float (output,video)" currently useless .IP "\fB\-i_qfactor[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-i_qfactor[:stream_specifier] float (output,video)" \&\s-1QP\s0 factor between P\- and I\-frames .IP "\fB\-i_qoffset[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-i_qoffset[:stream_specifier] float (output,video)" \&\s-1QP\s0 offset between P\- and I\-frames .IP "\fB\-rc_init_cplx[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_init_cplx[:stream_specifier] float (output,video)" initial complexity for 1\-pass encoding .IP "\fB\-dct[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-dct[:stream_specifier] integer (output,video)" \&\s-1DCT\s0 algorithm .Sp Possible values: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" autoselect a good one (default) .IP "\fBfastint\fR" 4 .IX Item "fastint" fast integer .IP "\fBint\fR" 4 .IX Item "int" accurate integer .IP "\fBmmx\fR" 4 .IX Item "mmx" .PD 0 .IP "\fBaltivec\fR" 4 .IX Item "altivec" .IP "\fBfaan\fR" 4 .IX Item "faan" .PD floating point \s-1AAN DCT\s0 .RE .RS 4 .RE .IP "\fB\-lumi_mask[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-lumi_mask[:stream_specifier] float (output,video)" compresses bright areas stronger than medium ones .IP "\fB\-tcplx_mask[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-tcplx_mask[:stream_specifier] float (output,video)" temporal complexity masking .IP "\fB\-scplx_mask[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-scplx_mask[:stream_specifier] float (output,video)" spatial complexity masking .IP "\fB\-p_mask[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-p_mask[:stream_specifier] float (output,video)" inter masking .IP "\fB\-dark_mask[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-dark_mask[:stream_specifier] float (output,video)" compresses dark areas stronger than medium ones .IP "\fB\-idct[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-idct[:stream_specifier] integer (input/output,video)" select \s-1IDCT\s0 implementation .Sp Possible values: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" .PD 0 .IP "\fBint\fR" 4 .IX Item "int" .IP "\fBsimple\fR" 4 .IX Item "simple" .IP "\fBsimplemmx\fR" 4 .IX Item "simplemmx" .IP "\fBarm\fR" 4 .IX Item "arm" .IP "\fBaltivec\fR" 4 .IX Item "altivec" .IP "\fBsh4\fR" 4 .IX Item "sh4" .IP "\fBsimplearm\fR" 4 .IX Item "simplearm" .IP "\fBsimplearmv5te\fR" 4 .IX Item "simplearmv5te" .IP "\fBsimplearmv6\fR" 4 .IX Item "simplearmv6" .IP "\fBsimpleneon\fR" 4 .IX Item "simpleneon" .IP "\fBsimplealpha\fR" 4 .IX Item "simplealpha" .IP "\fBipp\fR" 4 .IX Item "ipp" .IP "\fBxvid\fR" 4 .IX Item "xvid" .IP "\fBxvidmmx\fR" 4 .IX Item "xvidmmx" .IP "\fBfaani\fR" 4 .IX Item "faani" .PD floating point \s-1AAN IDCT\s0 .RE .RS 4 .RE .IP "\fB\-ec[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-ec[:stream_specifier] flags (input,video)" set error concealment strategy .Sp Possible values: .RS 4 .IP "\fBguess_mvs\fR" 4 .IX Item "guess_mvs" iterative motion vector (\s-1MV\s0) search (slow) .IP "\fBdeblock\fR" 4 .IX Item "deblock" use strong deblock filter for damaged MBs .RE .RS 4 .RE .IP "\fB\-pred[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-pred[:stream_specifier] integer (output,video)" prediction method .Sp Possible values: .RS 4 .IP "\fBleft\fR" 4 .IX Item "left" .PD 0 .IP "\fBplane\fR" 4 .IX Item "plane" .IP "\fBmedian\fR" 4 .IX Item "median" .RE .RS 4 .RE .IP "\fB\-aspect[:stream_specifier]\fR \fIrational number\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-aspect[:stream_specifier] rational number (output,video)" .PD sample aspect ratio .IP "\fB\-debug[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput/output,audio,video,subtitles\fR\fB)\fR" 4 .IX Item "-debug[:stream_specifier] flags (input/output,audio,video,subtitles)" print specific debug info .Sp Possible values: .RS 4 .IP "\fBpict\fR" 4 .IX Item "pict" picture info .IP "\fBrc\fR" 4 .IX Item "rc" rate control .IP "\fBbitstream\fR" 4 .IX Item "bitstream" .PD 0 .IP "\fBmb_type\fR" 4 .IX Item "mb_type" .PD macroblock (\s-1MB\s0) type .IP "\fBqp\fR" 4 .IX Item "qp" per-block quantization parameter (\s-1QP\s0) .IP "\fBmv\fR" 4 .IX Item "mv" motion vector .IP "\fBdct_coeff\fR" 4 .IX Item "dct_coeff" .PD 0 .IP "\fBskip\fR" 4 .IX Item "skip" .IP "\fBstartcode\fR" 4 .IX Item "startcode" .IP "\fBpts\fR" 4 .IX Item "pts" .IP "\fBer\fR" 4 .IX Item "er" .PD error recognition .IP "\fBmmco\fR" 4 .IX Item "mmco" memory management control operations (H.264) .IP "\fBbugs\fR" 4 .IX Item "bugs" .PD 0 .IP "\fBvis_qp\fR" 4 .IX Item "vis_qp" .PD visualize quantization parameter (\s-1QP\s0), lower \s-1QP\s0 are tinted greener .IP "\fBvis_mb_type\fR" 4 .IX Item "vis_mb_type" visualize block types .IP "\fBbuffers\fR" 4 .IX Item "buffers" picture buffer allocations .IP "\fBthread_ops\fR" 4 .IX Item "thread_ops" threading operations .RE .RS 4 .RE .IP "\fB\-vismv[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-vismv[:stream_specifier] integer (input,video)" visualize motion vectors (MVs) .Sp Possible values: .RS 4 .IP "\fBpf\fR" 4 .IX Item "pf" forward predicted MVs of P\-frames .IP "\fBbf\fR" 4 .IX Item "bf" forward predicted MVs of B\-frames .IP "\fBbb\fR" 4 .IX Item "bb" backward predicted MVs of B\-frames .RE .RS 4 .RE .IP "\fB\-cmp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-cmp[:stream_specifier] integer (output,video)" full-pel \s-1ME\s0 compare function .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fB\-subcmp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-subcmp[:stream_specifier] integer (output,video)" .PD sub-pel \s-1ME\s0 compare function .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fB\-mbcmp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mbcmp[:stream_specifier] integer (output,video)" .PD macroblock compare function .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fB\-ildctcmp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-ildctcmp[:stream_specifier] integer (output,video)" .PD interlaced \s-1DCT\s0 compare function .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fB\-dia_size[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-dia_size[:stream_specifier] integer (output,video)" .PD diamond type & size for motion estimation .IP "\fB\-last_pred[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-last_pred[:stream_specifier] integer (output,video)" amount of motion predictors from the previous frame .IP "\fB\-preme[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-preme[:stream_specifier] integer (output,video)" pre motion estimation .IP "\fB\-precmp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-precmp[:stream_specifier] integer (output,video)" pre motion estimation compare function .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fB\-pre_dia_size[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-pre_dia_size[:stream_specifier] integer (output,video)" .PD diamond type & size for motion estimation pre-pass .IP "\fB\-subq[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-subq[:stream_specifier] integer (output,video)" sub-pel motion estimation quality .IP "\fB\-me_range[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-me_range[:stream_specifier] integer (output,video)" limit motion vectors range (1023 for DivX player) .IP "\fB\-ibias[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-ibias[:stream_specifier] integer (output,video)" intra quant bias .IP "\fB\-pbias[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-pbias[:stream_specifier] integer (output,video)" inter quant bias .IP "\fB\-global_quality[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-global_quality[:stream_specifier] integer (output,audio,video)" .PD 0 .IP "\fB\-coder[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-coder[:stream_specifier] integer (output,video)" .PD Possible values: .RS 4 .IP "\fBvlc\fR" 4 .IX Item "vlc" variable length coder / Huffman coder .IP "\fBac\fR" 4 .IX Item "ac" arithmetic coder .IP "\fBraw\fR" 4 .IX Item "raw" raw (no encoding) .IP "\fBrle\fR" 4 .IX Item "rle" run-length coder .IP "\fBdeflate\fR" 4 .IX Item "deflate" deflate-based coder .RE .RS 4 .RE .IP "\fB\-context[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-context[:stream_specifier] integer (output,video)" context model .IP "\fB\-mbd[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mbd[:stream_specifier] integer (output,video)" macroblock decision algorithm (high quality mode) .Sp Possible values: .RS 4 .IP "\fBsimple\fR" 4 .IX Item "simple" use mbcmp (default) .IP "\fBbits\fR" 4 .IX Item "bits" use fewest bits .IP "\fBrd\fR" 4 .IX Item "rd" use best rate distortion .RE .RS 4 .RE .IP "\fB\-sc_threshold[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-sc_threshold[:stream_specifier] integer (output,video)" scene change threshold .IP "\fB\-lmin[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-lmin[:stream_specifier] integer (output,video)" minimum Lagrange factor (\s-1VBR\s0) .IP "\fB\-lmax[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-lmax[:stream_specifier] integer (output,video)" maximum Lagrange factor (\s-1VBR\s0) .IP "\fB\-nr[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-nr[:stream_specifier] integer (output,video)" noise reduction .IP "\fB\-rc_init_occupancy[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_init_occupancy[:stream_specifier] integer (output,video)" number of bits which should be loaded into the rc buffer before decoding starts .IP "\fB\-flags2[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput/output,audio,video\fR\fB)\fR" 4 .IX Item "-flags2[:stream_specifier] flags (input/output,audio,video)" Possible values: .RS 4 .IP "\fBfast\fR" 4 .IX Item "fast" allow non-spec-compliant speedup tricks .IP "\fBnoout\fR" 4 .IX Item "noout" skip bitstream encoding .IP "\fBignorecrop\fR" 4 .IX Item "ignorecrop" ignore cropping information from sps .IP "\fBlocal_header\fR" 4 .IX Item "local_header" place global headers at every keyframe instead of in extradata .RE .RS 4 .RE .IP "\fB\-error[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-error[:stream_specifier] integer (output,video)" .PD 0 .IP "\fB\-threads[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-threads[:stream_specifier] integer (input/output,video)" .PD Possible values: .RS 4 .IP "\fBauto\fR" 4 .IX Item "auto" autodetect a suitable number of threads to use .RE .RS 4 .RE .IP "\fB\-me_threshold[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-me_threshold[:stream_specifier] integer (output,video)" motion estimation threshold .IP "\fB\-mb_threshold[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mb_threshold[:stream_specifier] integer (output,video)" macroblock threshold .IP "\fB\-dc[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-dc[:stream_specifier] integer (output,video)" intra_dc_precision .IP "\fB\-nssew[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-nssew[:stream_specifier] integer (output,video)" nsse weight .IP "\fB\-skip_top[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-skip_top[:stream_specifier] integer (input,video)" number of macroblock rows at the top which are skipped .IP "\fB\-skip_bottom[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-skip_bottom[:stream_specifier] integer (input,video)" number of macroblock rows at the bottom which are skipped .IP "\fB\-profile[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-profile[:stream_specifier] integer (output,audio,video)" Possible values: .RS 4 .IP "\fBunknown\fR" 4 .IX Item "unknown" .PD 0 .IP "\fBaac_main\fR" 4 .IX Item "aac_main" .IP "\fBaac_low\fR" 4 .IX Item "aac_low" .IP "\fBaac_ssr\fR" 4 .IX Item "aac_ssr" .IP "\fBaac_ltp\fR" 4 .IX Item "aac_ltp" .IP "\fBaac_he\fR" 4 .IX Item "aac_he" .IP "\fBaac_he_v2\fR" 4 .IX Item "aac_he_v2" .IP "\fBaac_ld\fR" 4 .IX Item "aac_ld" .IP "\fBaac_eld\fR" 4 .IX Item "aac_eld" .IP "\fBmpeg2_aac_low\fR" 4 .IX Item "mpeg2_aac_low" .IP "\fBmpeg2_aac_he\fR" 4 .IX Item "mpeg2_aac_he" .IP "\fBdts\fR" 4 .IX Item "dts" .IP "\fBdts_es\fR" 4 .IX Item "dts_es" .IP "\fBdts_96_24\fR" 4 .IX Item "dts_96_24" .IP "\fBdts_hd_hra\fR" 4 .IX Item "dts_hd_hra" .IP "\fBdts_hd_ma\fR" 4 .IX Item "dts_hd_ma" .RE .RS 4 .RE .IP "\fB\-level[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-level[:stream_specifier] integer (output,audio,video)" .PD Possible values: .RS 4 .IP "\fBunknown\fR" 4 .IX Item "unknown" .RE .RS 4 .RE .PD 0 .IP "\fB\-skip_threshold[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-skip_threshold[:stream_specifier] integer (output,video)" .PD frame skip threshold .IP "\fB\-skip_factor[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-skip_factor[:stream_specifier] integer (output,video)" frame skip factor .IP "\fB\-skip_exp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-skip_exp[:stream_specifier] integer (output,video)" frame skip exponent .IP "\fB\-skipcmp[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-skipcmp[:stream_specifier] integer (output,video)" frame skip compare function .Sp Possible values: .RS 4 .IP "\fBsad\fR" 4 .IX Item "sad" sum of absolute differences, fast (default) .IP "\fBsse\fR" 4 .IX Item "sse" sum of squared errors .IP "\fBsatd\fR" 4 .IX Item "satd" sum of absolute Hadamard transformed differences .IP "\fBdct\fR" 4 .IX Item "dct" sum of absolute \s-1DCT\s0 transformed differences .IP "\fBpsnr\fR" 4 .IX Item "psnr" sum of squared quantization errors (avoid, low quality) .IP "\fBbit\fR" 4 .IX Item "bit" number of bits needed for the block .IP "\fBrd\fR" 4 .IX Item "rd" rate distortion optimal, slow .IP "\fBzero\fR" 4 .IX Item "zero" 0 .IP "\fBvsad\fR" 4 .IX Item "vsad" sum of absolute vertical differences .IP "\fBvsse\fR" 4 .IX Item "vsse" sum of squared vertical differences .IP "\fBnsse\fR" 4 .IX Item "nsse" noise preserving sum of squared differences .IP "\fBdctmax\fR" 4 .IX Item "dctmax" .PD 0 .IP "\fBchroma\fR" 4 .IX Item "chroma" .RE .RS 4 .RE .IP "\fB\-border_mask[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-border_mask[:stream_specifier] float (output,video)" .PD increase the quantizer for macroblocks close to borders .IP "\fB\-mblmin[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mblmin[:stream_specifier] integer (output,video)" minimum macroblock Lagrange factor (\s-1VBR\s0) .IP "\fB\-mblmax[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mblmax[:stream_specifier] integer (output,video)" maximum macroblock Lagrange factor (\s-1VBR\s0) .IP "\fB\-mepc[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mepc[:stream_specifier] integer (output,video)" motion estimation bitrate penalty compensation (1.0 = 256) .IP "\fB\-skip_loop_filter[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-skip_loop_filter[:stream_specifier] integer (input,video)" Possible values: .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" .PD 0 .IP "\fBdefault\fR" 4 .IX Item "default" .IP "\fBnoref\fR" 4 .IX Item "noref" .IP "\fBbidir\fR" 4 .IX Item "bidir" .IP "\fBnokey\fR" 4 .IX Item "nokey" .IP "\fBall\fR" 4 .IX Item "all" .RE .RS 4 .RE .IP "\fB\-skip_idct[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-skip_idct[:stream_specifier] integer (input,video)" .PD Possible values: .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" .PD 0 .IP "\fBdefault\fR" 4 .IX Item "default" .IP "\fBnoref\fR" 4 .IX Item "noref" .IP "\fBbidir\fR" 4 .IX Item "bidir" .IP "\fBnokey\fR" 4 .IX Item "nokey" .IP "\fBall\fR" 4 .IX Item "all" .RE .RS 4 .RE .IP "\fB\-skip_frame[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,video\fR\fB)\fR" 4 .IX Item "-skip_frame[:stream_specifier] integer (input,video)" .PD Possible values: .RS 4 .IP "\fBnone\fR" 4 .IX Item "none" .PD 0 .IP "\fBdefault\fR" 4 .IX Item "default" .IP "\fBnoref\fR" 4 .IX Item "noref" .IP "\fBbidir\fR" 4 .IX Item "bidir" .IP "\fBnokey\fR" 4 .IX Item "nokey" .IP "\fBall\fR" 4 .IX Item "all" .RE .RS 4 .RE .IP "\fB\-bidir_refine[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-bidir_refine[:stream_specifier] integer (output,video)" .PD refine the two motion vectors used in bidirectional macroblocks .IP "\fB\-brd_scale[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-brd_scale[:stream_specifier] integer (output,video)" downscale frames for dynamic B\-frame decision .IP "\fB\-keyint_min[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-keyint_min[:stream_specifier] integer (output,video)" minimum interval between IDR-frames (x264) .IP "\fB\-refs[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-refs[:stream_specifier] integer (output,video)" reference frames to consider for motion compensation .IP "\fB\-chromaoffset[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-chromaoffset[:stream_specifier] integer (output,video)" chroma \s-1QP\s0 offset from luma .IP "\fB\-trellis[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-trellis[:stream_specifier] integer (output,audio,video)" rate-distortion optimal quantization .IP "\fB\-sc_factor[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-sc_factor[:stream_specifier] integer (output,video)" multiplied by qscale for each frame and added to scene_change_score .IP "\fB\-mv0_threshold[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-mv0_threshold[:stream_specifier] integer (output,video)" .PD 0 .IP "\fB\-b_sensitivity[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-b_sensitivity[:stream_specifier] integer (output,video)" .PD adjust sensitivity of b_frame_strategy 1 .IP "\fB\-compression_level[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-compression_level[:stream_specifier] integer (output,audio,video)" .PD 0 .IP "\fB\-min_prediction_order[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio\fR\fB)\fR" 4 .IX Item "-min_prediction_order[:stream_specifier] integer (output,audio)" .IP "\fB\-max_prediction_order[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio\fR\fB)\fR" 4 .IX Item "-max_prediction_order[:stream_specifier] integer (output,audio)" .IP "\fB\-timecode_frame_start[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-timecode_frame_start[:stream_specifier] integer (output,video)" .PD \&\s-1GOP\s0 timecode frame start number, in non-drop-frame format .IP "\fB\-request_channels[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,audio\fR\fB)\fR" 4 .IX Item "-request_channels[:stream_specifier] integer (input,audio)" set desired number of audio channels .IP "\fB\-channel_layout[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,audio\fR\fB)\fR" 4 .IX Item "-channel_layout[:stream_specifier] integer (input/output,audio)" Possible values: .IP "\fB\-request_channel_layout[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,audio\fR\fB)\fR" 4 .IX Item "-request_channel_layout[:stream_specifier] integer (input,audio)" Possible values: .IP "\fB\-rc_max_vbv_use[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_max_vbv_use[:stream_specifier] float (output,video)" .PD 0 .IP "\fB\-rc_min_vbv_use[:stream_specifier]\fR \fIfloat\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-rc_min_vbv_use[:stream_specifier] float (output,video)" .IP "\fB\-ticks_per_frame[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,audio,video\fR\fB)\fR" 4 .IX Item "-ticks_per_frame[:stream_specifier] integer (input/output,audio,video)" .IP "\fB\-color_primaries[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-color_primaries[:stream_specifier] integer (input/output,video)" .PD color primaries .Sp Possible values: .RS 4 .IP "\fBbt709\fR" 4 .IX Item "bt709" \&\s-1BT.709\s0 .IP "\fBunspecified\fR" 4 .IX Item "unspecified" Unspecified .IP "\fBbt470m\fR" 4 .IX Item "bt470m" \&\s-1BT.470 M\s0 .IP "\fBbt470bg\fR" 4 .IX Item "bt470bg" \&\s-1BT.470 BG\s0 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1SMPTE 170 M\s0 .IP "\fBsmpte240m\fR" 4 .IX Item "smpte240m" \&\s-1SMPTE 240 M\s0 .IP "\fBfilm\fR" 4 .IX Item "film" Film .IP "\fBbt2020\fR" 4 .IX Item "bt2020" \&\s-1BT.2020\s0 .RE .RS 4 .RE .IP "\fB\-color_trc[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-color_trc[:stream_specifier] integer (input/output,video)" color transfert characteristic .Sp Possible values: .RS 4 .IP "\fBbt709\fR" 4 .IX Item "bt709" \&\s-1BT.709\s0 .IP "\fBunspecified\fR" 4 .IX Item "unspecified" Unspecified .IP "\fBgamma22\fR" 4 .IX Item "gamma22" Gamma 2.2 .IP "\fBgamma28\fR" 4 .IX Item "gamma28" Gamma 2.8 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1SMPTE 170 M\s0 .IP "\fBsmpte240m\fR" 4 .IX Item "smpte240m" \&\s-1SMPTE 240 M\s0 .IP "\fBlinear\fR" 4 .IX Item "linear" Linear .IP "\fBlog\fR" 4 .IX Item "log" \&\s-1SMPTE 240 M\s0 .IP "\fBlog_sqrt\fR" 4 .IX Item "log_sqrt" \&\s-1SMPTE 240 M\s0 .IP "\fBiec61966_2_4\fR" 4 .IX Item "iec61966_2_4" \&\s-1SMPTE 240 M\s0 .IP "\fBbt1361\fR" 4 .IX Item "bt1361" \&\s-1BT.1361\s0 .IP "\fBiec61966_2_1\fR" 4 .IX Item "iec61966_2_1" \&\s-1SMPTE 240 M\s0 .IP "\fBbt2020_10bit\fR" 4 .IX Item "bt2020_10bit" \&\s-1BT.2020 \- 10\s0 bit .IP "\fBbt2020_12bit\fR" 4 .IX Item "bt2020_12bit" \&\s-1BT.2020 \- 12\s0 bit .RE .RS 4 .RE .IP "\fB\-colorspace[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-colorspace[:stream_specifier] integer (input/output,video)" colorspace .Sp Possible values: .RS 4 .IP "\fBrgb\fR" 4 .IX Item "rgb" \&\s-1RGB\s0 .IP "\fBbt709\fR" 4 .IX Item "bt709" \&\s-1BT.709\s0 .IP "\fBunspecified\fR" 4 .IX Item "unspecified" Unspecified .IP "\fBfcc\fR" 4 .IX Item "fcc" FourCC .IP "\fBbt470bg\fR" 4 .IX Item "bt470bg" \&\s-1BT.470 BG\s0 .IP "\fBsmpte170m\fR" 4 .IX Item "smpte170m" \&\s-1SMPTE 170 M\s0 .IP "\fBsmpte240m\fR" 4 .IX Item "smpte240m" \&\s-1SMPTE 240 M\s0 .IP "\fBycocg\fR" 4 .IX Item "ycocg" \&\s-1YCOCG\s0 .IP "\fBbt2020_ncl\fR" 4 .IX Item "bt2020_ncl" \&\s-1BT.2020 NCL\s0 .IP "\fBbt2020_cl\fR" 4 .IX Item "bt2020_cl" \&\s-1BT.2020 CL\s0 .RE .RS 4 .RE .IP "\fB\-color_range[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-color_range[:stream_specifier] integer (input/output,video)" color range .Sp Possible values: .RS 4 .IP "\fBunspecified\fR" 4 .IX Item "unspecified" Unspecified .IP "\fBmpeg\fR" 4 .IX Item "mpeg" \&\s-1MPEG \s0(219*2^(n\-8)) .IP "\fBjpeg\fR" 4 .IX Item "jpeg" \&\s-1JPEG \s0(2^n\-1) .RE .RS 4 .RE .IP "\fB\-chroma_sample_location[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-chroma_sample_location[:stream_specifier] integer (input/output,video)" .PD 0 .IP "\fB\-slices[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,video\fR\fB)\fR" 4 .IX Item "-slices[:stream_specifier] integer (output,video)" .PD number of slices, used in parallelized encoding .IP "\fB\-thread_type[:stream_specifier]\fR \fIflags\fR \fB(\fR\fIinput/output,video\fR\fB)\fR" 4 .IX Item "-thread_type[:stream_specifier] flags (input/output,video)" select multithreading type .Sp Possible values: .RS 4 .IP "\fBslice\fR" 4 .IX Item "slice" .PD 0 .IP "\fBframe\fR" 4 .IX Item "frame" .RE .RS 4 .RE .IP "\fB\-audio_service_type[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio\fR\fB)\fR" 4 .IX Item "-audio_service_type[:stream_specifier] integer (output,audio)" .PD audio service type .Sp Possible values: .RS 4 .IP "\fBma\fR" 4 .IX Item "ma" Main Audio Service .IP "\fBef\fR" 4 .IX Item "ef" Effects .IP "\fBvi\fR" 4 .IX Item "vi" Visually Impaired .IP "\fBhi\fR" 4 .IX Item "hi" Hearing Impaired .IP "\fBdi\fR" 4 .IX Item "di" Dialogue .IP "\fBco\fR" 4 .IX Item "co" Commentary .IP "\fBem\fR" 4 .IX Item "em" Emergency .IP "\fBvo\fR" 4 .IX Item "vo" Voice Over .IP "\fBka\fR" 4 .IX Item "ka" Karaoke .RE .RS 4 .RE .IP "\fB\-request_sample_fmt[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,audio\fR\fB)\fR" 4 .IX Item "-request_sample_fmt[:stream_specifier] integer (input,audio)" Possible values: .RS 4 .IP "\fBu8\fR" 4 .IX Item "u8" 8\-bit unsigned integer .IP "\fBs16\fR" 4 .IX Item "s16" 16\-bit signed integer .IP "\fBs32\fR" 4 .IX Item "s32" 32\-bit signed integer .IP "\fBflt\fR" 4 .IX Item "flt" 32\-bit float .IP "\fBdbl\fR" 4 .IX Item "dbl" 64\-bit double .IP "\fBu8p\fR" 4 .IX Item "u8p" 8\-bit unsigned integer planar .IP "\fBs16p\fR" 4 .IX Item "s16p" 16\-bit signed integer planar .IP "\fBs32p\fR" 4 .IX Item "s32p" 32\-bit signed integer planar .IP "\fBfltp\fR" 4 .IX Item "fltp" 32\-bit float planar .IP "\fBdblp\fR" 4 .IX Item "dblp" 64\-bit double planar .RE .RS 4 .RE .IP "\fB\-refcounted_frames[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIinput,audio,video\fR\fB)\fR" 4 .IX Item "-refcounted_frames[:stream_specifier] integer (input,audio,video)" .PD 0 .IP "\fB\-side_data_only_packets[:stream_specifier]\fR \fIinteger\fR \fB(\fR\fIoutput,audio,video\fR\fB)\fR" 4 .IX Item "-side_data_only_packets[:stream_specifier] integer (output,audio,video)" .PD .SS "Format AVOptions" .IX Subsection "Format AVOptions" .IP "\fB\-probesize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-probesize integer (input)" set probing size .IP "\fB\-packetsize\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "-packetsize integer (output)" set packet size .IP "\fB\-fflags\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "-fflags flags (input/output)" Possible values: .RS 4 .IP "\fBflush_packets\fR" 4 .IX Item "flush_packets" reduce the latency by flushing out packets immediately .IP "\fBignidx\fR" 4 .IX Item "ignidx" ignore index .IP "\fBgenpts\fR" 4 .IX Item "genpts" generate pts .IP "\fBnofillin\fR" 4 .IX Item "nofillin" do not fill in missing values that can be exactly calculated .IP "\fBnoparse\fR" 4 .IX Item "noparse" disable AVParsers, this needs nofillin too .IP "\fBigndts\fR" 4 .IX Item "igndts" ignore dts .IP "\fBdiscardcorrupt\fR" 4 .IX Item "discardcorrupt" discard corrupted frames .IP "\fBnobuffer\fR" 4 .IX Item "nobuffer" reduce the latency introduced by optional buffering .IP "\fBbitexact\fR" 4 .IX Item "bitexact" do not write random/volatile data .RE .RS 4 .RE .IP "\fB\-analyzeduration\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-analyzeduration integer (input)" how many microseconds are analyzed to estimate duration .IP "\fB\-cryptokey\fR \fIhexadecimal string\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-cryptokey hexadecimal string (input)" decryption key .IP "\fB\-indexmem\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-indexmem integer (input)" max memory used for timestamp index (per stream) .IP "\fB\-rtbufsize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-rtbufsize integer (input)" max memory used for buffering real-time frames .IP "\fB\-fdebug\fR \fIflags\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "-fdebug flags (input/output)" print specific debug info .Sp Possible values: .RS 4 .IP "\fBts\fR" 4 .IX Item "ts" .RE .RS 4 .RE .PD 0 .IP "\fB\-max_delay\fR \fIinteger\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "-max_delay integer (input/output)" .PD maximum muxing or demuxing delay in microseconds .IP "\fB\-fpsprobesize\fR \fIinteger\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-fpsprobesize integer (input)" number of frames used to probe fps .IP "\fB\-f_err_detect\fR \fIflags\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-f_err_detect flags (input)" set error detection flags (deprecated; use err_detect, save via avconv) .Sp Possible values: .RS 4 .IP "\fBcrccheck\fR" 4 .IX Item "crccheck" verify embedded CRCs .IP "\fBbitstream\fR" 4 .IX Item "bitstream" detect bitstream specification deviations .IP "\fBbuffer\fR" 4 .IX Item "buffer" detect improper bitstream length .IP "\fBexplode\fR" 4 .IX Item "explode" abort decoding on minor error detection .RE .RS 4 .RE .IP "\fB\-err_detect\fR \fIflags\fR \fB(\fR\fIinput\fR\fB)\fR" 4 .IX Item "-err_detect flags (input)" set error detection flags .Sp Possible values: .RS 4 .IP "\fBcrccheck\fR" 4 .IX Item "crccheck" verify embedded CRCs .IP "\fBbitstream\fR" 4 .IX Item "bitstream" detect bitstream specification deviations .IP "\fBbuffer\fR" 4 .IX Item "buffer" detect improper bitstream length .IP "\fBexplode\fR" 4 .IX Item "explode" abort decoding on minor error detection .RE .RS 4 .RE .IP "\fB\-max_interleave_delta\fR \fIinteger\fR \fB(\fR\fIoutput\fR\fB)\fR" 4 .IX Item "-max_interleave_delta integer (output)" maximum buffering duration for interleaving .IP "\fB\-f_strict\fR \fIinteger\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "-f_strict integer (input/output)" how strictly to follow the standards (deprecated; use strict, save via avconv) .Sp Possible values: .RS 4 .IP "\fBstrict\fR" 4 .IX Item "strict" strictly conform to all the things in the spec no matter what the consequences .IP "\fBnormal\fR" 4 .IX Item "normal" .PD 0 .IP "\fBexperimental\fR" 4 .IX Item "experimental" .PD allow non-standardized experimental variants .RE .RS 4 .RE .IP "\fB\-strict\fR \fIinteger\fR \fB(\fR\fIinput/output\fR\fB)\fR" 4 .IX Item "-strict integer (input/output)" how strictly to follow the standards .Sp Possible values: .RS 4 .IP "\fBstrict\fR" 4 .IX Item "strict" strictly conform to all the things in the spec no matter what the consequences .IP "\fBnormal\fR" 4 .IX Item "normal" .PD 0 .IP "\fBexperimental\fR" 4 .IX Item "experimental" .PD allow non-standardized experimental variants .RE .RS 4 .RE .SS "Main options" .IX Subsection "Main options" .IP "\fB\-x\fR \fIwidth\fR" 4 .IX Item "-x width" Force displayed width. .IP "\fB\-y\fR \fIheight\fR" 4 .IX Item "-y height" Force displayed height. .IP "\fB\-s\fR \fIsize\fR" 4 .IX Item "-s size" This option has been removed. Use private format options for specifying the input video size. For example with the rawvideo demuxer you need to specify the option \fIvideo_size\fR. .IP "\fB\-an\fR" 4 .IX Item "-an" Disable audio. .IP "\fB\-vn\fR" 4 .IX Item "-vn" Disable video. .IP "\fB\-ss\fR \fIpos\fR" 4 .IX Item "-ss pos" Seek to a given position in seconds. .IP "\fB\-t\fR \fIduration\fR" 4 .IX Item "-t duration" play seconds of audio/video .IP "\fB\-bytes\fR" 4 .IX Item "-bytes" Seek by bytes. .IP "\fB\-nodisp\fR" 4 .IX Item "-nodisp" Disable graphical display. .IP "\fB\-f\fR \fIfmt\fR" 4 .IX Item "-f fmt" Force format. .IP "\fB\-window_title\fR \fItitle\fR" 4 .IX Item "-window_title title" Set window title (default is the input filename). .IP "\fB\-loop\fR \fInumber\fR" 4 .IX Item "-loop number" Loops movie playback times. 0 means forever. .IP "\fB\-vf\fR \fIfilter_graph\fR" 4 .IX Item "-vf filter_graph" \&\fIfilter_graph\fR is a description of the filter graph to apply to the input video. Use the option \*(L"\-filters\*(R" to show all the available filters (including also sources and sinks). .SS "Advanced options" .IX Subsection "Advanced options" .IP "\fB\-pix_fmt\fR \fIformat\fR" 4 .IX Item "-pix_fmt format" This option has been removed. Use private options for specifying the input pixel format. For example with the rawvideo demuxer you need to specify the option \fIpixel_format\fR. .IP "\fB\-stats\fR" 4 .IX Item "-stats" Show the stream duration, the codec parameters, the current position in the stream and the audio/video synchronisation drift. .IP "\fB\-bug\fR" 4 .IX Item "-bug" Work around bugs. .IP "\fB\-fast\fR" 4 .IX Item "-fast" Non-spec-compliant optimizations. .IP "\fB\-genpts\fR" 4 .IX Item "-genpts" Generate pts. .IP "\fB\-rtp_tcp\fR" 4 .IX Item "-rtp_tcp" Force \s-1RTP/TCP\s0 protocol usage instead of \s-1RTP/UDP.\s0 It is only meaningful if you are streaming with the \s-1RTSP\s0 protocol. .IP "\fB\-sync\fR \fItype\fR" 4 .IX Item "-sync type" Set the master clock to audio (\f(CW\*(C`type=audio\*(C'\fR), video (\f(CW\*(C`type=video\*(C'\fR) or external (\f(CW\*(C`type=ext\*(C'\fR). Default is audio. The master clock is used to control audio-video synchronization. Most media players use audio as master clock, but in some cases (streaming or high quality broadcast) it is necessary to change that. This option is mainly used for debugging purposes. .IP "\fB\-threads\fR \fIcount\fR" 4 .IX Item "-threads count" Set the thread count. .IP "\fB\-ast\fR \fIaudio_stream_number\fR" 4 .IX Item "-ast audio_stream_number" Select the desired audio stream number, counting from 0. The number refers to the list of all the input audio streams. If it is greater than the number of audio streams minus one, then the last one is selected, if it is negative the audio playback is disabled. .IP "\fB\-vst\fR \fIvideo_stream_number\fR" 4 .IX Item "-vst video_stream_number" Select the desired video stream number, counting from 0. The number refers to the list of all the input video streams. If it is greater than the number of video streams minus one, then the last one is selected, if it is negative the video playback is disabled. .IP "\fB\-sst\fR \fIsubtitle_stream_number\fR" 4 .IX Item "-sst subtitle_stream_number" Select the desired subtitle stream number, counting from 0. The number refers to the list of all the input subtitle streams. If it is greater than the number of subtitle streams minus one, then the last one is selected, if it is negative the subtitle rendering is disabled. .IP "\fB\-autoexit\fR" 4 .IX Item "-autoexit" Exit when video is done playing. .IP "\fB\-exitonkeydown\fR" 4 .IX Item "-exitonkeydown" Exit if any key is pressed. .IP "\fB\-exitonmousedown\fR" 4 .IX Item "-exitonmousedown" Exit if any mouse button is pressed. .SS "While playing" .IX Subsection "While playing" .IP "\fBq, \s-1ESC\s0\fR" 4 .IX Item "q, ESC" Quit. .IP "\fBf\fR" 4 .IX Item "f" Toggle full screen. .IP "\fBp, \s-1SPC\s0\fR" 4 .IX Item "p, SPC" Pause. .IP "\fBa\fR" 4 .IX Item "a" Cycle audio channel. .IP "\fBv\fR" 4 .IX Item "v" Cycle video channel. .IP "\fBt\fR" 4 .IX Item "t" Cycle subtitle channel. .IP "\fBw\fR" 4 .IX Item "w" Show audio waves. .IP "\fBleft/right\fR" 4 .IX Item "left/right" Seek backward/forward 10 seconds. .IP "\fBdown/up\fR" 4 .IX Item "down/up" Seek backward/forward 1 minute. .IP "\fB\s-1PGDOWN/PGUP\s0\fR" 4 .IX Item "PGDOWN/PGUP" Seek to the previous/next chapter. .IP "\fBmouse click\fR" 4 .IX Item "mouse click" Seek to percentage in file corresponding to fraction of width. .PP When evaluating an arithmetic expression, Libav uses an internal formula evaluator, implemented through the \fIlibavutil/eval.h\fR interface. .PP An expression may contain unary, binary operators, constants, and functions. .PP Two expressions \fIexpr1\fR and \fIexpr2\fR can be combined to form another expression "\fIexpr1\fR;\fIexpr2\fR". \&\fIexpr1\fR and \fIexpr2\fR are evaluated in turn, and the new expression evaluates to the value of \fIexpr2\fR. .PP The following binary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR, \&\f(CW\*(C`*\*(C'\fR, \f(CW\*(C`/\*(C'\fR, \f(CW\*(C`^\*(C'\fR. .PP The following unary operators are available: \f(CW\*(C`+\*(C'\fR, \f(CW\*(C`\-\*(C'\fR. .PP The following functions are available: .IP "\fBsinh(x)\fR" 4 .IX Item "sinh(x)" .PD 0 .IP "\fBcosh(x)\fR" 4 .IX Item "cosh(x)" .IP "\fBtanh(x)\fR" 4 .IX Item "tanh(x)" .IP "\fBsin(x)\fR" 4 .IX Item "sin(x)" .IP "\fBcos(x)\fR" 4 .IX Item "cos(x)" .IP "\fBtan(x)\fR" 4 .IX Item "tan(x)" .IP "\fBatan(x)\fR" 4 .IX Item "atan(x)" .IP "\fBasin(x)\fR" 4 .IX Item "asin(x)" .IP "\fBacos(x)\fR" 4 .IX Item "acos(x)" .IP "\fBexp(x)\fR" 4 .IX Item "exp(x)" .IP "\fBlog(x)\fR" 4 .IX Item "log(x)" .IP "\fBabs(x)\fR" 4 .IX Item "abs(x)" .IP "\fBsquish(x)\fR" 4 .IX Item "squish(x)" .IP "\fBgauss(x)\fR" 4 .IX Item "gauss(x)" .IP "\fBisinf(x)\fR" 4 .IX Item "isinf(x)" .PD Return 1.0 if \fIx\fR is +/\-INFINITY, 0.0 otherwise. .IP "\fBisnan(x)\fR" 4 .IX Item "isnan(x)" Return 1.0 if \fIx\fR is \s-1NAN, 0.0\s0 otherwise. .IP "\fBmod(x, y)\fR" 4 .IX Item "mod(x, y)" .PD 0 .IP "\fBmax(x, y)\fR" 4 .IX Item "max(x, y)" .IP "\fBmin(x, y)\fR" 4 .IX Item "min(x, y)" .IP "\fBeq(x, y)\fR" 4 .IX Item "eq(x, y)" .IP "\fBgte(x, y)\fR" 4 .IX Item "gte(x, y)" .IP "\fBgt(x, y)\fR" 4 .IX Item "gt(x, y)" .IP "\fBlte(x, y)\fR" 4 .IX Item "lte(x, y)" .IP "\fBlt(x, y)\fR" 4 .IX Item "lt(x, y)" .IP "\fBst(var, expr)\fR" 4 .IX Item "st(var, expr)" .PD Allow to store the value of the expression \fIexpr\fR in an internal variable. \fIvar\fR specifies the number of the variable where to store the value, and it is a value ranging from 0 to 9. The function returns the value stored in the internal variable. .IP "\fBld(var)\fR" 4 .IX Item "ld(var)" Allow to load the value of the internal variable with number \&\fIvar\fR, which was previously stored with st(\fIvar\fR, \fIexpr\fR). The function returns the loaded value. .IP "\fBwhile(cond, expr)\fR" 4 .IX Item "while(cond, expr)" Evaluate expression \fIexpr\fR while the expression \fIcond\fR is non-zero, and returns the value of the last \fIexpr\fR evaluation, or \&\s-1NAN\s0 if \fIcond\fR was always false. .IP "\fBceil(expr)\fR" 4 .IX Item "ceil(expr)" Round the value of expression \fIexpr\fR upwards to the nearest integer. For example, \*(L"ceil(1.5)\*(R" is \*(L"2.0\*(R". .IP "\fBfloor(expr)\fR" 4 .IX Item "floor(expr)" Round the value of expression \fIexpr\fR downwards to the nearest integer. For example, \*(L"floor(\-1.5)\*(R" is \*(L"\-2.0\*(R". .IP "\fBtrunc(expr)\fR" 4 .IX Item "trunc(expr)" Round the value of expression \fIexpr\fR towards zero to the nearest integer. For example, \*(L"trunc(\-1.5)\*(R" is \*(L"\-1.0\*(R". .IP "\fBsqrt(expr)\fR" 4 .IX Item "sqrt(expr)" Compute the square root of \fIexpr\fR. This is equivalent to "(\fIexpr\fR)^.5". .IP "\fBnot(expr)\fR" 4 .IX Item "not(expr)" Return 1.0 if \fIexpr\fR is zero, 0.0 otherwise. .PP Note that: .PP \&\f(CW\*(C`*\*(C'\fR works like \s-1AND\s0 .PP \&\f(CW\*(C`+\*(C'\fR works like \s-1OR\s0 .PP thus .PP .Vb 1 \& if A then B else C .Ve .PP is equivalent to .PP .Vb 1 \& A*B + not(A)*C .Ve .PP In your C code, you can extend the list of unary and binary functions, and define recognized constants, so that they are available for your expressions. .PP The evaluator also recognizes the International System number postfixes. 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 Follows the list of available International System postfixes, with indication of the corresponding powers of 10 and of 2. .IP "\fBy\fR" 4 .IX Item "y" \&\-24 / \-80 .IP "\fBz\fR" 4 .IX Item "z" \&\-21 / \-70 .IP "\fBa\fR" 4 .IX Item "a" \&\-18 / \-60 .IP "\fBf\fR" 4 .IX Item "f" \&\-15 / \-50 .IP "\fBp\fR" 4 .IX Item "p" \&\-12 / \-40 .IP "\fBn\fR" 4 .IX Item "n" \&\-9 / \-30 .IP "\fBu\fR" 4 .IX Item "u" \&\-6 / \-20 .IP "\fBm\fR" 4 .IX Item "m" \&\-3 / \-10 .IP "\fBc\fR" 4 .IX Item "c" \&\-2 .IP "\fBd\fR" 4 .IX Item "d" \&\-1 .IP "\fBh\fR" 4 .IX Item "h" 2 .IP "\fBk\fR" 4 .IX Item "k" 3 / 10 .IP "\fBK\fR" 4 .IX Item "K" 3 / 10 .IP "\fBM\fR" 4 .IX Item "M" 6 / 20 .IP "\fBG\fR" 4 .IX Item "G" 9 / 30 .IP "\fBT\fR" 4 .IX Item "T" 12 / 40 .IP "\fBP\fR" 4 .IX Item "P" 15 / 40 .IP "\fBE\fR" 4 .IX Item "E" 18 / 50 .IP "\fBZ\fR" 4 .IX Item "Z" 21 / 60 .IP "\fBY\fR" 4 .IX Item "Y" 24 / 70 .PP Decoders are configured elements in Libav which allow the decoding of multimedia streams. .PP When you configure your Libav build, all the supported native decoders are enabled by default. Decoders requiring an external library must be enabled manually via the corresponding \f(CW\*(C`\-\-enable\-lib\*(C'\fR option. You can list all available decoders using the configure option \f(CW\*(C`\-\-list\-decoders\*(C'\fR. .PP You can disable all the decoders with the configure option \&\f(CW\*(C`\-\-disable\-decoders\*(C'\fR and selectively enable / disable single decoders with the options \f(CW\*(C`\-\-enable\-decoder=\f(CIDECODER\f(CW\*(C'\fR / \&\f(CW\*(C`\-\-disable\-decoder=\f(CIDECODER\f(CW\*(C'\fR. .PP The option \f(CW\*(C`\-decoders\*(C'\fR of the av* tools will display the list of enabled decoders. .PP A description of some of the currently available audio decoders follows. .SS "ac3" .IX Subsection "ac3" \&\s-1AC\-3\s0 audio decoder. .PP This decoder implements part of \s-1ATSC A/52:2010\s0 and \s-1ETSI TS 102 366,\s0 as well as the undocumented RealAudio 3 (a.k.a. dnet). .PP \s-1AC\-3\s0 Decoder Options .IX Subsection "AC-3 Decoder Options" .IP "\fB\-drc_scale\fR \fIvalue\fR" 4 .IX Item "-drc_scale value" Dynamic Range Scale Factor. The factor to apply to dynamic range values from the \s-1AC\-3\s0 stream. This factor is applied exponentially. There are 3 notable scale factor ranges: .RS 4 .IP "\fBdrc_scale == 0\fR" 4 .IX Item "drc_scale == 0" \&\s-1DRC\s0 disabled. Produces full range audio. .IP "\fB0 < drc_scale <= 1\fR" 4 .IX Item "0 < drc_scale <= 1" \&\s-1DRC\s0 enabled. Applies a fraction of the stream \s-1DRC\s0 value. Audio reproduction is between full range and full compression. .IP "\fBdrc_scale > 1\fR" 4 .IX Item "drc_scale > 1" \&\s-1DRC\s0 enabled. Applies drc_scale asymmetrically. Loud sounds are fully compressed. Soft sounds are enhanced. .RE .RS 4 .RE .PP 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 .IP "\fB\-pixel_format\fR \fIformat\fR" 4 .IX Item "-pixel_format format" Set the pixel format (for raw image) .IP "\fB\-video_size\fR \fIsize\fR" 4 .IX Item "-video_size size" Set the frame size (for raw image) .IP "\fB\-framerate\fR \fIrate\fR" 4 .IX Item "-framerate rate" Set the frame rate .IP "\fB\-loop\fR \fIbool\fR" 4 .IX Item "-loop bool" Loop over the images .IP "\fB\-start_number\fR \fIstart\fR" 4 .IX Item "-start_number start" Specify the first number in the sequence .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". .SS "flv" .IX Subsection "flv" Adobe Flash Video Format demuxer. .PP This demuxer is used to demux \s-1FLV\s0 files and \s-1RTMP\s0 network streams. .IP "\fB\-flv_metadata\fR \fIbool\fR" 4 .IX Item "-flv_metadata bool" Allocate the streams according to the onMetaData array content. .SS "asf" .IX Subsection "asf" Advanced Systems Format demuxer. .PP This demuxer is used to demux \s-1ASF\s0 files and \s-1MMS\s0 network streams. .IP "\fB\-no_resync_search\fR \fIbool\fR" 4 .IX Item "-no_resync_search bool" Do not try to resynchronize by looking for a certain optional start code. .PP 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 "hls" .IX Subsection "hls" Apple \s-1HTTP\s0 Live Streaming muxer that segments MPEG-TS according to the \s-1HTTP\s0 Live Streaming specification. .PP It creates a playlist file and numbered segment files. The output filename specifies the playlist filename; the segment filenames receive the same basename as the playlist, a sequential number and a .ts extension. .PP .Vb 1 \& avconv \-i in.nut out.m3u8 .Ve .IP "\fB\-hls_time\fR \fIseconds\fR" 4 .IX Item "-hls_time seconds" Set the segment length in seconds. .IP "\fB\-hls_list_size\fR \fIsize\fR" 4 .IX Item "-hls_list_size size" Set the maximum number of playlist entries. .IP "\fB\-hls_wrap\fR \fIwrap\fR" 4 .IX Item "-hls_wrap wrap" Set the number after which index wraps. .IP "\fB\-start_number\fR \fInumber\fR" 4 .IX Item "-start_number number" Start the sequence from \fInumber\fR. .IP "\fB\-hls_base_url\fR \fIbaseurl\fR" 4 .IX Item "-hls_base_url baseurl" Append \fIbaseurl\fR to every entry in the playlist. Useful to generate playlists with absolute paths. .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 .IP "\fB\-start_number\fR \fInumber\fR" 4 .IX Item "-start_number number" Start the sequence from \fInumber\fR. .IP "\fB\-update\fR \fInumber\fR" 4 .IX Item "-update number" If \fInumber\fR is nonzero, the filename will always be interpreted as just a filename, not a pattern, and this file will be continuously overwritten with new images. .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 .PP This muxer supports the following options: .IP "\fBreserve_index_space\fR" 4 .IX Item "reserve_index_space" By default, this muxer writes the index for seeking (called cues in Matroska terms) at the end of the file, because it cannot know in advance how much space to leave for the index at the beginning of the file. However for some use cases \&\*(-- e.g. streaming where seeking is possible but slow \*(-- it is useful to put the index at the beginning of the file. .Sp If this option is set to a non-zero value, the muxer will reserve a given amount of space in the file header and then try to write the cues there when the muxing finishes. If the available space does not suffice, muxing will fail. A safe size for most use cases should be about 50kB per hour of video. .Sp Note that cues are only written if the output is seekable and this option will have no effect if it is not. .SS "mov, mp4, ismv" .IX Subsection "mov, mp4, ismv" The mov/mp4/ismv muxer supports fragmentation. Normally, a \s-1MOV/MP4\s0 file has all the metadata about all packets stored in one location (written at the end of the file, it can be moved to the start for better playback using the \fBqt-faststart\fR tool). A fragmented file consists of a number of fragments, where packets and metadata about these packets are stored together. Writing a fragmented file has the advantage that the file is decodable even if the writing is interrupted (while a normal \s-1MOV/MP4\s0 is undecodable if it is not properly finished), and it requires less memory when writing very long files (since writing normal \s-1MOV/MP4\s0 files stores info about every single packet in memory until the file is closed). The downside is that it is less compatible with other applications. .PP Fragmentation is enabled by setting one of the AVOptions that define how to cut the file into fragments: .IP "\fB\-movflags frag_keyframe\fR" 4 .IX Item "-movflags frag_keyframe" Start a new fragment at each video keyframe. .IP "\fB\-frag_duration\fR \fIduration\fR" 4 .IX Item "-frag_duration duration" Create fragments that are \fIduration\fR microseconds long. .IP "\fB\-frag_size\fR \fIsize\fR" 4 .IX Item "-frag_size size" Create fragments that contain up to \fIsize\fR bytes of payload data. .IP "\fB\-movflags frag_custom\fR" 4 .IX Item "-movflags frag_custom" Allow the caller to manually choose when to cut fragments, by calling \f(CW\*(C`av_write_frame(ctx, NULL)\*(C'\fR to write a fragment with the packets written so far. (This is only useful with other applications integrating libavformat, not from \fBavconv\fR.) .IP "\fB\-min_frag_duration\fR \fIduration\fR" 4 .IX Item "-min_frag_duration duration" Don't create fragments that are shorter than \fIduration\fR microseconds long. .PP If more than one condition is specified, fragments are cut when one of the specified conditions is fulfilled. The exception to this is \&\f(CW\*(C`\-min_frag_duration\*(C'\fR, which has to be fulfilled for any of the other conditions to apply. .PP Additionally, the way the output file is written can be adjusted through a few other options: .IP "\fB\-movflags empty_moov\fR" 4 .IX Item "-movflags empty_moov" Write an initial moov atom directly at the start of the file, without describing any samples in it. Generally, an mdat/moov pair is written at the start of the file, as a normal \s-1MOV/MP4\s0 file, containing only a short portion of the file. With this option set, there is no initial mdat atom, and the moov atom only describes the tracks but has a zero duration. .Sp Files written with this option set do not work in QuickTime. This option is implicitly set when writing ismv (Smooth Streaming) files. .IP "\fB\-movflags separate_moof\fR" 4 .IX Item "-movflags separate_moof" Write a separate moof (movie fragment) atom for each track. Normally, packets for all tracks are written in a moof atom (which is slightly more efficient), but with this option set, the muxer writes one moof/mdat pair for each track, making it easier to separate tracks. .Sp This option is implicitly set when writing ismv (Smooth Streaming) files. .IP "\fB\-movflags faststart\fR" 4 .IX Item "-movflags faststart" Run a second pass moving the index (moov atom) to the beginning of the file. This operation can take a while, and will not work in various situations such as fragmented output, thus it is not enabled by default. .IP "\fB\-movflags disable_chpl\fR" 4 .IX Item "-movflags disable_chpl" Disable Nero chapter markers (chpl atom). Normally, both Nero chapters and a QuickTime chapter track are written to the file. With this option set, only the QuickTime chapter track will be written. Nero chapters can cause failures when the file is reprocessed with certain tagging programs. .PP Smooth Streaming content can be pushed in real time to a publishing point on \s-1IIS\s0 with this muxer. Example: .PP .Vb 1 \& avconv \-re <> \-movflags isml+frag_keyframe \-f ismv http://server/publishingpoint.isml/Streams(Encoder1) .Ve .SS "mp3" .IX Subsection "mp3" The \s-1MP3\s0 muxer writes a raw \s-1MP3\s0 stream with an ID3v2 header at the beginning and optionally an ID3v1 tag at the end. ID3v2.3 and ID3v2.4 are supported, the \&\f(CW\*(C`id3v2_version\*(C'\fR option controls which one is used. Setting \&\f(CW\*(C`id3v2_version\*(C'\fR to 0 will disable the ID3v2 header completely. The legacy ID3v1 tag is not written by default, but may be enabled with the \&\f(CW\*(C`write_id3v1\*(C'\fR option. .PP The muxer may also write a Xing frame at the beginning, which contains the number of frames in the file. It is useful for computing duration of \s-1VBR\s0 files. The Xing frame is written if the output stream is seekable and if the \&\f(CW\*(C`write_xing\*(C'\fR option is set to 1 (the default). .PP The muxer supports writing ID3v2 attached pictures (\s-1APIC\s0 frames). The pictures are supplied to the muxer in form of a video stream with a single packet. There can be any number of those streams, each will correspond to a single \s-1APIC\s0 frame. The stream metadata tags \fItitle\fR and \fIcomment\fR map to \s-1APIC \&\s0\fIdescription\fR and \fIpicture type\fR respectively. See <\fBhttp://id3.org/id3v2.4.0\-frames\fR> for allowed picture types. .PP Note that the \s-1APIC\s0 frames must be written at the beginning, so the muxer will buffer the audio frames until it gets all the pictures. It is therefore advised to provide the pictures as soon as possible to avoid excessive buffering. .PP Examples: .PP Write an mp3 with an ID3v2.3 header and an ID3v1 footer: .PP .Vb 1 \& avconv \-i INPUT \-id3v2_version 3 \-write_id3v1 1 out.mp3 .Ve .PP Attach a picture to an mp3: .PP .Vb 2 \& avconv \-i input.mp3 \-i cover.png \-c copy \-metadata:s:v title="Album cover" \& \-metadata:s:v comment="Cover (Front)" out.mp3 .Ve .PP Write a \*(L"clean\*(R" \s-1MP3\s0 without any extra features: .PP .Vb 1 \& avconv \-i input.wav \-write_xing 0 \-id3v2_version 0 out.mp3 .Ve .SS "mpegts" .IX Subsection "mpegts" \&\s-1MPEG\s0 transport stream muxer. .PP This muxer implements \s-1ISO 13818\-1\s0 and part of \s-1ETSI EN 300 468.\s0 .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). .IP "\fB\-muxrate\fR \fInumber\fR" 4 .IX Item "-muxrate number" Set a constant muxrate (default \s-1VBR\s0). .IP "\fB\-pcr_period\fR \fInumer\fR" 4 .IX Item "-pcr_period numer" Override the default \s-1PCR\s0 retransmission time (default 20ms), ignored if variable muxrate is selected. .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 "nut" .IX Subsection "nut" .IP "\fB\-syncpoints\fR \fIflags\fR" 4 .IX Item "-syncpoints flags" Change the syncpoint usage in nut: .RS 4 .IP "\fIdefault\fR \fBuse the normal low-overhead seeking aids.\fR" 4 .IX Item "default use the normal low-overhead seeking aids." .PD 0 .IP "\fInone\fR \fBdo not use the syncpoints at all, reducing the overhead but making the stream non-seekable;\fR" 4 .IX Item "none do not use the syncpoints at all, reducing the overhead but making the stream non-seekable;" .IP "\fItimestamped\fR \fBextend the syncpoint with a wallclock field.\fR" 4 .IX Item "timestamped extend the syncpoint with a wallclock field." .RE .RS 4 .PD .Sp The \fInone\fR and \fItimestamped\fR flags are experimental. .RE .PP .Vb 1 \& avconv \-i INPUT \-f_strict experimental \-syncpoints none \- | processor .Ve .SS "ogg" .IX Subsection "ogg" Ogg container muxer. .IP "\fB\-page_duration\fR \fIduration\fR" 4 .IX Item "-page_duration duration" Preferred page duration, in microseconds. The muxer will attempt to create pages that are approximately \fIduration\fR microseconds long. This allows the user to compromise between seek granularity and container overhead. The default is 1 second. A value of 0 will fill all segments, making pages as large as possible. A value of 1 will effectively use 1 packet-per-page in most situations, giving a small seek granularity at the cost of additional container overhead. .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_type\fR \fItype\fR" 4 .IX Item "segment_list_type type" Select the listing format. .RS 4 .IP "\fIflat\fR \fBuse a simple flat list of entries.\fR" 4 .IX Item "flat use a simple flat list of entries." .PD 0 .IP "\fIhls\fR \fBuse a m3u8\-like structure.\fR" 4 .IX Item "hls use a m3u8-like structure." .RE .RS 4 .RE .IP "\fBsegment_list_size\fR \fIsize\fR" 4 .IX Item "segment_list_size size" .PD Overwrite the listfile once it reaches \fIsize\fR entries. .IP "\fBsegment_list_entry_prefix\fR \fIprefix\fR" 4 .IX Item "segment_list_entry_prefix prefix" Prepend \fIprefix\fR to each entry. Useful to generate absolute paths. .IP "\fBsegment_wrap\fR \fIlimit\fR" 4 .IX Item "segment_wrap limit" Wrap around segment index once it reaches \fIlimit\fR. .PP .Vb 1 \& avconv \-i in.mkv \-c copy \-map 0 \-f segment \-list out.list out%03d.nut .Ve .PP 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 1394\s0 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 "video4linux2" .IX Subsection "video4linux2" Video4Linux2 input video device. .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 framerates. You can check which are supported using \fB\-list_formats all\fR for Video4Linux2 devices. .PP Some usage examples of the video4linux2 devices with avconv and avplay: .PP .Vb 2 \& # Grab and show the input of a video4linux2 device. \& avplay \-f video4linux2 \-framerate 30 \-video_size hd720 /dev/video0 \& \& # Grab and record the input of a video4linux2 device, leave the \& framerate and size as previously set. \& avconv \-f video4linux2 \-input_format mjpeg \-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 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 \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 .PP Output devices are configured elements in Libav which allow to write multimedia data to an output device attached to your system. .PP When you configure your Libav 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 av* tools will display the list of enabled output devices (amongst the muxers). .PP A description of the currently available output devices follows. .SS "alsa" .IX Subsection "alsa" \&\s-1ALSA \s0(Advanced Linux Sound Architecture) output device. .SS "oss" .IX Subsection "oss" \&\s-1OSS \s0(Open Sound System) output device. .SS "sndio" .IX Subsection "sndio" sndio audio output device. .PP 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 "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 \fBavplay\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 "hls" .IX Subsection "hls" 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. The nested protocol is declared by specifying "+\fIproto\fR" after the hls \s-1URI\s0 scheme name, where \fIproto\fR is either \*(L"file\*(R" or \*(L"http\*(R". .PP .Vb 2 \& hls+http://host/path/to/remote/resource.m3u8 \& hls+file://path/to/local/resource.m3u8 .Ve .PP Using this protocol is discouraged \- the hls demuxer should work just as well (if not, please report the issues) and is more complete. To use the hls demuxer instead, simply use the direct URLs to the m3u8 files. .SS "http" .IX Subsection "http" \&\s-1HTTP \s0(Hyper Text Transfer Protocol). .PP This protocol accepts the following options: .IP "\fBchunked_post\fR" 4 .IX Item "chunked_post" If set to 1 use chunked Transfer-Encoding for posts, default is 1. .IP "\fBcontent_type\fR" 4 .IX Item "content_type" Set a specific content type for the \s-1POST\s0 messages. .IP "\fBheaders\fR" 4 .IX Item "headers" Set custom \s-1HTTP\s0 headers, can override built in default headers. The value must be a string encoding the headers. .IP "\fBmultiple_requests\fR" 4 .IX Item "multiple_requests" Use persistent connections if set to 1, default is 0. .IP "\fBpost_data\fR" 4 .IX Item "post_data" Set custom \s-1HTTP\s0 post data. .IP "\fBuser_agent\fR" 4 .IX Item "user_agent" Override the User-Agent header. If not specified a string of the form \&\*(L"Lavf/\*(R" will be used. .IP "\fBmime_type\fR" 4 .IX Item "mime_type" Export the \s-1MIME\s0 type. .IP "\fBicy\fR" 4 .IX Item "icy" If set to 1 request \s-1ICY \s0(SHOUTcast) metadata from the server. If the server supports this, the metadata has to be retrieved by the application by reading the \fBicy_metadata_headers\fR and \fBicy_metadata_packet\fR options. The default is 1. .IP "\fBicy_metadata_headers\fR" 4 .IX Item "icy_metadata_headers" If the server supports \s-1ICY\s0 metadata, this contains the ICY-specific \s-1HTTP\s0 reply headers, separated by newline characters. .IP "\fBicy_metadata_packet\fR" 4 .IX Item "icy_metadata_packet" If the server supports \s-1ICY\s0 metadata, and \fBicy\fR was set to 1, this contains the last non-empty metadata packet sent by the server. It should be polled in regular intervals by applications interested in mid-stream metadata updates. .IP "\fBoffset\fR" 4 .IX Item "offset" Set initial byte offset. .IP "\fBend_offset\fR" 4 .IX Item "end_offset" Try to limit the request to bytes preceding this offset. .SS "Icecast" .IX Subsection "Icecast" Icecast (stream to Icecast servers) .PP This protocol accepts the following options: .IP "\fBice_genre\fR" 4 .IX Item "ice_genre" Set the stream genre. .IP "\fBice_name\fR" 4 .IX Item "ice_name" Set the stream name. .IP "\fBice_description\fR" 4 .IX Item "ice_description" Set the stream description. .IP "\fBice_url\fR" 4 .IX Item "ice_url" Set the stream website \s-1URL.\s0 .IP "\fBice_public\fR" 4 .IX Item "ice_public" Set if the stream should be public or not. The default is 0 (not public). .IP "\fBuser_agent\fR" 4 .IX Item "user_agent" Override the User-Agent header. If not specified a string of the form \&\*(L"Lavf/\*(R" will be used. .IP "\fBpassword\fR" 4 .IX Item "password" Set the Icecast mountpoint password. .IP "\fBcontent_type\fR" 4 .IX Item "content_type" Set the stream content type. This must be set if it is different from audio/mpeg. .IP "\fBlegacy_icecast\fR" 4 .IX Item "legacy_icecast" This enables support for Icecast versions < 2.4.0, that do not support the \&\s-1HTTP PUT\s0 method but the \s-1SOURCE\s0 method. .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 "\fBusername\fR" 4 .IX Item "username" An optional username (mostly for publishing). .IP "\fBpassword\fR" 4 .IX Item "password" An optional password (mostly for publishing). .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.). You can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_app\*(C'\fR option, too. .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". You can override the value parsed from the \s-1URI\s0 through the \f(CW\*(C`rtmp_playpath\*(C'\fR option, too. .IP "\fBlisten\fR" 4 .IX Item "listen" Act as a server, listening for an incoming connection. .IP "\fBtimeout\fR" 4 .IX Item "timeout" Maximum time to wait for the incoming connection. Implies listen. .PP Additionally, the following parameters can be set via command line options (or in code via \f(CW\*(C`AVOption\*(C'\fRs): .IP "\fBrtmp_app\fR" 4 .IX Item "rtmp_app" Name of application to connect on the \s-1RTMP\s0 server. This option overrides the parameter specified in the \s-1URI.\s0 .IP "\fBrtmp_buffer\fR" 4 .IX Item "rtmp_buffer" Set the client buffer time in milliseconds. The default is 3000. .IP "\fBrtmp_conn\fR" 4 .IX Item "rtmp_conn" Extra arbitrary \s-1AMF\s0 connection parameters, parsed from a string, e.g. like \f(CW\*(C`B:1 S:authMe O:1 NN:code:1.23 NS:flag:ok O:0\*(C'\fR. Each value is prefixed by a single character denoting the type, B for Boolean, N for number, S for string, O for object, or Z for null, followed by a colon. For Booleans the data must be either 0 or 1 for \&\s-1FALSE\s0 or \s-1TRUE,\s0 respectively. Likewise for Objects the data must be 0 or 1 to end or begin an object, respectively. Data items in subobjects may be named, by prefixing the type with 'N' and specifying the name before the value (i.e. \f(CW\*(C`NB:myFlag:1\*(C'\fR). This option may be used multiple times to construct arbitrary \s-1AMF\s0 sequences. .IP "\fBrtmp_flashver\fR" 4 .IX Item "rtmp_flashver" Version of the Flash plugin used to run the \s-1SWF\s0 player. The default is \s-1LNX 9,0,124,2. \s0(When publishing, the default is \s-1FMLE/3.0 \s0(compatible; ).) .IP "\fBrtmp_flush_interval\fR" 4 .IX Item "rtmp_flush_interval" Number of packets flushed in the same request (\s-1RTMPT\s0 only). The default is 10. .IP "\fBrtmp_live\fR" 4 .IX Item "rtmp_live" Specify that the media is a live stream. No resuming or seeking in live streams is possible. The default value is \f(CW\*(C`any\*(C'\fR, which means the subscriber first tries to play the live stream specified in the playpath. If a live stream of that name is not found, it plays the recorded stream. The other possible values are \f(CW\*(C`live\*(C'\fR and \&\f(CW\*(C`recorded\*(C'\fR. .IP "\fBrtmp_pageurl\fR" 4 .IX Item "rtmp_pageurl" \&\s-1URL\s0 of the web page in which the media was embedded. By default no value will be sent. .IP "\fBrtmp_playpath\fR" 4 .IX Item "rtmp_playpath" Stream identifier to play or to publish. This option overrides the parameter specified in the \s-1URI.\s0 .IP "\fBrtmp_subscribe\fR" 4 .IX Item "rtmp_subscribe" Name of live stream to subscribe to. By default no value will be sent. It is only sent if the option is specified or if rtmp_live is set to live. .IP "\fBrtmp_swfhash\fR" 4 .IX Item "rtmp_swfhash" \&\s-1SHA256\s0 hash of the decompressed \s-1SWF\s0 file (32 bytes). .IP "\fBrtmp_swfsize\fR" 4 .IX Item "rtmp_swfsize" Size of the decompressed \s-1SWF\s0 file, required for SWFVerification. .IP "\fBrtmp_swfurl\fR" 4 .IX Item "rtmp_swfurl" \&\s-1URL\s0 of the \s-1SWF\s0 player for the media. By default no value will be sent. .IP "\fBrtmp_swfverify\fR" 4 .IX Item "rtmp_swfverify" \&\s-1URL\s0 to player swf file, compute hash/size automatically. .IP "\fBrtmp_tcurl\fR" 4 .IX Item "rtmp_tcurl" \&\s-1URL\s0 of the target stream. Defaults to proto://host[:port]/app. .PP For example to read with \fBavplay\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 .PP To publish to a password protected server, passing the playpath and app names separately: .PP .Vb 1 \& avconv \-re \-i \-f flv \-rtmp_playpath some/long/path \-rtmp_app long/app/name rtmp://username:password@myserver/ .Ve .SS "rtmpe" .IX Subsection "rtmpe" Encrypted Real-Time Messaging Protocol. .PP The Encrypted Real-Time Messaging Protocol (\s-1RTMPE\s0) is used for streaming multimedia content within standard cryptographic primitives, consisting of Diffie-Hellman key exchange and \s-1HMACSHA256,\s0 generating a pair of \s-1RC4\s0 keys. .SS "rtmps" .IX Subsection "rtmps" Real-Time Messaging Protocol over a secure \s-1SSL\s0 connection. .PP The Real-Time Messaging Protocol (\s-1RTMPS\s0) is used for streaming multimedia content across an encrypted connection. .SS "rtmpt" .IX Subsection "rtmpt" Real-Time Messaging Protocol tunneled through \s-1HTTP.\s0 .PP The Real-Time Messaging Protocol tunneled through \s-1HTTP \s0(\s-1RTMPT\s0) is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse firewalls. .SS "rtmpte" .IX Subsection "rtmpte" Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP.\s0 .PP The Encrypted Real-Time Messaging Protocol tunneled through \s-1HTTP \s0(\s-1RTMPTE\s0) is used for streaming multimedia content within \s-1HTTP\s0 requests to traverse firewalls. .SS "rtmpts" .IX Subsection "rtmpts" Real-Time Messaging Protocol tunneled through \s-1HTTPS.\s0 .PP The Real-Time Messaging Protocol tunneled through \s-1HTTPS \s0(\s-1RTMPTS\s0) is used for streaming multimedia content within \s-1HTTPS\s0 requests to traverse firewalls. .SS "librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte" .IX Subsection "librtmp 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, RTMP\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, RTMPTS\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 \fBavplay\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 ANNOUNCE\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/\fBavplay\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. .IP "\fBlisten\fR" 4 .IX Item "listen" Act as a server, listening for an incoming connection. .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). This can be disabled by setting the maximum demuxing delay to zero (via the \f(CW\*(C`max_delay\*(C'\fR field of AVFormatContext). .PP When watching multi-bitrate Real-RTSP streams with \fBavplay\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 .PP To receive a stream in realtime: .PP .Vb 1 \& avconv \-rtsp_flags listen \-i rtsp://ownaddress/live.sdp .Ve .SS "sap" .IX Subsection "sap" Session Announcement Protocol (\s-1RFC 2974\s0). 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 "tls" .IX Subsection "tls" Transport Layer Security (\s-1TLS\s0) / Secure Sockets Layer (\s-1SSL\s0) .PP The required syntax for a \s-1TLS\s0 url is: .PP .Vb 1 \& tls://: .Ve .PP The following parameters can be set via command line options (or in code via \f(CW\*(C`AVOption\*(C'\fRs): .IP "\fBca_file\fR" 4 .IX Item "ca_file" A file containing certificate authority (\s-1CA\s0) root certificates to treat as trusted. If the linked \s-1TLS\s0 library contains a default this might not need to be specified for verification to work, but not all libraries and setups have defaults built in. .IP "\fBtls_verify=\fR\fI1|0\fR" 4 .IX Item "tls_verify=1|0" If enabled, try to verify the peer that we are communicating with. Note, if using OpenSSL, this currently only makes sure that the peer certificate is signed by one of the root certificates in the \s-1CA\s0 database, but it does not validate that the certificate actually matches the host name we are trying to connect to. (With GnuTLS, the host name is validated as well.) .Sp This is disabled by default since it requires a \s-1CA\s0 database to be provided by the caller in many cases. .IP "\fBcert_file\fR" 4 .IX Item "cert_file" A file containing a certificate to use in the handshake with the peer. (When operating as server, in listen mode, this is more often required by the peer, while client certificates only are mandated in certain setups.) .IP "\fBkey_file\fR" 4 .IX Item "key_file" A file containing the private key for the certificate. .IP "\fBlisten=\fR\fI1|0\fR" 4 .IX Item "listen=1|0" If enabled, listen for connections on the provided port, and assume the server role in the handshake instead of the client role. .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 &\-separated 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. .IP "\fBsources=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4 .IX Item "sources=address[,address]" Only receive packets sent to the multicast group from one of the specified sender \s-1IP\s0 addresses. .IP "\fBblock=\fR\fIaddress\fR\fB[,\fR\fIaddress\fR\fB]\fR" 4 .IX Item "block=address[,address]" Ignore packets sent to the multicast group from the specified sender \s-1IP\s0 addresses. .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 .SS "unix" .IX Subsection "unix" Unix local socket .PP The required syntax for a Unix socket \s-1URL\s0 is: .PP .Vb 1 \& unix:// .Ve .PP The following parameters can be set via command line options (or in code via \f(CW\*(C`AVOption\*(C'\fRs): .IP "\fBtimeout\fR" 4 .IX Item "timeout" Timeout in ms. .IP "\fBlisten\fR" 4 .IX Item "listen" Create the Unix socket in listening mode. .PP A filtergraph is a directed graph of connected filters. It can contain cycles, and there can be multiple links between a pair of filters. Each link has one input pad on one side connecting it to one filter from which it takes its input, and one output pad on the other side connecting it to one filter accepting its output. .PP Each filter in a filtergraph is an instance of a filter class registered in the application, which defines the features and the number of input and output pads of the filter. .PP A filter with no input pads is called a \*(L"source\*(R", and a filter with no output pads is called a \*(L"sink\*(R". .SS "Filtergraph syntax" .IX Subsection "Filtergraph syntax" A filtergraph has a textual representation, which is recognized by the \fB\-filter\fR/\fB\-vf\fR and \fB\-filter_complex\fR options in \fBavconv\fR and \fB\-vf\fR in \fBavplay\fR, and by the \&\f(CW\*(C`avfilter_graph_parse()\*(C'\fR/\f(CW\*(C`avfilter_graph_parse2()\*(C'\fR functions defined in \&\fIlibavfilter/avfilter.h\fR. .PP A filterchain consists of a sequence of connected filters, each one connected to the previous one in the sequence. A filterchain is represented by a list of \*(L",\*(R"\-separated filter descriptions. .PP A filtergraph consists of a sequence of filterchains. A sequence of filterchains is represented by a list of \*(L";\*(R"\-separated filterchain descriptions. .PP A filter is represented by a string of the form: [\fIin_link_1\fR]...[\fIin_link_N\fR]\fIfilter_name\fR=\fIarguments\fR[\fIout_link_1\fR]...[\fIout_link_M\fR] .PP \&\fIfilter_name\fR is the name of the filter class of which the described filter is an instance of, and has to be the name of one of the filter classes registered in the program. The name of the filter class is optionally followed by a string "=\fIarguments\fR". .PP \&\fIarguments\fR is a string which contains the parameters used to initialize the filter instance. It may have one of two forms: .IP "\(bu" 4 A ':'\-separated list of \fIkey=value\fR pairs. .IP "\(bu" 4 A ':'\-separated list of \fIvalue\fR. In this case, the keys are assumed to be the option names in the order they are declared. E.g. the \f(CW\*(C`fade\*(C'\fR filter declares three options in this order \*(-- \fBtype\fR, \fBstart_frame\fR and \&\fBnb_frames\fR. Then the parameter list \fIin:0:30\fR means that the value \&\fIin\fR is assigned to the option \fBtype\fR, \fI0\fR to \&\fBstart_frame\fR and \fI30\fR to \fBnb_frames\fR. .PP If the option value itself is a list of items (e.g. the \f(CW\*(C`format\*(C'\fR filter takes a list of pixel formats), the items in the list are usually separated by \&'|'. .PP The list of arguments can be quoted using the character \*(L"'\*(R" as initial and ending mark, and the character '\e' for escaping the characters within the quoted text; otherwise the argument string is considered terminated when the next special character (belonging to the set \&\*(L"[]=;,\*(R") is encountered. .PP The name and arguments of the filter are optionally preceded and followed by a list of link labels. A link label allows to name a link and associate it to a filter output or input pad. The preceding labels \fIin_link_1\fR \&... \fIin_link_N\fR, are associated to the filter input pads, the following labels \fIout_link_1\fR ... \fIout_link_M\fR, are associated to the output pads. .PP When two link labels with the same name are found in the filtergraph, a link between the corresponding input and output pad is created. .PP If an output pad is not labelled, it is linked by default to the first unlabelled input pad of the next filter in the filterchain. For example in the filterchain .PP .Vb 1 \& nullsrc, split[L1], [L2]overlay, nullsink .Ve .PP the split filter instance has two output pads, and the overlay filter instance two input pads. The first output pad of split is labelled \&\*(L"L1\*(R", the first input pad of overlay is labelled \*(L"L2\*(R", and the second output pad of split is linked to the second input pad of overlay, which are both unlabelled. .PP In a complete filterchain all the unlabelled filter input and output pads must be connected. A filtergraph is considered valid if all the filter input and output pads of all the filterchains are connected. .PP Libavfilter will automatically insert scale filters where format conversion is required. It is possible to specify swscale flags for those automatically inserted scalers by prepending \&\f(CW\*(C`sws_flags=\f(CIflags\f(CW;\*(C'\fR to the filtergraph description. .PP Here is a \s-1BNF\s0 description of the filtergraph syntax: .PP .Vb 7 \& ::= sequence of alphanumeric characters and \*(Aq_\*(Aq \& ::= "[" "]" \& ::= [] \& ::= sequence of chars (possibly quoted) \& ::= [] ["=" ] [] \& ::= [,] \& ::= [sws_flags=;] [;] .Ve .PP When you configure your Libav build, you can disable any of the existing filters using \-\-disable\-filters. The configure output will show the audio filters included in your build. .PP Below is a description of the currently available audio filters. .SS "aformat" .IX Subsection "aformat" Convert the input audio to one of the specified formats. The framework will negotiate the most appropriate format to minimize conversions. .PP It accepts the following parameters: .IP "\fBsample_fmts\fR" 4 .IX Item "sample_fmts" A '|'\-separated list of requested sample formats. .IP "\fBsample_rates\fR" 4 .IX Item "sample_rates" A '|'\-separated list of requested sample rates. .IP "\fBchannel_layouts\fR" 4 .IX Item "channel_layouts" A '|'\-separated list of requested channel layouts. .PP If a parameter is omitted, all values are allowed. .PP Force the output to either unsigned 8\-bit or signed 16\-bit stereo .PP .Vb 1 \& aformat=sample_fmts=u8|s16:channel_layouts=stereo .Ve .SS "amix" .IX Subsection "amix" Mixes multiple audio inputs into a single output. .PP For example .PP .Vb 1 \& avconv \-i INPUT1 \-i INPUT2 \-i INPUT3 \-filter_complex amix=inputs=3:duration=first:dropout_transition=3 OUTPUT .Ve .PP will mix 3 input audio streams to a single output with the same duration as the first input and a dropout transition time of 3 seconds. .PP It accepts the following parameters: .IP "\fBinputs\fR" 4 .IX Item "inputs" The number of inputs. If unspecified, it defaults to 2. .IP "\fBduration\fR" 4 .IX Item "duration" How to determine the end-of-stream. .RS 4 .IP "\fBlongest\fR" 4 .IX Item "longest" The duration of the longest input. (default) .IP "\fBshortest\fR" 4 .IX Item "shortest" The duration of the shortest input. .IP "\fBfirst\fR" 4 .IX Item "first" The duration of the first input. .RE .RS 4 .RE .IP "\fBdropout_transition\fR" 4 .IX Item "dropout_transition" The transition time, in seconds, for volume renormalization when an input stream ends. The default value is 2 seconds. .SS "anull" .IX Subsection "anull" Pass the audio source unchanged to the output. .SS "asetpts" .IX Subsection "asetpts" Change the \s-1PTS \s0(presentation timestamp) of the input audio frames. .PP It accepts the following parameters: .IP "\fBexpr\fR" 4 .IX Item "expr" The expression which is evaluated for each frame to construct its timestamp. .PP The expression is evaluated through the eval \s-1API\s0 and can contain the following constants: .IP "\fB\s-1PTS\s0\fR" 4 .IX Item "PTS" the presentation timestamp in input .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBN\fR" 4 .IX Item "N" The number of audio samples passed through the filter so far, starting at 0. .IP "\fBS\fR" 4 .IX Item "S" The number of audio samples in the current frame. .IP "\fB\s-1SR\s0\fR" 4 .IX Item "SR" The audio sample rate. .IP "\fB\s-1STARTPTS\s0\fR" 4 .IX Item "STARTPTS" The \s-1PTS\s0 of the first frame. .IP "\fB\s-1PREV_INPTS\s0\fR" 4 .IX Item "PREV_INPTS" The previous input \s-1PTS.\s0 .IP "\fB\s-1PREV_OUTPTS\s0\fR" 4 .IX Item "PREV_OUTPTS" The previous output \s-1PTS.\s0 .IP "\fB\s-1RTCTIME\s0\fR" 4 .IX Item "RTCTIME" The wallclock (\s-1RTC\s0) time in microseconds. .IP "\fB\s-1RTCSTART\s0\fR" 4 .IX Item "RTCSTART" The wallclock (\s-1RTC\s0) time at the start of the movie in microseconds. .PP Some examples: .PP .Vb 2 \& # Start counting PTS from zero \& asetpts=expr=PTS\-STARTPTS \& \& # Generate timestamps by counting samples \& asetpts=expr=N/SR/TB \& \& # Generate timestamps from a "live source" and rebase onto the current timebase \& asetpts=\*(Aq(RTCTIME \- RTCSTART) / (TB * 1000000)" .Ve .SS "asettb" .IX Subsection "asettb" Set the timebase to use for the output frames timestamps. It is mainly useful for testing timebase configuration. .PP This filter accepts the following parameters: .IP "\fBexpr\fR" 4 .IX Item "expr" The expression which is evaluated into the output timebase. .PP The expression can contain the constants \fI\s-1PI\s0\fR, \fIE\fR, \fI\s-1PHI\s0\fR, \fI\s-1AVTB\s0\fR (the default timebase), \fIintb\fR (the input timebase), and \fIsr\fR (the sample rate, audio only). .PP The default value for the input is \fIintb\fR. .PP Some examples: .PP .Vb 2 \& # Set the timebase to 1/25: \& settb=1/25 \& \& # Set the timebase to 1/10: \& settb=0.1 \& \& # Set the timebase to 1001/1000: \& settb=1+0.001 \& \& # Set the timebase to 2*intb: \& settb=2*intb \& \& # Set the default timebase value: \& settb=AVTB \& \& # Set the timebase to twice the sample rate: \& asettb=sr*2 .Ve .SS "ashowinfo" .IX Subsection "ashowinfo" Show a line containing various information for each input audio frame. The input audio is not modified. .PP The shown line contains a sequence of key/value pairs of the form \&\fIkey\fR:\fIvalue\fR. .PP It accepts the following parameters: .IP "\fBn\fR" 4 .IX Item "n" The (sequential) number of the input frame, starting from 0. .IP "\fBpts\fR" 4 .IX Item "pts" The presentation timestamp of the input frame, in time base units; the time base depends on the filter input pad, and is usually 1/\fIsample_rate\fR. .IP "\fBpts_time\fR" 4 .IX Item "pts_time" The presentation timestamp of the input frame in seconds. .IP "\fBfmt\fR" 4 .IX Item "fmt" The sample format. .IP "\fBchlayout\fR" 4 .IX Item "chlayout" The channel layout. .IP "\fBrate\fR" 4 .IX Item "rate" The sample rate for the audio frame. .IP "\fBnb_samples\fR" 4 .IX Item "nb_samples" The number of samples (per channel) in the frame. .IP "\fBchecksum\fR" 4 .IX Item "checksum" The Adler\-32 checksum (printed in hexadecimal) of the audio data. For planar audio, the data is treated as if all the planes were concatenated. .IP "\fBplane_checksums\fR" 4 .IX Item "plane_checksums" A list of Adler\-32 checksums for each data plane. .SS "asplit" .IX Subsection "asplit" Split input audio into several identical outputs. .PP It accepts a single parameter, which specifies the number of outputs. If unspecified, it defaults to 2. .PP For example, .PP .Vb 1 \& avconv \-i INPUT \-filter_complex asplit=5 OUTPUT .Ve .PP will create 5 copies of the input audio. .SS "asyncts" .IX Subsection "asyncts" Synchronize audio data with timestamps by squeezing/stretching it and/or dropping samples/adding silence when needed. .PP It accepts the following parameters: .IP "\fBcompensate\fR" 4 .IX Item "compensate" Enable stretching/squeezing the data to make it match the timestamps. Disabled by default. When disabled, time gaps are covered with silence. .IP "\fBmin_delta\fR" 4 .IX Item "min_delta" The minimum difference between timestamps and audio data (in seconds) to trigger adding/dropping samples. The default value is 0.1. If you get an imperfect sync with this filter, try setting this parameter to 0. .IP "\fBmax_comp\fR" 4 .IX Item "max_comp" The maximum compensation in samples per second. Only relevant with compensate=1. The default value is 500. .IP "\fBfirst_pts\fR" 4 .IX Item "first_pts" Assume that the first \s-1PTS\s0 should be this value. The time base is 1 / sample rate. This allows for padding/trimming at the start of the stream. By default, no assumption is made about the first frame's expected \s-1PTS,\s0 so no padding or trimming is done. For example, this could be set to 0 to pad the beginning with silence if an audio stream starts after the video stream or to trim any samples with a negative \s-1PTS\s0 due to encoder delay. .SS "atrim" .IX Subsection "atrim" Trim the input so that the output contains one continuous subpart of the input. .PP It accepts the following parameters: .IP "\fBstart\fR" 4 .IX Item "start" Timestamp (in seconds) of the start of the section to keep. I.e. the audio sample with the timestamp \fIstart\fR will be the first sample in the output. .IP "\fBend\fR" 4 .IX Item "end" Timestamp (in seconds) of the first audio sample that will be dropped. I.e. the audio sample immediately preceding the one with the timestamp \fIend\fR will be the last sample in the output. .IP "\fBstart_pts\fR" 4 .IX Item "start_pts" Same as \fIstart\fR, except this option sets the start timestamp in samples instead of seconds. .IP "\fBend_pts\fR" 4 .IX Item "end_pts" Same as \fIend\fR, except this option sets the end timestamp in samples instead of seconds. .IP "\fBduration\fR" 4 .IX Item "duration" The maximum duration of the output in seconds. .IP "\fBstart_sample\fR" 4 .IX Item "start_sample" The number of the first sample that should be output. .IP "\fBend_sample\fR" 4 .IX Item "end_sample" The number of the first sample that should be dropped. .PP Note that the first two sets of the start/end options and the \fBduration\fR option look at the frame timestamp, while the _sample options simply count the samples that pass through the filter. So start/end_pts and start/end_sample will give different results when the timestamps are wrong, inexact or do not start at zero. Also note that this filter does not modify the timestamps. If you wish to have the output timestamps start at zero, insert the asetpts filter after the atrim filter. .PP If multiple start or end options are set, this filter tries to be greedy and keep all samples that match at least one of the specified constraints. To keep only the part that matches all the constraints at once, chain multiple atrim filters. .PP The defaults are such that all the input is kept. So it is possible to set e.g. just the end values to keep everything before the specified time. .PP Examples: .IP "\(bu" 4 Drop everything except the second minute of input: .Sp .Vb 1 \& avconv \-i INPUT \-af atrim=60:120 .Ve .IP "\(bu" 4 Keep only the first 1000 samples: .Sp .Vb 1 \& avconv \-i INPUT \-af atrim=end_sample=1000 .Ve .SS "bs2b" .IX Subsection "bs2b" Bauer stereo to binaural transformation, which improves headphone listening of stereo audio records. .PP It accepts the following parameters: .IP "\fBprofile\fR" 4 .IX Item "profile" Pre-defined crossfeed level. .RS 4 .IP "\fBdefault\fR" 4 .IX Item "default" Default level (fcut=700, feed=50). .IP "\fBcmoy\fR" 4 .IX Item "cmoy" Chu Moy circuit (fcut=700, feed=60). .IP "\fBjmeier\fR" 4 .IX Item "jmeier" Jan Meier circuit (fcut=650, feed=95). .RE .RS 4 .RE .IP "\fBfcut\fR" 4 .IX Item "fcut" Cut frequency (in Hz). .IP "\fBfeed\fR" 4 .IX Item "feed" Feed level (in Hz). .SS "channelsplit" .IX Subsection "channelsplit" Split each channel from an input audio stream into a separate output stream. .PP It accepts the following parameters: .IP "\fBchannel_layout\fR" 4 .IX Item "channel_layout" The channel layout of the input stream. The default is \*(L"stereo\*(R". .PP For example, assuming a stereo input \s-1MP3\s0 file, .PP .Vb 1 \& avconv \-i in.mp3 \-filter_complex channelsplit out.mkv .Ve .PP will create an output Matroska file with two audio streams, one containing only the left channel and the other the right channel. .PP Split a 5.1 \s-1WAV\s0 file into per-channel files: .PP .Vb 5 \& avconv \-i in.wav \-filter_complex \& \*(Aqchannelsplit=channel_layout=5.1[FL][FR][FC][LFE][SL][SR]\*(Aq \& \-map \*(Aq[FL]\*(Aq front_left.wav \-map \*(Aq[FR]\*(Aq front_right.wav \-map \*(Aq[FC]\*(Aq \& front_center.wav \-map \*(Aq[LFE]\*(Aq lfe.wav \-map \*(Aq[SL]\*(Aq side_left.wav \-map \*(Aq[SR]\*(Aq \& side_right.wav .Ve .SS "channelmap" .IX Subsection "channelmap" Remap input channels to new locations. .PP It accepts the following parameters: .IP "\fBchannel_layout\fR" 4 .IX Item "channel_layout" The channel layout of the output stream. .IP "\fBmap\fR" 4 .IX Item "map" Map channels from input to output. The argument is a '|'\-separated list of mappings, each in the \f(CW\*(C`\f(CIin_channel\f(CW\-\f(CIout_channel\f(CW\*(C'\fR or \&\fIin_channel\fR form. \fIin_channel\fR can be either the name of the input channel (e.g. \s-1FL\s0 for front left) or its index in the input channel layout. \&\fIout_channel\fR is the name of the output channel or its index in the output channel layout. If \fIout_channel\fR is not given then it is implicitly an index, starting with zero and increasing by one for each mapping. .PP If no mapping is present, the filter will implicitly map input channels to output channels, preserving indices. .PP For example, assuming a 5.1+downmix input \s-1MOV\s0 file, .PP .Vb 1 \& avconv \-i in.mov \-filter \*(Aqchannelmap=map=DL\-FL|DR\-FR\*(Aq out.wav .Ve .PP will create an output \s-1WAV\s0 file tagged as stereo from the downmix channels of the input. .PP To fix a 5.1 \s-1WAV\s0 improperly encoded in \s-1AAC\s0's native channel order .PP .Vb 1 \& avconv \-i in.wav \-filter \*(Aqchannelmap=1|2|0|5|3|4:channel_layout=5.1\*(Aq out.wav .Ve .SS "compand" .IX Subsection "compand" Compress or expand the audio's dynamic range. .PP It accepts the following parameters: .IP "\fBattacks\fR" 4 .IX Item "attacks" .PD 0 .IP "\fBdecays\fR" 4 .IX Item "decays" .PD A list of times in seconds for each channel over which the instantaneous level of the input signal is averaged to determine its volume. \fIattacks\fR refers to increase of volume and \fIdecays\fR refers to decrease of volume. For most situations, the attack time (response to the audio getting louder) should be shorter than the decay time, because the human ear is more sensitive to sudden loud audio than sudden soft audio. A typical value for attack is 0.3 seconds and a typical value for decay is 0.8 seconds. .IP "\fBpoints\fR" 4 .IX Item "points" A list of points for the transfer function, specified in dB relative to the maximum possible signal amplitude. Each key points list must be defined using the following syntax: \f(CW\*(C`x0/y0|x1/y1|x2/y2|....\*(C'\fR .Sp The input values must be in strictly increasing order but the transfer function does not have to be monotonically rising. The point \f(CW\*(C`0/0\*(C'\fR is assumed but may be overridden (by \f(CW\*(C`0/out\-dBn\*(C'\fR). Typical values for the transfer function are \f(CW\*(C`\-70/\-70|\-60/\-20\*(C'\fR. .IP "\fBsoft-knee\fR" 4 .IX Item "soft-knee" Set the curve radius in dB for all joints. It defaults to 0.01. .IP "\fBgain\fR" 4 .IX Item "gain" Set the additional gain in dB to be applied at all points on the transfer function. This allows for easy adjustment of the overall gain. It defaults to 0. .IP "\fBvolume\fR" 4 .IX Item "volume" Set an initial volume, in dB, to be assumed for each channel when filtering starts. This permits the user to supply a nominal level initially, so that, for example, a very large gain is not applied to initial signal levels before the companding has begun to operate. A typical value for audio which is initially quiet is \-90 dB. It defaults to 0. .IP "\fBdelay\fR" 4 .IX Item "delay" Set a delay, in seconds. The input audio is analyzed immediately, but audio is delayed before being fed to the volume adjuster. Specifying a delay approximately equal to the attack/decay times allows the filter to effectively operate in predictive rather than reactive mode. It defaults to 0. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Make music with both quiet and loud passages suitable for listening to in a noisy environment: .Sp .Vb 1 \& compand=.3|.3:1|1:\-90/\-60|\-60/\-40|\-40/\-30|\-20/\-20:6:0:\-90:0.2 .Ve .IP "\(bu" 4 A noise gate for when the noise is at a lower level than the signal: .Sp .Vb 1 \& compand=.1|.1:.2|.2:\-900/\-900|\-50.1/\-900|\-50/\-50:.01:0:\-90:.1 .Ve .IP "\(bu" 4 Here is another noise gate, this time for when the noise is at a higher level than the signal (making it, in some ways, similar to squelch): .Sp .Vb 1 \& compand=.1|.1:.1|.1:\-45.1/\-45.1|\-45/\-900|0/\-900:.01:45:\-90:.1 .Ve .SS "join" .IX Subsection "join" Join multiple input streams into one multi-channel stream. .PP It accepts the following parameters: .IP "\fBinputs\fR" 4 .IX Item "inputs" The number of input streams. It defaults to 2. .IP "\fBchannel_layout\fR" 4 .IX Item "channel_layout" The desired output channel layout. It defaults to stereo. .IP "\fBmap\fR" 4 .IX Item "map" Map channels from inputs to output. The argument is a '|'\-separated list of mappings, each in the \f(CW\*(C`\f(CIinput_idx\f(CW.\f(CIin_channel\f(CW\-\f(CIout_channel\f(CW\*(C'\fR form. \fIinput_idx\fR is the 0\-based index of the input stream. \fIin_channel\fR can be either the name of the input channel (e.g. \s-1FL\s0 for front left) or its index in the specified input stream. \fIout_channel\fR is the name of the output channel. .PP The filter will attempt to guess the mappings when they are not specified explicitly. It does so by first trying to find an unused matching input channel and if that fails it picks the first unused input channel. .PP Join 3 inputs (with properly set channel layouts): .PP .Vb 1 \& avconv \-i INPUT1 \-i INPUT2 \-i INPUT3 \-filter_complex join=inputs=3 OUTPUT .Ve .PP Build a 5.1 output from 6 single-channel streams: .PP .Vb 3 \& avconv \-i fl \-i fr \-i fc \-i sl \-i sr \-i lfe \-filter_complex \& \*(Aqjoin=inputs=6:channel_layout=5.1:map=0.0\-FL|1.0\-FR|2.0\-FC|3.0\-SL|4.0\-SR|5.0\-LFE\*(Aq \& out .Ve .SS "resample" .IX Subsection "resample" Convert the audio sample format, sample rate and channel layout. It is not meant to be used directly; it is inserted automatically by libavfilter whenever conversion is needed. Use the \fIaformat\fR filter to force a specific conversion. .SS "volume" .IX Subsection "volume" Adjust the input audio volume. .PP It accepts the following parameters: .IP "\fBvolume\fR" 4 .IX Item "volume" This expresses how the audio volume will be increased or decreased. .Sp Output values are clipped to the maximum value. .Sp The output audio volume is given by the relation: .Sp .Vb 1 \& = * .Ve .Sp The default value for \fIvolume\fR is 1.0. .IP "\fBprecision\fR" 4 .IX Item "precision" This parameter represents the mathematical precision. .Sp It determines which input sample formats will be allowed, which affects the precision of the volume scaling. .RS 4 .IP "\fBfixed\fR" 4 .IX Item "fixed" 8\-bit fixed-point; this limits input sample format to U8, S16, and S32. .IP "\fBfloat\fR" 4 .IX Item "float" 32\-bit floating-point; this limits input sample format to \s-1FLT. \s0(default) .IP "\fBdouble\fR" 4 .IX Item "double" 64\-bit floating-point; this limits input sample format to \s-1DBL.\s0 .RE .RS 4 .RE .IP "\fBreplaygain\fR" 4 .IX Item "replaygain" Choose the behaviour on encountering ReplayGain side data in input frames. .RS 4 .IP "\fBdrop\fR" 4 .IX Item "drop" Remove ReplayGain side data, ignoring its contents (the default). .IP "\fBignore\fR" 4 .IX Item "ignore" Ignore ReplayGain side data, but leave it in the frame. .IP "\fBtrack\fR" 4 .IX Item "track" Prefer the track gain, if present. .IP "\fBalbum\fR" 4 .IX Item "album" Prefer the album gain, if present. .RE .RS 4 .RE .IP "\fBreplaygain_preamp\fR" 4 .IX Item "replaygain_preamp" Pre-amplification gain in dB to apply to the selected replaygain gain. .Sp Default value for \fIreplaygain_preamp\fR is 0.0. .IP "\fBreplaygain_noclip\fR" 4 .IX Item "replaygain_noclip" Prevent clipping by limiting the gain applied. .Sp Default value for \fIreplaygain_noclip\fR is 1. .PP \fIExamples\fR .IX Subsection "Examples" .IP "\(bu" 4 Halve the input audio volume: .Sp .Vb 3 \& volume=volume=0.5 \& volume=volume=1/2 \& volume=volume=\-6.0206dB .Ve .IP "\(bu" 4 Increase input audio power by 6 decibels using fixed-point precision: .Sp .Vb 1 \& volume=volume=6dB:precision=fixed .Ve .PP Below is a description of the currently available audio sources. .SS "anullsrc" .IX Subsection "anullsrc" The null audio source; it never returns audio frames. It is mainly useful as a template and for use in analysis / debugging tools. .PP It accepts, as an optional parameter, a string of the form \&\fIsample_rate\fR:\fIchannel_layout\fR. .PP \&\fIsample_rate\fR specifies the sample rate, and defaults to 44100. .PP \&\fIchannel_layout\fR specifies the channel layout, and can be either an integer or a string representing a channel layout. The default value of \fIchannel_layout\fR is 3, which corresponds to \s-1CH_LAYOUT_STEREO.\s0 .PP Check the channel_layout_map definition in \&\fIlibavutil/channel_layout.c\fR for the mapping between strings and channel layout values. .PP Some examples: .PP .Vb 2 \& # Set the sample rate to 48000 Hz and the channel layout to CH_LAYOUT_MONO \& anullsrc=48000:4 \& \& # The same as above \& anullsrc=48000:mono .Ve .SS "abuffer" .IX Subsection "abuffer" Buffer audio frames, and make them available to the filter chain. .PP This source is not intended to be part of user-supplied graph descriptions; it is for insertion by calling programs, through the interface defined in \&\fIlibavfilter/buffersrc.h\fR. .PP It accepts the following parameters: .IP "\fBtime_base\fR" 4 .IX Item "time_base" The timebase which will be used for timestamps of submitted frames. It must be either a floating-point number or in \fInumerator\fR/\fIdenominator\fR form. .IP "\fBsample_rate\fR" 4 .IX Item "sample_rate" The audio sample rate. .IP "\fBsample_fmt\fR" 4 .IX Item "sample_fmt" The name of the sample format, as returned by \f(CW\*(C`av_get_sample_fmt_name()\*(C'\fR. .IP "\fBchannel_layout\fR" 4 .IX Item "channel_layout" The channel layout of the audio data, in the form that can be accepted by \&\f(CW\*(C`av_get_channel_layout()\*(C'\fR. .PP All the parameters need to be explicitly defined. .PP Below is a description of the currently available audio sinks. .SS "anullsink" .IX Subsection "anullsink" Null audio sink; do absolutely nothing with the input audio. It is mainly useful as a template and for use in analysis / debugging tools. .SS "abuffersink" .IX Subsection "abuffersink" This sink is intended for programmatic use. Frames that arrive on this sink can be retrieved by the calling program, using the interface defined in \&\fIlibavfilter/buffersink.h\fR. .PP It does not accept any parameters. .PP When you configure your Libav build, you can disable any of the existing filters using \-\-disable\-filters. The configure output will show the video filters included in your build. .PP Below is a description of the currently available video filters. .SS "blackframe" .IX Subsection "blackframe" Detect frames that are (almost) completely black. Can be useful to detect chapter transitions or commercials. Output lines consist of the frame number of the detected frame, the percentage of blackness, the position in the file if known or \-1 and the timestamp in seconds. .PP In order to display the output lines, you need to set the loglevel at least to the \s-1AV_LOG_INFO\s0 value. .PP It accepts the following parameters: .IP "\fBamount\fR" 4 .IX Item "amount" The percentage of the pixels that have to be below the threshold; it defaults to 98. .IP "\fBthreshold\fR" 4 .IX Item "threshold" The threshold below which a pixel value is considered black; it defaults to 32. .SS "boxblur" .IX Subsection "boxblur" Apply a boxblur algorithm to the input video. .PP It accepts the following parameters: .IP "\fBluma_radius\fR" 4 .IX Item "luma_radius" .PD 0 .IP "\fBluma_power\fR" 4 .IX Item "luma_power" .IP "\fBchroma_radius\fR" 4 .IX Item "chroma_radius" .IP "\fBchroma_power\fR" 4 .IX Item "chroma_power" .IP "\fBalpha_radius\fR" 4 .IX Item "alpha_radius" .IP "\fBalpha_power\fR" 4 .IX Item "alpha_power" .PD .PP The chroma and alpha parameters are optional. If not specified, they default to the corresponding values set for \fIluma_radius\fR and \&\fIluma_power\fR. .PP \&\fIluma_radius\fR, \fIchroma_radius\fR, and \fIalpha_radius\fR represent the radius in pixels of the box used for blurring the corresponding input plane. They are expressions, and can contain the following constants: .IP "\fBw, h\fR" 4 .IX Item "w, h" The input width and height in pixels. .IP "\fBcw, ch\fR" 4 .IX Item "cw, ch" The input chroma image width and height in pixels. .IP "\fBhsub, vsub\fR" 4 .IX Item "hsub, vsub" The horizontal and vertical chroma subsample values. For example, for the pixel format \*(L"yuv422p\*(R", \fIhsub\fR is 2 and \fIvsub\fR is 1. .PP The radius must be a non-negative number, and must not be greater than the value of the expression \f(CW\*(C`min(w,h)/2\*(C'\fR for the luma and alpha planes, and of \f(CW\*(C`min(cw,ch)/2\*(C'\fR for the chroma planes. .PP \&\fIluma_power\fR, \fIchroma_power\fR, and \fIalpha_power\fR represent how many times the boxblur filter is applied to the corresponding plane. .PP Some examples: .IP "\(bu" 4 Apply a boxblur filter with the luma, chroma, and alpha radii set to 2: .Sp .Vb 1 \& boxblur=luma_radius=2:luma_power=1 .Ve .IP "\(bu" 4 Set the luma radius to 2, and alpha and chroma radius to 0: .Sp .Vb 1 \& boxblur=2:1:0:0:0:0 .Ve .IP "\(bu" 4 Set the luma and chroma radii to a fraction of the video dimension: .Sp .Vb 1 \& boxblur=luma_radius=min(h,w)/10:luma_power=1:chroma_radius=min(cw,ch)/10:chroma_power=1 .Ve .SS "copy" .IX Subsection "copy" Copy the input source unchanged to the output. This is mainly useful for testing purposes. .SS "crop" .IX Subsection "crop" Crop the input video to given dimensions. .PP It accepts the following parameters: .IP "\fBout_w\fR" 4 .IX Item "out_w" The width of the output video. .IP "\fBout_h\fR" 4 .IX Item "out_h" The height of the output video. .IP "\fBx\fR" 4 .IX Item "x" The horizontal position, in the input video, of the left edge of the output video. .IP "\fBy\fR" 4 .IX Item "y" The vertical position, in the input video, of the top edge of the output video. .PP The parameters are expressions containing the following constants: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBx, y\fR" 4 .IX Item "x, y" The computed values for \fIx\fR and \fIy\fR. They are evaluated for each new frame. .IP "\fBin_w, in_h\fR" 4 .IX Item "in_w, in_h" The input width and height. .IP "\fBiw, ih\fR" 4 .IX Item "iw, ih" These are the same as \fIin_w\fR and \fIin_h\fR. .IP "\fBout_w, out_h\fR" 4 .IX Item "out_w, out_h" The output (cropped) width and height. .IP "\fBow, oh\fR" 4 .IX Item "ow, oh" These are the same as \fIout_w\fR and \fIout_h\fR. .IP "\fBn\fR" 4 .IX Item "n" The number of the input frame, starting from 0. .IP "\fBt\fR" 4 .IX Item "t" The timestamp expressed in seconds. It's \s-1NAN\s0 if the input timestamp is unknown. .PP The \fIout_w\fR and \fIout_h\fR parameters specify the expressions for the width and height of the output (cropped) video. They are only evaluated during the configuration of the filter. .PP The default value of \fIout_w\fR is \*(L"in_w\*(R", and the default value of \&\fIout_h\fR is \*(L"in_h\*(R". .PP The expression for \fIout_w\fR may depend on the value of \fIout_h\fR, and the expression for \fIout_h\fR may depend on \fIout_w\fR, but they cannot depend on \fIx\fR and \fIy\fR, as \fIx\fR and \fIy\fR are evaluated after \fIout_w\fR and \fIout_h\fR. .PP The \fIx\fR and \fIy\fR parameters specify the expressions for the position of the top-left corner of the output (non-cropped) area. They are evaluated for each frame. If the evaluated value is not valid, it is approximated to the nearest valid value. .PP The default value of \fIx\fR is \*(L"(in_w\-out_w)/2\*(R", and the default value for \fIy\fR is \*(L"(in_h\-out_h)/2\*(R", which set the cropped area at the center of the input image. .PP The expression for \fIx\fR may depend on \fIy\fR, and the expression for \fIy\fR may depend on \fIx\fR. .PP Some examples: .PP .Vb 2 \& # Crop the central input area with size 100x100 \& crop=out_w=100:out_h=100 \& \& # Crop the central input area with size 2/3 of the input video \& "crop=out_w=2/3*in_w:out_h=2/3*in_h" \& \& # Crop the input video central square \& crop=out_w=in_h \& \& # Delimit the rectangle with the top\-left corner placed at position \& # 100:100 and the right\-bottom corner corresponding to the right\-bottom \& # corner of the input image \& crop=out_w=in_w\-100:out_h=in_h\-100:x=100:y=100 \& \& # Crop 10 pixels from the left and right borders, and 20 pixels from \& # the top and bottom borders \& "crop=out_w=in_w\-2*10:out_h=in_h\-2*20" \& \& # Keep only the bottom right quarter of the input image \& "crop=out_w=in_w/2:out_h=in_h/2:x=in_w/2:y=in_h/2" \& \& # Crop height for getting Greek harmony \& "crop=out_w=in_w:out_h=1/PHI*in_w" \& \& # Trembling effect \& "crop=in_w/2:in_h/2:(in_w\-out_w)/2+((in_w\-out_w)/2)*sin(n/10):(in_h\-out_h)/2 +((in_h\-out_h)/2)*sin(n/7)" \& \& # Erratic camera effect depending on timestamp \& "crop=out_w=in_w/2:out_h=in_h/2:x=(in_w\-out_w)/2+((in_w\-out_w)/2)*sin(t*10):y=(in_h\-out_h)/2 +((in_h\-out_h)/2)*sin(t*13)" \& \& # Set x depending on the value of y \& "crop=in_w/2:in_h/2:y:10+10*sin(n/10)" .Ve .SS "cropdetect" .IX Subsection "cropdetect" Auto-detect the crop size. .PP It calculates the necessary cropping parameters and prints the recommended parameters via the logging system. The detected dimensions correspond to the non-black area of the input video. .PP It accepts the following parameters: .IP "\fBlimit\fR" 4 .IX Item "limit" The threshold, an optional parameter between nothing (0) and everything (255). It defaults to 24. .IP "\fBround\fR" 4 .IX Item "round" The value which the width/height should be divisible by. It defaults to 16. The offset is automatically adjusted to center the video. Use 2 to get only even dimensions (needed for 4:2:2 video). 16 is best when encoding to most video codecs. .IP "\fBreset\fR" 4 .IX Item "reset" A counter that determines how many frames cropdetect will reset the previously detected largest video area after. It will then start over and detect the current optimal crop area. It defaults to 0. .Sp This can be useful when channel logos distort the video area. 0 indicates 'never reset', and returns the largest area encountered during playback. .SS "delogo" .IX Subsection "delogo" Suppress a \s-1TV\s0 station logo by a simple interpolation of the surrounding pixels. Just set a rectangle covering the logo and watch it disappear (and sometimes something even uglier appear \- your mileage may vary). .PP It accepts the following parameters: .IP "\fBx, y\fR" 4 .IX Item "x, y" Specify the top left corner coordinates of the logo. They must be specified. .IP "\fBw, h\fR" 4 .IX Item "w, h" Specify the width and height of the logo to clear. They must be specified. .IP "\fBband, t\fR" 4 .IX Item "band, t" Specify the thickness of the fuzzy edge of the rectangle (added to \&\fIw\fR and \fIh\fR). The default value is 4. .IP "\fBshow\fR" 4 .IX Item "show" When set to 1, a green rectangle is drawn on the screen to simplify finding the right \fIx\fR, \fIy\fR, \fIw\fR, \fIh\fR parameters, and \&\fIband\fR is set to 4. The default value is 0. .PP An example: .IP "\(bu" 4 Set a rectangle covering the area with top left corner coordinates 0,0 and size 100x77, and a band of size 10: .Sp .Vb 1 \& delogo=x=0:y=0:w=100:h=77:band=10 .Ve .SS "drawbox" .IX Subsection "drawbox" Draw a colored box on the input image. .PP It accepts the following parameters: .IP "\fBx, y\fR" 4 .IX Item "x, y" Specify the top left corner coordinates of the box. It defaults to 0. .IP "\fBwidth, height\fR" 4 .IX Item "width, height" Specify the width and height of the box; if 0 they are interpreted as the input width and height. It defaults to 0. .IP "\fBcolor\fR" 4 .IX Item "color" Specify the color of the box to write. It can be the name of a color (case insensitive match) or a 0xRRGGBB[\s-1AA\s0] sequence. .PP Some examples: .PP .Vb 2 \& # Draw a black box around the edge of the input image \& drawbox \& \& # Draw a box with color red and an opacity of 50% \& drawbox=x=10:y=20:width=200:height=60:color=red@0.5" .Ve .SS "drawtext" .IX Subsection "drawtext" Draw a text string or text from a specified file on top of a video, using the libfreetype library. .PP To enable compilation of this filter, you need to configure Libav with \&\f(CW\*(C`\-\-enable\-libfreetype\*(C'\fR. To enable default font fallback and the \fIfont\fR option you need to configure Libav with \f(CW\*(C`\-\-enable\-libfontconfig\*(C'\fR. .PP The filter also recognizes \fIstrftime()\fR sequences in the provided text and expands them accordingly. Check the documentation of \fIstrftime()\fR. .PP It accepts the following parameters: .IP "\fBfont\fR" 4 .IX Item "font" The font family to be used for drawing text. By default Sans. .IP "\fBfontfile\fR" 4 .IX Item "fontfile" The font file to be used for drawing text. The path must be included. This parameter is mandatory if the fontconfig support is disabled. .IP "\fBtext\fR" 4 .IX Item "text" The text string to be drawn. The text must be a sequence of \s-1UTF\-8\s0 encoded characters. This parameter is mandatory if no file is specified with the parameter \&\fItextfile\fR. .IP "\fBtextfile\fR" 4 .IX Item "textfile" A text file containing text to be drawn. The text must be a sequence of \s-1UTF\-8\s0 encoded characters. .Sp This parameter is mandatory if no text string is specified with the parameter \fItext\fR. .Sp If both text and textfile are specified, an error is thrown. .IP "\fBx, y\fR" 4 .IX Item "x, y" The offsets where text will be drawn within the video frame. It is relative to the top/left border of the output image. They accept expressions similar to the overlay filter: .RS 4 .IP "\fBx, y\fR" 4 .IX Item "x, y" The computed values for \fIx\fR and \fIy\fR. They are evaluated for each new frame. .IP "\fBmain_w, main_h\fR" 4 .IX Item "main_w, main_h" The main input width and height. .IP "\fBW, H\fR" 4 .IX Item "W, H" These are the same as \fImain_w\fR and \fImain_h\fR. .IP "\fBtext_w, text_h\fR" 4 .IX Item "text_w, text_h" The rendered text's width and height. .IP "\fBw, h\fR" 4 .IX Item "w, h" These are the same as \fItext_w\fR and \fItext_h\fR. .IP "\fBn\fR" 4 .IX Item "n" The number of frames processed, starting from 0. .IP "\fBt\fR" 4 .IX Item "t" The timestamp, expressed in seconds. It's \s-1NAN\s0 if the input timestamp is unknown. .RE .RS 4 .Sp The default value of \fIx\fR and \fIy\fR is 0. .RE .IP "\fBfontsize\fR" 4 .IX Item "fontsize" The font size to be used for drawing text. The default value of \fIfontsize\fR is 16. .IP "\fBfontcolor\fR" 4 .IX Item "fontcolor" The color to be used for drawing fonts. It is either a string (e.g. \*(L"red\*(R"), or in 0xRRGGBB[\s-1AA\s0] format (e.g. \*(L"0xff000033\*(R"), possibly followed by an alpha specifier. The default value of \fIfontcolor\fR is \*(L"black\*(R". .IP "\fBboxcolor\fR" 4 .IX Item "boxcolor" The color to be used for drawing box around text. It is either a string (e.g. \*(L"yellow\*(R") or in 0xRRGGBB[\s-1AA\s0] format (e.g. \*(L"0xff00ff\*(R"), possibly followed by an alpha specifier. The default value of \fIboxcolor\fR is \*(L"white\*(R". .IP "\fBbox\fR" 4 .IX Item "box" Used to draw a box around text using the background color. The value must be either 1 (enable) or 0 (disable). The default value of \fIbox\fR is 0. .IP "\fBshadowx, shadowy\fR" 4 .IX Item "shadowx, shadowy" The x and y offsets for the text shadow position with respect to the position of the text. They can be either positive or negative values. The default value for both is \*(L"0\*(R". .IP "\fBshadowcolor\fR" 4 .IX Item "shadowcolor" The color to be used for drawing a shadow behind the drawn text. It can be a color name (e.g. \*(L"yellow\*(R") or a string in the 0xRRGGBB[\s-1AA\s0] form (e.g. \*(L"0xff00ff\*(R"), possibly followed by an alpha specifier. The default value of \fIshadowcolor\fR is \*(L"black\*(R". .IP "\fBft_load_flags\fR" 4 .IX Item "ft_load_flags" The flags to be used for loading the fonts. .Sp The flags map the corresponding flags supported by libfreetype, and are a combination of the following values: .RS 4 .IP "\fIdefault\fR" 4 .IX Item "default" .PD 0 .IP "\fIno_scale\fR" 4 .IX Item "no_scale" .IP "\fIno_hinting\fR" 4 .IX Item "no_hinting" .IP "\fIrender\fR" 4 .IX Item "render" .IP "\fIno_bitmap\fR" 4 .IX Item "no_bitmap" .IP "\fIvertical_layout\fR" 4 .IX Item "vertical_layout" .IP "\fIforce_autohint\fR" 4 .IX Item "force_autohint" .IP "\fIcrop_bitmap\fR" 4 .IX Item "crop_bitmap" .IP "\fIpedantic\fR" 4 .IX Item "pedantic" .IP "\fIignore_global_advance_width\fR" 4 .IX Item "ignore_global_advance_width" .IP "\fIno_recurse\fR" 4 .IX Item "no_recurse" .IP "\fIignore_transform\fR" 4 .IX Item "ignore_transform" .IP "\fImonochrome\fR" 4 .IX Item "monochrome" .IP "\fIlinear_design\fR" 4 .IX Item "linear_design" .IP "\fIno_autohint\fR" 4 .IX Item "no_autohint" .IP "\fIend table\fR" 4 .IX Item "end table" .RE .RS 4 .PD .Sp Default value is \*(L"render\*(R". .Sp For more information consult the documentation for the FT_LOAD_* libfreetype flags. .RE .IP "\fBtabsize\fR" 4 .IX Item "tabsize" The size in number of spaces to use for rendering the tab. Default value is 4. .IP "\fBfix_bounds\fR" 4 .IX Item "fix_bounds" If true, check and fix text coords to avoid clipping. .PP For example the command: .PP .Vb 1 \& drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text=\*(AqTest Text\*(Aq" .Ve .PP will draw \*(L"Test Text\*(R" with font FreeSerif, using the default values for the optional parameters. .PP The command: .PP .Vb 2 \& drawtext="fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf: text=\*(AqTest Text\*(Aq:\e \& x=100: y=50: fontsize=24: fontcolor=yellow@0.2: box=1: boxcolor=red@0.2" .Ve .PP will draw 'Test Text' with font FreeSerif of size 24 at position x=100 and y=50 (counting from the top-left corner of the screen), text is yellow with a red box around it. Both the text and the box have an opacity of 20%. .PP Note that the double quotes are not necessary if spaces are not used within the parameter list. .PP For more information about libfreetype, check: <\fBhttp://www.freetype.org/\fR>. .SS "fade" .IX Subsection "fade" Apply a fade\-in/out effect to the input video. .PP It accepts the following parameters: .IP "\fBtype\fR" 4 .IX Item "type" The effect type can be either \*(L"in\*(R" for a fade-in, or \*(L"out\*(R" for a fade-out effect. .IP "\fBstart_frame\fR" 4 .IX Item "start_frame" The number of the frame to start applying the fade effect at. .IP "\fBnb_frames\fR" 4 .IX Item "nb_frames" The number of frames that the fade effect lasts. At the end of the fade-in effect, the output video will have the same intensity as the input video. At the end of the fade-out transition, the output video will be completely black. .PP Some examples: .PP .Vb 2 \& # Fade in the first 30 frames of video \& fade=type=in:nb_frames=30 \& \& # Fade out the last 45 frames of a 200\-frame video \& fade=type=out:start_frame=155:nb_frames=45 \& \& # Fade in the first 25 frames and fade out the last 25 frames of a 1000\-frame video \& fade=type=in:start_frame=0:nb_frames=25, fade=type=out:start_frame=975:nb_frames=25 \& \& # Make the first 5 frames black, then fade in from frame 5\-24 \& fade=type=in:start_frame=5:nb_frames=20 .Ve .SS "fieldorder" .IX Subsection "fieldorder" Transform the field order of the input video. .PP It accepts the following parameters: .IP "\fBorder\fR" 4 .IX Item "order" The output field order. Valid values are \fItff\fR for top field first or \fIbff\fR for bottom field first. .PP The default value is \*(L"tff\*(R". .PP The transformation is done by shifting the picture content up or down by one line, and filling the remaining line with appropriate picture content. This method is consistent with most broadcast field order converters. .PP If the input video is not flagged as being interlaced, or it is already flagged as being of the required output field order, then this filter does not alter the incoming video. .PP It is very useful when converting to or from \s-1PAL DV\s0 material, which is bottom field first. .PP For example: .PP .Vb 1 \& ./avconv \-i in.vob \-vf "fieldorder=order=bff" out.dv .Ve .SS "fifo" .IX Subsection "fifo" Buffer input images and send them when they are requested. .PP It is mainly useful when auto-inserted by the libavfilter framework. .PP It does not take parameters. .SS "format" .IX Subsection "format" Convert the input video to one of the specified pixel formats. Libavfilter will try to pick one that is suitable as input to the next filter. .PP It accepts the following parameters: .IP "\fBpix_fmts\fR" 4 .IX Item "pix_fmts" A '|'\-separated list of pixel format names, such as \&\*(L"pix_fmts=yuv420p|monow|rgb24\*(R". .PP Some examples: .PP .Vb 2 \& # Convert the input video to the "yuv420p" format \& format=pix_fmts=yuv420p \& \& # Convert the input video to any of the formats in the list \& format=pix_fmts=yuv420p|yuv444p|yuv410p .Ve .SS "fps" .IX Subsection "fps" Convert the video to specified constant framerate by duplicating or dropping frames as necessary. .PP It accepts the following parameters: .IP "\fBfps\fR" 4 .IX Item "fps" The desired output framerate. .IP "\fBstart_time\fR" 4 .IX Item "start_time" Assume the first \s-1PTS\s0 should be the given value, in seconds. This allows for padding/trimming at the start of stream. By default, no assumption is made about the first frame's expected \s-1PTS,\s0 so no padding or trimming is done. For example, this could be set to 0 to pad the beginning with duplicates of the first frame if a video stream starts after the audio stream or to trim any frames with a negative \s-1PTS.\s0 .SS "framepack" .IX Subsection "framepack" Pack two different video streams into a stereoscopic video, setting proper metadata on supported codecs. The two views should have the same size and framerate and processing will stop when the shorter video ends. Please note that you may conveniently adjust view properties with the scale and fps filters. .PP It accepts the following parameters: .IP "\fBformat\fR" 4 .IX Item "format" The desired packing format. Supported values are: .RS 4 .IP "\fBsbs\fR" 4 .IX Item "sbs" The views are next to each other (default). .IP "\fBtab\fR" 4 .IX Item "tab" The views are on top of each other. .IP "\fBlines\fR" 4 .IX Item "lines" The views are packed by line. .IP "\fBcolumns\fR" 4 .IX Item "columns" The views are packed by column. .IP "\fBframeseq\fR" 4 .IX Item "frameseq" The views are temporally interleaved. .RE .RS 4 .RE .PP Some examples: .PP .Vb 2 \& # Convert left and right views into a frame\-sequential video \& avconv \-i LEFT \-i RIGHT \-filter_complex framepack=frameseq OUTPUT \& \& # Convert views into a side\-by\-side video with the same output resolution as the input \& avconv \-i LEFT \-i RIGHT \-filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT .Ve .SS "frei0r" .IX Subsection "frei0r" Apply a frei0r effect to the input video. .PP To enable the compilation of this filter, you need to install the frei0r header and configure Libav with \-\-enable\-frei0r. .PP It accepts the following parameters: .IP "\fBfilter_name\fR" 4 .IX Item "filter_name" The name of the frei0r effect to load. If the environment variable \&\fB\s-1FREI0R_PATH\s0\fR is defined, the frei0r effect is searched for in each of the directories specified by the colon-separated list in \fB\s-1FREIOR_PATH\s0\fR. Otherwise, the standard frei0r paths are searched, in this order: \&\fI\s-1HOME/\s0.frei0r\-1/lib/\fR, \fI/usr/local/lib/frei0r\-1/\fR, \&\fI/usr/lib/frei0r\-1/\fR. .IP "\fBfilter_params\fR" 4 .IX Item "filter_params" A '|'\-separated list of parameters to pass to the frei0r effect. .PP A frei0r effect parameter can be a boolean (its value is either \&\*(L"y\*(R" or \*(L"n\*(R"), a double, a color (specified as \&\fIR\fR/\fIG\fR/\fIB\fR, where \fIR\fR, \fIG\fR, and \fIB\fR are floating point numbers between 0.0 and 1.0, inclusive) or by an \f(CW\*(C`av_parse_color()\*(C'\fR color description), a position (specified as \fIX\fR/\fIY\fR, where \&\fIX\fR and \fIY\fR are floating point numbers) and/or a string. .PP The number and types of parameters depend on the loaded effect. If an effect parameter is not specified, the default value is set. .PP Some examples: .PP .Vb 2 \& # Apply the distort0r effect, setting the first two double parameters \& frei0r=filter_name=distort0r:filter_params=0.5|0.01 \& \& # Apply the colordistance effect, taking a color as the first parameter \& frei0r=colordistance:0.2/0.3/0.4 \& frei0r=colordistance:violet \& frei0r=colordistance:0x112233 \& \& # Apply the perspective effect, specifying the top left and top right \& # image positions \& frei0r=perspective:0.2/0.2|0.8/0.2 .Ve .PP For more information, see <\fBhttp://piksel.org/frei0r\fR> .SS "gradfun" .IX Subsection "gradfun" Fix the banding artifacts that are sometimes introduced into nearly flat regions by truncation to 8bit colordepth. Interpolate the gradients that should go where the bands are, and dither them. .PP It is designed for playback only. Do not use it prior to lossy compression, because compression tends to lose the dither and bring back the bands. .PP It accepts the following parameters: .IP "\fBstrength\fR" 4 .IX Item "strength" The maximum amount by which the filter will change any one pixel. This is also the threshold for detecting nearly flat regions. Acceptable values range from \&.51 to 64; the default value is 1.2. Out-of-range values will be clipped to the valid range. .IP "\fBradius\fR" 4 .IX Item "radius" The neighborhood to fit the gradient to. A larger radius makes for smoother gradients, but also prevents the filter from modifying the pixels near detailed regions. Acceptable values are 8\-32; the default value is 16. Out-of-range values will be clipped to the valid range. .PP .Vb 2 \& # Default parameters \& gradfun=strength=1.2:radius=16 \& \& # Omitting the radius \& gradfun=1.2 .Ve .SS "hflip" .IX Subsection "hflip" Flip the input video horizontally. .PP For example, to horizontally flip the input video with \fBavconv\fR: .PP .Vb 1 \& avconv \-i in.avi \-vf "hflip" out.avi .Ve .SS "hqdn3d" .IX Subsection "hqdn3d" This is a high precision/quality 3d denoise filter. It aims to reduce image noise, producing smooth images and making still images really still. It should enhance compressibility. .PP It accepts the following optional parameters: .IP "\fBluma_spatial\fR" 4 .IX Item "luma_spatial" A non-negative floating point number which specifies spatial luma strength. It defaults to 4.0. .IP "\fBchroma_spatial\fR" 4 .IX Item "chroma_spatial" A non-negative floating point number which specifies spatial chroma strength. It defaults to 3.0*\fIluma_spatial\fR/4.0. .IP "\fBluma_tmp\fR" 4 .IX Item "luma_tmp" A floating point number which specifies luma temporal strength. It defaults to 6.0*\fIluma_spatial\fR/4.0. .IP "\fBchroma_tmp\fR" 4 .IX Item "chroma_tmp" A floating point number which specifies chroma temporal strength. It defaults to \&\fIluma_tmp\fR*\fIchroma_spatial\fR/\fIluma_spatial\fR. .SS "interlace" .IX Subsection "interlace" Simple interlacing filter from progressive contents. This interleaves upper (or lower) lines from odd frames with lower (or upper) lines from even frames, halving the frame rate and preserving image height. .PP .Vb 9 \& Original Original New Frame \& Frame \*(Aqj\*(Aq Frame \*(Aqj+1\*(Aq (tff) \& ========== =========== ================== \& Line 0 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> Frame \*(Aqj\*(Aq Line 0 \& Line 1 Line 1 \-\-\-\-> Frame \*(Aqj+1\*(Aq Line 1 \& Line 2 \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-> Frame \*(Aqj\*(Aq Line 2 \& Line 3 Line 3 \-\-\-\-> Frame \*(Aqj+1\*(Aq Line 3 \& ... ... ... \& New Frame + 1 will be generated by Frame \*(Aqj+2\*(Aq and Frame \*(Aqj+3\*(Aq and so on .Ve .PP It accepts the following optional parameters: .IP "\fBscan\fR" 4 .IX Item "scan" This determines whether the interlaced frame is taken from the even (tff \- default) or odd (bff) lines of the progressive frame. .IP "\fBlowpass\fR" 4 .IX Item "lowpass" Enable (default) or disable the vertical lowpass filter to avoid twitter interlacing and reduce moire patterns. .SS "lut, lutrgb, lutyuv" .IX Subsection "lut, lutrgb, lutyuv" Compute a look-up table for binding each pixel component input value to an output value, and apply it to the input video. .PP \&\fIlutyuv\fR applies a lookup table to a \s-1YUV\s0 input video, \fIlutrgb\fR to an \s-1RGB\s0 input video. .PP These filters accept the following parameters: .IP "\fIc0\fR \fB(first pixel component)\fR" 4 .IX Item "c0 (first pixel component)" .PD 0 .IP "\fIc1\fR \fB(second pixel component)\fR" 4 .IX Item "c1 (second pixel component)" .IP "\fIc2\fR \fB(third pixel component)\fR" 4 .IX Item "c2 (third pixel component)" .IP "\fIc3\fR \fB(fourth pixel component, corresponds to the alpha component)\fR" 4 .IX Item "c3 (fourth pixel component, corresponds to the alpha component)" .IP "\fIr\fR \fB(red component)\fR" 4 .IX Item "r (red component)" .IP "\fIg\fR \fB(green component)\fR" 4 .IX Item "g (green component)" .IP "\fIb\fR \fB(blue component)\fR" 4 .IX Item "b (blue component)" .IP "\fIa\fR \fB(alpha component)\fR" 4 .IX Item "a (alpha component)" .IP "\fIy\fR \fB(Y/luminance component)\fR" 4 .IX Item "y (Y/luminance component)" .IP "\fIu\fR \fB(U/Cb component)\fR" 4 .IX Item "u (U/Cb component)" .IP "\fIv\fR \fB(V/Cr component)\fR" 4 .IX Item "v (V/Cr component)" .PD .PP Each of them specifies the expression to use for computing the lookup table for the corresponding pixel component values. .PP The exact component associated to each of the \fIc*\fR options depends on the format in input. .PP The \fIlut\fR filter requires either \s-1YUV\s0 or \s-1RGB\s0 pixel formats in input, \&\fIlutrgb\fR requires \s-1RGB\s0 pixel formats in input, and \fIlutyuv\fR requires \s-1YUV.\s0 .PP The expressions can contain the following constants and functions: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBw, h\fR" 4 .IX Item "w, h" The input width and height. .IP "\fBval\fR" 4 .IX Item "val" The input value for the pixel component. .IP "\fBclipval\fR" 4 .IX Item "clipval" The input value, clipped to the \fIminval\fR\-\fImaxval\fR range. .IP "\fBmaxval\fR" 4 .IX Item "maxval" The maximum value for the pixel component. .IP "\fBminval\fR" 4 .IX Item "minval" The minimum value for the pixel component. .IP "\fBnegval\fR" 4 .IX Item "negval" The negated value for the pixel component value, clipped to the \&\fIminval\fR\-\fImaxval\fR range; it corresponds to the expression \&\*(L"maxval\-clipval+minval\*(R". .IP "\fBclip(val)\fR" 4 .IX Item "clip(val)" The computed value in \fIval\fR, clipped to the \&\fIminval\fR\-\fImaxval\fR range. .IP "\fBgammaval(gamma)\fR" 4 .IX Item "gammaval(gamma)" The computed gamma correction value of the pixel component value, clipped to the \fIminval\fR\-\fImaxval\fR range. It corresponds to the expression "pow((clipval\-minval)/(maxval\-minval),\fIgamma\fR)*(maxval\-minval)+minval" .PP All expressions default to \*(L"val\*(R". .PP Some examples: .PP .Vb 3 \& # Negate input video \& lutrgb="r=maxval+minval\-val:g=maxval+minval\-val:b=maxval+minval\-val" \& lutyuv="y=maxval+minval\-val:u=maxval+minval\-val:v=maxval+minval\-val" \& \& # The above is the same as \& lutrgb="r=negval:g=negval:b=negval" \& lutyuv="y=negval:u=negval:v=negval" \& \& # Negate luminance \& lutyuv=negval \& \& # Remove chroma components, turning the video into a graytone image \& lutyuv="u=128:v=128" \& \& # Apply a luma burning effect \& lutyuv="y=2*val" \& \& # Remove green and blue components \& lutrgb="g=0:b=0" \& \& # Set a constant alpha channel value on input \& format=rgba,lutrgb=a="maxval\-minval/2" \& \& # Correct luminance gamma by a factor of 0.5 \& lutyuv=y=gammaval(0.5) .Ve .SS "negate" .IX Subsection "negate" Negate input video. .PP It accepts an integer in input; if non-zero it negates the alpha component (if available). The default value in input is 0. .SS "noformat" .IX Subsection "noformat" Force libavfilter not to use any of the specified pixel formats for the input to the next filter. .PP It accepts the following parameters: .IP "\fBpix_fmts\fR" 4 .IX Item "pix_fmts" A '|'\-separated list of pixel format names, such as apix_fmts=yuv420p|monow|rgb24". .PP Some examples: .PP .Vb 3 \& # Force libavfilter to use a format different from "yuv420p" for the \& # input to the vflip filter \& noformat=pix_fmts=yuv420p,vflip \& \& # Convert the input video to any of the formats not contained in the list \& noformat=yuv420p|yuv444p|yuv410p .Ve .SS "null" .IX Subsection "null" Pass the video source unchanged to the output. .SS "ocv" .IX Subsection "ocv" Apply a video transform using libopencv. .PP To enable this filter, install the libopencv library and headers and configure Libav with \-\-enable\-libopencv. .PP It accepts the following parameters: .IP "\fBfilter_name\fR" 4 .IX Item "filter_name" The name of the libopencv filter to apply. .IP "\fBfilter_params\fR" 4 .IX Item "filter_params" The parameters to pass to the libopencv filter. If not specified, the default values are assumed. .PP Refer to the official libopencv documentation for more precise information: <\fBhttp://opencv.willowgarage.com/documentation/c/image_filtering.html\fR> .PP Several libopencv filters are supported; see the following subsections. .PP \fIdilate\fR .IX Subsection "dilate" .PP Dilate an image by using a specific structuring element. It corresponds to the libopencv function \f(CW\*(C`cvDilate\*(C'\fR. .PP It accepts the parameters: \fIstruct_el\fR|\fInb_iterations\fR. .PP \&\fIstruct_el\fR represents a structuring element, and has the syntax: \&\fIcols\fRx\fIrows\fR+\fIanchor_x\fRx\fIanchor_y\fR/\fIshape\fR .PP \&\fIcols\fR and \fIrows\fR represent the number of columns and rows of the structuring element, \fIanchor_x\fR and \fIanchor_y\fR the anchor point, and \fIshape\fR the shape for the structuring element. \fIshape\fR must be \*(L"rect\*(R", \*(L"cross\*(R", \*(L"ellipse\*(R", or \*(L"custom\*(R". .PP If the value for \fIshape\fR is \*(L"custom\*(R", it must be followed by a string of the form "=\fIfilename\fR". The file with name \&\fIfilename\fR is assumed to represent a binary image, with each printable character corresponding to a bright pixel. When a custom \&\fIshape\fR is used, \fIcols\fR and \fIrows\fR are ignored, the number or columns and rows of the read file are assumed instead. .PP The default value for \fIstruct_el\fR is \*(L"3x3+0x0/rect\*(R". .PP \&\fInb_iterations\fR specifies the number of times the transform is applied to the image, and defaults to 1. .PP Some examples: .PP .Vb 2 \& # Use the default values \& ocv=dilate \& \& # Dilate using a structuring element with a 5x5 cross, iterating two times \& ocv=filter_name=dilate:filter_params=5x5+2x2/cross|2 \& \& # Read the shape from the file diamond.shape, iterating two times. \& # The file diamond.shape may contain a pattern of characters like this \& # * \& # *** \& # ***** \& # *** \& # * \& # The specified columns and rows are ignored \& # but the anchor point coordinates are not \& ocv=dilate:0x0+2x2/custom=diamond.shape|2 .Ve .PP \fIerode\fR .IX Subsection "erode" .PP Erode an image by using a specific structuring element. It corresponds to the libopencv function \f(CW\*(C`cvErode\*(C'\fR. .PP It accepts the parameters: \fIstruct_el\fR:\fInb_iterations\fR, with the same syntax and semantics as the dilate filter. .PP \fIsmooth\fR .IX Subsection "smooth" .PP Smooth the input video. .PP The filter takes the following parameters: \&\fItype\fR|\fIparam1\fR|\fIparam2\fR|\fIparam3\fR|\fIparam4\fR. .PP \&\fItype\fR is the type of smooth filter to apply, and must be one of the following values: \*(L"blur\*(R", \*(L"blur_no_scale\*(R", \*(L"median\*(R", \*(L"gaussian\*(R", or \*(L"bilateral\*(R". The default value is \*(L"gaussian\*(R". .PP The meaning of \fIparam1\fR, \fIparam2\fR, \fIparam3\fR, and \fIparam4\fR depend on the smooth type. \fIparam1\fR and \&\fIparam2\fR accept integer positive values or 0. \fIparam3\fR and \&\fIparam4\fR accept floating point values. .PP The default value for \fIparam1\fR is 3. The default value for the other parameters is 0. .PP These parameters correspond to the parameters assigned to the libopencv function \f(CW\*(C`cvSmooth\*(C'\fR. .SS "overlay" .IX Subsection "overlay" Overlay one video on top of another. .PP It takes two inputs and has one output. The first input is the \*(L"main\*(R" video on which the second input is overlayed. .PP It accepts the following parameters: .IP "\fBx\fR" 4 .IX Item "x" The horizontal position of the left edge of the overlaid video on the main video. .IP "\fBy\fR" 4 .IX Item "y" The vertical position of the top edge of the overlaid video on the main video. .PP The parameters are expressions containing the following parameters: .IP "\fBmain_w, main_h\fR" 4 .IX Item "main_w, main_h" The main input width and height. .IP "\fBW, H\fR" 4 .IX Item "W, H" These are the same as \fImain_w\fR and \fImain_h\fR. .IP "\fBoverlay_w, overlay_h\fR" 4 .IX Item "overlay_w, overlay_h" The overlay input width and height. .IP "\fBw, h\fR" 4 .IX Item "w, h" These are the same as \fIoverlay_w\fR and \fIoverlay_h\fR. .IP "\fBeof_action\fR" 4 .IX Item "eof_action" The action to take when \s-1EOF\s0 is encountered on the secondary input; it accepts one of the following values: .RS 4 .IP "\fBrepeat\fR" 4 .IX Item "repeat" Repeat the last frame (the default). .IP "\fBendall\fR" 4 .IX Item "endall" End both streams. .IP "\fBpass\fR" 4 .IX Item "pass" Pass the main input through. .RE .RS 4 .RE .PP Be aware that frames are taken from each input video in timestamp order, hence, if their initial timestamps differ, it is a a good idea to pass the two inputs through a \fIsetpts=PTS\-STARTPTS\fR filter to have them begin in the same zero timestamp, as the example for the \fImovie\fR filter does. .PP Some examples: .PP .Vb 3 \& # Draw the overlay at 10 pixels from the bottom right \& # corner of the main video \& overlay=x=main_w\-overlay_w\-10:y=main_h\-overlay_h\-10 \& \& # Insert a transparent PNG logo in the bottom left corner of the input \& avconv \-i input \-i logo \-filter_complex \*(Aqoverlay=x=10:y=main_h\-overlay_h\-10\*(Aq output \& \& # Insert 2 different transparent PNG logos (second logo on bottom \& # right corner) \& avconv \-i input \-i logo1 \-i logo2 \-filter_complex \& \*(Aqoverlay=x=10:y=H\-h\-10,overlay=x=W\-w\-10:y=H\-h\-10\*(Aq output \& \& # Add a transparent color layer on top of the main video; \& # WxH specifies the size of the main input to the overlay filter \& color=red.3:WxH [over]; [in][over] overlay [out] \& \& # Mask 10\-20 seconds of a video by applying the delogo filter to a section \& avconv \-i test.avi \-codec:v:0 wmv2 \-ar 11025 \-b:v 9000k \& \-vf \*(Aq[in]split[split_main][split_delogo];[split_delogo]trim=start=360:end=371,delogo=0:0:640:480[delogoed];[split_main][delogoed]overlay=eof_action=pass[out]\*(Aq \& masked.avi .Ve .PP You can chain together more overlays but the efficiency of such approach is yet to be tested. .SS "pad" .IX Subsection "pad" Add paddings to the input image, and place the original input at the provided \fIx\fR, \fIy\fR coordinates. .PP It accepts the following parameters: .IP "\fBwidth, height\fR" 4 .IX Item "width, height" Specify the size of the output image with the paddings added. If the value for \fIwidth\fR or \fIheight\fR is 0, the corresponding input size is used for the output. .Sp The \fIwidth\fR expression can reference the value set by the \&\fIheight\fR expression, and vice versa. .Sp The default value of \fIwidth\fR and \fIheight\fR is 0. .IP "\fBx, y\fR" 4 .IX Item "x, y" Specify the offsets to place the input image at within the padded area, with respect to the top/left border of the output image. .Sp The \fIx\fR expression can reference the value set by the \fIy\fR expression, and vice versa. .Sp The default value of \fIx\fR and \fIy\fR is 0. .IP "\fBcolor\fR" 4 .IX Item "color" Specify the color of the padded area. It can be the name of a color (case insensitive match) or an 0xRRGGBB[\s-1AA\s0] sequence. .Sp The default value of \fIcolor\fR is \*(L"black\*(R". .PP The parameters \fIwidth\fR, \fIheight\fR, \fIx\fR, and \fIy\fR are expressions containing the following constants: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBin_w, in_h\fR" 4 .IX Item "in_w, in_h" The input video width and height. .IP "\fBiw, ih\fR" 4 .IX Item "iw, ih" These are the same as \fIin_w\fR and \fIin_h\fR. .IP "\fBout_w, out_h\fR" 4 .IX Item "out_w, out_h" The output width and height (the size of the padded area), as specified by the \fIwidth\fR and \fIheight\fR expressions. .IP "\fBow, oh\fR" 4 .IX Item "ow, oh" These are the same as \fIout_w\fR and \fIout_h\fR. .IP "\fBx, y\fR" 4 .IX Item "x, y" The x and y offsets as specified by the \fIx\fR and \fIy\fR expressions, or \s-1NAN\s0 if not yet specified. .IP "\fBa\fR" 4 .IX Item "a" The input display aspect ratio, same as \fIiw\fR / \fIih\fR. .IP "\fBhsub, vsub\fR" 4 .IX Item "hsub, vsub" The horizontal and vertical chroma subsample values. For example for the pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1. .PP Some examples: .PP .Vb 4 \& # Add paddings with the color "violet" to the input video. The output video \& # size is 640x480, and the top\-left corner of the input video is placed at \& # column 0, row 40 \& pad=width=640:height=480:x=0:y=40:color=violet \& \& # Pad the input to get an output with dimensions increased by 3/2, \& # and put the input video at the center of the padded area \& pad="3/2*iw:3/2*ih:(ow\-iw)/2:(oh\-ih)/2" \& \& # Pad the input to get a squared output with size equal to the maximum \& # value between the input width and height, and put the input video at \& # the center of the padded area \& pad="max(iw,ih):ow:(ow\-iw)/2:(oh\-ih)/2" \& \& # Pad the input to get a final w/h ratio of 16:9 \& pad="ih*16/9:ih:(ow\-iw)/2:(oh\-ih)/2" \& \& # Double the output size and put the input video in the bottom\-right \& # corner of the output padded area \& pad="2*iw:2*ih:ow\-iw:oh\-ih" .Ve .SS "pixdesctest" .IX Subsection "pixdesctest" Pixel format descriptor test filter, mainly useful for internal testing. The output video should be equal to the input video. .PP For example: .PP .Vb 1 \& format=monow, pixdesctest .Ve .PP can be used to test the monowhite pixel format descriptor definition. .SS "scale" .IX Subsection "scale" Scale the input video and/or convert the image format. .PP It accepts the following parameters: .IP "\fBw\fR" 4 .IX Item "w" The output video width. .IP "\fBh\fR" 4 .IX Item "h" The output video height. .PP The parameters \fIw\fR and \fIh\fR are expressions containing the following constants: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBin_w, in_h\fR" 4 .IX Item "in_w, in_h" The input width and height. .IP "\fBiw, ih\fR" 4 .IX Item "iw, ih" These are the same as \fIin_w\fR and \fIin_h\fR. .IP "\fBout_w, out_h\fR" 4 .IX Item "out_w, out_h" The output (cropped) width and height. .IP "\fBow, oh\fR" 4 .IX Item "ow, oh" These are the same as \fIout_w\fR and \fIout_h\fR. .IP "\fBa\fR" 4 .IX Item "a" This is the same as \fIiw\fR / \fIih\fR. .IP "\fBsar\fR" 4 .IX Item "sar" input sample aspect ratio .IP "\fBdar\fR" 4 .IX Item "dar" The input display aspect ratio; it is the same as (\fIiw\fR / \fIih\fR) * \fIsar\fR. .IP "\fBhsub, vsub\fR" 4 .IX Item "hsub, vsub" The horizontal and vertical chroma subsample values. For example, for the pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1. .PP If the input image format is different from the format requested by the next filter, the scale filter will convert the input to the requested format. .PP If the value for \fIw\fR or \fIh\fR is 0, the respective input size is used for the output. .PP If the value for \fIw\fR or \fIh\fR is \-1, the scale filter will use, for the respective output size, a value that maintains the aspect ratio of the input image. .PP The default value of \fIw\fR and \fIh\fR is 0. .PP Some examples: .PP .Vb 2 \& # Scale the input video to a size of 200x100 \& scale=w=200:h=100 \& \& # Scale the input to 2x \& scale=w=2*iw:h=2*ih \& # The above is the same as \& scale=2*in_w:2*in_h \& \& # Scale the input to half the original size \& scale=w=iw/2:h=ih/2 \& \& # Increase the width, and set the height to the same size \& scale=3/2*iw:ow \& \& # Seek Greek harmony \& scale=iw:1/PHI*iw \& scale=ih*PHI:ih \& \& # Increase the height, and set the width to 3/2 of the height \& scale=w=3/2*oh:h=3/5*ih \& \& # Increase the size, making the size a multiple of the chroma \& scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub" \& \& # Increase the width to a maximum of 500 pixels, \& # keeping the same aspect ratio as the input \& scale=w=\*(Aqmin(500, iw*3/2):h=\-1\*(Aq .Ve .SS "select" .IX Subsection "select" Select frames to pass in output. .PP It accepts the following parameters: .IP "\fBexpr\fR" 4 .IX Item "expr" An expression, which is evaluated for each input frame. If the expression is evaluated to a non-zero value, the frame is selected and passed to the output, otherwise it is discarded. .PP The expression can contain the following constants: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBn\fR" 4 .IX Item "n" The (sequential) number of the filtered frame, starting from 0. .IP "\fBselected_n\fR" 4 .IX Item "selected_n" The (sequential) number of the selected frame, starting from 0. .IP "\fBprev_selected_n\fR" 4 .IX Item "prev_selected_n" The sequential number of the last selected frame. It's \s-1NAN\s0 if undefined. .IP "\fB\s-1TB\s0\fR" 4 .IX Item "TB" The timebase of the input timestamps. .IP "\fBpts\fR" 4 .IX Item "pts" The \s-1PTS \s0(Presentation TimeStamp) of the filtered video frame, expressed in \fI\s-1TB\s0\fR units. It's \s-1NAN\s0 if undefined. .IP "\fBt\fR" 4 .IX Item "t" The \s-1PTS\s0 of the filtered video frame, expressed in seconds. It's \s-1NAN\s0 if undefined. .IP "\fBprev_pts\fR" 4 .IX Item "prev_pts" The \s-1PTS\s0 of the previously filtered video frame. It's \s-1NAN\s0 if undefined. .IP "\fBprev_selected_pts\fR" 4 .IX Item "prev_selected_pts" The \s-1PTS\s0 of the last previously filtered video frame. It's \s-1NAN\s0 if undefined. .IP "\fBprev_selected_t\fR" 4 .IX Item "prev_selected_t" The \s-1PTS\s0 of the last previously selected video frame. It's \s-1NAN\s0 if undefined. .IP "\fBstart_pts\fR" 4 .IX Item "start_pts" The \s-1PTS\s0 of the first video frame in the video. It's \s-1NAN\s0 if undefined. .IP "\fBstart_t\fR" 4 .IX Item "start_t" The time of the first video frame in the video. It's \s-1NAN\s0 if undefined. .IP "\fBpict_type\fR" 4 .IX Item "pict_type" The type of the filtered frame. It can assume one of the following values: .RS 4 .IP "\fBI\fR" 4 .IX Item "I" .PD 0 .IP "\fBP\fR" 4 .IX Item "P" .IP "\fBB\fR" 4 .IX Item "B" .IP "\fBS\fR" 4 .IX Item "S" .IP "\fB\s-1SI\s0\fR" 4 .IX Item "SI" .IP "\fB\s-1SP\s0\fR" 4 .IX Item "SP" .IP "\fB\s-1BI\s0\fR" 4 .IX Item "BI" .RE .RS 4 .RE .IP "\fBinterlace_type\fR" 4 .IX Item "interlace_type" .PD The frame interlace type. It can assume one of the following values: .RS 4 .IP "\fB\s-1PROGRESSIVE\s0\fR" 4 .IX Item "PROGRESSIVE" The frame is progressive (not interlaced). .IP "\fB\s-1TOPFIRST\s0\fR" 4 .IX Item "TOPFIRST" The frame is top-field-first. .IP "\fB\s-1BOTTOMFIRST\s0\fR" 4 .IX Item "BOTTOMFIRST" The frame is bottom-field-first. .RE .RS 4 .RE .IP "\fBkey\fR" 4 .IX Item "key" This is 1 if the filtered frame is a key-frame, 0 otherwise. .PP The default value of the select expression is \*(L"1\*(R". .PP Some examples: .PP .Vb 2 \& # Select all the frames in input \& select \& \& # The above is the same as \& select=expr=1 \& \& # Skip all frames \& select=expr=0 \& \& # Select only I\-frames \& select=\*(Aqexpr=eq(pict_type,I)\*(Aq \& \& # Select one frame per 100 \& select=\*(Aqnot(mod(n,100))\*(Aq \& \& # Select only frames contained in the 10\-20 time interval \& select=\*(Aqgte(t,10)*lte(t,20)\*(Aq \& \& # Select only I frames contained in the 10\-20 time interval \& select=\*(Aqgte(t,10)*lte(t,20)*eq(pict_type,I)\*(Aq \& \& # Select frames with a minimum distance of 10 seconds \& select=\*(Aqisnan(prev_selected_t)+gte(t\-prev_selected_t,10)\*(Aq .Ve .SS "setdar" .IX Subsection "setdar" Set the Display Aspect Ratio for the filter output video. .PP This is done by changing the specified Sample (aka Pixel) Aspect Ratio, according to the following equation: \&\s-1DAR\s0 = \s-1HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION\s0 * \s-1SAR\s0 .PP Keep in mind that this filter does not modify the pixel dimensions of the video frame. Also, the display aspect ratio set by this filter may be changed by later filters in the filterchain, e.g. in case of scaling or if another \*(L"setdar\*(R" or a \*(L"setsar\*(R" filter is applied. .PP It accepts the following parameters: .IP "\fBdar\fR" 4 .IX Item "dar" The output display aspect ratio. .PP The parameter \fIdar\fR is an expression containing the following constants: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBw, h\fR" 4 .IX Item "w, h" The input width and height. .IP "\fBa\fR" 4 .IX Item "a" This is the same as \fIw\fR / \fIh\fR. .IP "\fBsar\fR" 4 .IX Item "sar" The input sample aspect ratio. .IP "\fBdar\fR" 4 .IX Item "dar" The input display aspect ratio. It is the same as (\fIw\fR / \fIh\fR) * \fIsar\fR. .IP "\fBhsub, vsub\fR" 4 .IX Item "hsub, vsub" The horizontal and vertical chroma subsample values. For example, for the pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1. .PP To change the display aspect ratio to 16:9, specify: .PP .Vb 3 \& setdar=dar=16/9 \& # The above is equivalent to \& setdar=dar=1.77777 .Ve .PP Also see the the setsar filter documentation. .SS "setpts" .IX Subsection "setpts" Change the \s-1PTS \s0(presentation timestamp) of the input video frames. .PP It accepts the following parameters: .IP "\fBexpr\fR" 4 .IX Item "expr" The expression which is evaluated for each frame to construct its timestamp. .PP The expression is evaluated through the eval \s-1API\s0 and can contain the following constants: .IP "\fB\s-1PTS\s0\fR" 4 .IX Item "PTS" The presentation timestamp in input. .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBN\fR" 4 .IX Item "N" The count of the input frame, starting from 0. .IP "\fB\s-1STARTPTS\s0\fR" 4 .IX Item "STARTPTS" The \s-1PTS\s0 of the first video frame. .IP "\fB\s-1INTERLACED\s0\fR" 4 .IX Item "INTERLACED" State whether the current frame is interlaced. .IP "\fB\s-1PREV_INPTS\s0\fR" 4 .IX Item "PREV_INPTS" The previous input \s-1PTS.\s0 .IP "\fB\s-1PREV_OUTPTS\s0\fR" 4 .IX Item "PREV_OUTPTS" The previous output \s-1PTS.\s0 .IP "\fB\s-1RTCTIME\s0\fR" 4 .IX Item "RTCTIME" The wallclock (\s-1RTC\s0) time in microseconds. .IP "\fB\s-1RTCSTART\s0\fR" 4 .IX Item "RTCSTART" The wallclock (\s-1RTC\s0) time at the start of the movie in microseconds. .IP "\fB\s-1TB\s0\fR" 4 .IX Item "TB" The timebase of the input timestamps. .PP Some examples: .PP .Vb 2 \& # Start counting the PTS from zero \& setpts=expr=PTS\-STARTPTS \& \& # Fast motion \& setpts=expr=0.5*PTS \& \& # Slow motion \& setpts=2.0*PTS \& \& # Fixed rate 25 fps \& setpts=N/(25*TB) \& \& # Fixed rate 25 fps with some jitter \& setpts=\*(Aq1/(25*TB) * (N + 0.05 * sin(N*2*PI/25))\*(Aq \& \& # Generate timestamps from a "live source" and rebase onto the current timebase \& setpts=\*(Aq(RTCTIME \- RTCSTART) / (TB * 1000000)" .Ve .SS "setsar" .IX Subsection "setsar" Set the Sample (aka Pixel) Aspect Ratio for the filter output video. .PP Note that as a consequence of the application of this filter, the output display aspect ratio will change according to the following equation: \&\s-1DAR\s0 = \s-1HORIZONTAL_RESOLUTION / VERTICAL_RESOLUTION\s0 * \s-1SAR\s0 .PP Keep in mind that the sample aspect ratio set by this filter may be changed by later filters in the filterchain, e.g. if another \*(L"setsar\*(R" or a \*(L"setdar\*(R" filter is applied. .PP It accepts the following parameters: .IP "\fBsar\fR" 4 .IX Item "sar" The output sample aspect ratio. .PP The parameter \fIsar\fR is an expression containing the following constants: .IP "\fBE, \s-1PI, PHI\s0\fR" 4 .IX Item "E, PI, PHI" These are approximated values for the mathematical constants e (Euler's number), pi (Greek pi), and phi (the golden ratio). .IP "\fBw, h\fR" 4 .IX Item "w, h" The input width and height. .IP "\fBa\fR" 4 .IX Item "a" These are the same as \fIw\fR / \fIh\fR. .IP "\fBsar\fR" 4 .IX Item "sar" The input sample aspect ratio. .IP "\fBdar\fR" 4 .IX Item "dar" The input display aspect ratio. It is the same as (\fIw\fR / \fIh\fR) * \fIsar\fR. .IP "\fBhsub, vsub\fR" 4 .IX Item "hsub, vsub" Horizontal and vertical chroma subsample values. For example, for the pixel format \*(L"yuv422p\*(R" \fIhsub\fR is 2 and \fIvsub\fR is 1. .PP To change the sample aspect ratio to 10:11, specify: .PP .Vb 1 \& setsar=sar=10/11 .Ve .SS "settb" .IX Subsection "settb" Set the timebase to use for the output frames timestamps. It is mainly useful for testing timebase configuration. .PP It accepts the following parameters: .IP "\fBexpr\fR" 4 .IX Item "expr" The expression which is evaluated into the output timebase. .PP The expression can contain the constants \*(L"\s-1PI\*(R", \*(L"E\*(R", \*(L"PHI\*(R", \*(L"AVTB\*(R" \s0(the default timebase), and \*(L"intb\*(R" (the input timebase). .PP The default value for the input is \*(L"intb\*(R". .PP Some examples: .PP .Vb 2 \& # Set the timebase to 1/25 \& settb=expr=1/25 \& \& # Set the timebase to 1/10 \& settb=expr=0.1 \& \& # Set the timebase to 1001/1000 \& settb=1+0.001 \& \& #Set the timebase to 2*intb \& settb=2*intb \& \& #Set the default timebase value \& settb=AVTB .Ve .SS "showinfo" .IX Subsection "showinfo" Show a line containing various information for each input video frame. The input video is not modified. .PP The shown line contains a sequence of key/value pairs of the form \&\fIkey\fR:\fIvalue\fR. .PP It accepts the following parameters: .IP "\fBn\fR" 4 .IX Item "n" The (sequential) number of the input frame, starting from 0. .IP "\fBpts\fR" 4 .IX Item "pts" The Presentation TimeStamp of the input frame, expressed as a number of time base units. The time base unit depends on the filter input pad. .IP "\fBpts_time\fR" 4 .IX Item "pts_time" The Presentation TimeStamp of the input frame, expressed as a number of seconds. .IP "\fBpos\fR" 4 .IX Item "pos" The position of the frame in the input stream, or \-1 if this information is unavailable and/or meaningless (for example in case of synthetic video). .IP "\fBfmt\fR" 4 .IX Item "fmt" The pixel format name. .IP "\fBsar\fR" 4 .IX Item "sar" The sample aspect ratio of the input frame, expressed in the form \&\fInum\fR/\fIden\fR. .IP "\fBs\fR" 4 .IX Item "s" The size of the input frame, expressed in the form \&\fIwidth\fRx\fIheight\fR. .IP "\fBi\fR" 4 .IX Item "i" The type of interlaced mode (\*(L"P\*(R" for \*(L"progressive\*(R", \*(L"T\*(R" for top field first, \*(L"B\*(R" for bottom field first). .IP "\fBiskey\fR" 4 .IX Item "iskey" This is 1 if the frame is a key frame, 0 otherwise. .IP "\fBtype\fR" 4 .IX Item "type" The picture type of the input frame (\*(L"I\*(R" for an I\-frame, \*(L"P\*(R" for a P\-frame, \*(L"B\*(R" for a B\-frame, or \*(L"?\*(R" for an unknown type). Also refer to the documentation of the \f(CW\*(C`AVPictureType\*(C'\fR enum and of the \f(CW\*(C`av_get_picture_type_char\*(C'\fR function defined in \&\fIlibavutil/avutil.h\fR. .IP "\fBchecksum\fR" 4 .IX Item "checksum" The Adler\-32 checksum of all the planes of the input frame. .IP "\fBplane_checksum\fR" 4 .IX Item "plane_checksum" The Adler\-32 checksum of each plane of the input frame, expressed in the form "[\fIc0\fR \fIc1\fR \fIc2\fR \fIc3\fR]". .SS "shuffleplanes" .IX Subsection "shuffleplanes" Reorder and/or duplicate video planes. .PP It accepts the following parameters: .IP "\fBmap0\fR" 4 .IX Item "map0" The index of the input plane to be used as the first output plane. .IP "\fBmap1\fR" 4 .IX Item "map1" The index of the input plane to be used as the second output plane. .IP "\fBmap2\fR" 4 .IX Item "map2" The index of the input plane to be used as the third output plane. .IP "\fBmap3\fR" 4 .IX Item "map3" The index of the input plane to be used as the fourth output plane. .PP The first plane has the index 0. The default is to keep the input unchanged. .PP Swap the second and third planes of the input: .PP .Vb 1 \& avconv \-i INPUT \-vf shuffleplanes=0:2:1:3 OUTPUT .Ve .SS "split" .IX Subsection "split" Split input video into several identical outputs. .PP It accepts a single parameter, which specifies the number of outputs. If unspecified, it defaults to 2. .PP Create 5 copies of the input video: .PP .Vb 1 \& avconv \-i INPUT \-filter_complex split=5 OUTPUT .Ve .SS "transpose" .IX Subsection "transpose" Transpose rows with columns in the input video and optionally flip it. .PP It accepts the following parameters: .IP "\fBdir\fR" 4 .IX Item "dir" The direction of the transpose. .PP The direction can assume the following values: .IP "\fBcclock_flip\fR" 4 .IX Item "cclock_flip" Rotate by 90 degrees counterclockwise and vertically flip (default), that is: .Sp .Vb 3 \& L.R L.l \& . . \-> . . \& l.r R.r .Ve .IP "\fBclock\fR" 4 .IX Item "clock" Rotate by 90 degrees clockwise, that is: .Sp .Vb 3 \& L.R l.L \& . . \-> . . \& l.r r.R .Ve .IP "\fBcclock\fR" 4 .IX Item "cclock" Rotate by 90 degrees counterclockwise, that is: .Sp .Vb 3 \& L.R R.r \& . . \-> . . \& l.r L.l .Ve .IP "\fBclock_flip\fR" 4 .IX Item "clock_flip" Rotate by 90 degrees clockwise and vertically flip, that is: .Sp .Vb 3 \& L.R r.R \& . . \-> . . \& l.r l.L .Ve .SS "trim" .IX Subsection "trim" Trim the input so that the output contains one continuous subpart of the input. .PP It accepts the following parameters: .IP "\fBstart\fR" 4 .IX Item "start" The timestamp (in seconds) of the start of the kept section. The frame with the timestamp \fIstart\fR will be the first frame in the output. .IP "\fBend\fR" 4 .IX Item "end" The timestamp (in seconds) of the first frame that will be dropped. The frame immediately preceding the one with the timestamp \fIend\fR will be the last frame in the output. .IP "\fBstart_pts\fR" 4 .IX Item "start_pts" This is the same as \fIstart\fR, except this option sets the start timestamp in timebase units instead of seconds. .IP "\fBend_pts\fR" 4 .IX Item "end_pts" This is the same as \fIend\fR, except this option sets the end timestamp in timebase units instead of seconds. .IP "\fBduration\fR" 4 .IX Item "duration" The maximum duration of the output in seconds. .IP "\fBstart_frame\fR" 4 .IX Item "start_frame" The number of the first frame that should be passed to the output. .IP "\fBend_frame\fR" 4 .IX Item "end_frame" The number of the first frame that should be dropped. .PP Note that the first two sets of the start/end options and the \fBduration\fR option look at the frame timestamp, while the _frame variants simply count the frames that pass through the filter. Also note that this filter does not modify the timestamps. If you wish for the output timestamps to start at zero, insert a setpts filter after the trim filter. .PP If multiple start or end options are set, this filter tries to be greedy and keep all the frames that match at least one of the specified constraints. To keep only the part that matches all the constraints at once, chain multiple trim filters. .PP The defaults are such that all the input is kept. So it is possible to set e.g. just the end values to keep everything before the specified time. .PP Examples: .IP "\(bu" 4 Drop everything except the second minute of input: .Sp .Vb 1 \& avconv \-i INPUT \-vf trim=60:120 .Ve .IP "\(bu" 4 Keep only the first second: .Sp .Vb 1 \& avconv \-i INPUT \-vf trim=duration=1 .Ve .SS "unsharp" .IX Subsection "unsharp" Sharpen or blur the input video. .PP It accepts the following parameters: .IP "\fBluma_msize_x\fR" 4 .IX Item "luma_msize_x" Set the luma matrix horizontal size. It must be an integer between 3 and 13. The default value is 5. .IP "\fBluma_msize_y\fR" 4 .IX Item "luma_msize_y" Set the luma matrix vertical size. It must be an integer between 3 and 13. The default value is 5. .IP "\fBluma_amount\fR" 4 .IX Item "luma_amount" Set the luma effect strength. It must be a floating point number between \-2.0 and 5.0. The default value is 1.0. .IP "\fBchroma_msize_x\fR" 4 .IX Item "chroma_msize_x" Set the chroma matrix horizontal size. It must be an integer between 3 and 13. The default value is 5. .IP "\fBchroma_msize_y\fR" 4 .IX Item "chroma_msize_y" Set the chroma matrix vertical size. It must be an integer between 3 and 13. The default value is 5. .IP "\fBchroma_amount\fR" 4 .IX Item "chroma_amount" Set the chroma effect strength. It must be a floating point number between \-2.0 and 5.0. The default value is 0.0. .PP Negative values for the amount will blur the input video, while positive values will sharpen. All parameters are optional and default to the equivalent of the string '5:5:1.0:5:5:0.0'. .PP .Vb 2 \& # Strong luma sharpen effect parameters \& unsharp=luma_msize_x=7:luma_msize_y=7:luma_amount=2.5 \& \& # A strong blur of both luma and chroma parameters \& unsharp=7:7:\-2:7:7:\-2 \& \& # Use the default values with B \& ./avconv \-i in.avi \-vf "unsharp" out.mp4 .Ve .SS "vflip" .IX Subsection "vflip" Flip the input video vertically. .PP .Vb 1 \& ./avconv \-i in.avi \-vf "vflip" out.avi .Ve .SS "yadif" .IX Subsection "yadif" Deinterlace the input video (\*(L"yadif\*(R" means \*(L"yet another deinterlacing filter\*(R"). .PP It accepts the following parameters: .IP "\fBmode\fR" 4 .IX Item "mode" The interlacing mode to adopt. It accepts one of the following values: .RS 4 .IP "\fB0\fR" 4 .IX Item "0" Output one frame for each frame. .IP "\fB1\fR" 4 .IX Item "1" Output one frame for each field. .IP "\fB2\fR" 4 .IX Item "2" Like 0, but it skips the spatial interlacing check. .IP "\fB3\fR" 4 .IX Item "3" Like 1, but it skips the spatial interlacing check. .RE .RS 4 .Sp The default value is 0. .RE .IP "\fBparity\fR" 4 .IX Item "parity" The picture field parity assumed for the input interlaced video. It accepts one of the following values: .RS 4 .IP "\fB0\fR" 4 .IX Item "0" Assume the top field is first. .IP "\fB1\fR" 4 .IX Item "1" Assume the bottom field is first. .IP "\fB\-1\fR" 4 .IX Item "-1" Enable automatic detection of field parity. .RE .RS 4 .Sp The default value is \-1. If the interlacing is unknown or the decoder does not export this information, top field first will be assumed. .RE .IP "\fBauto\fR" 4 .IX Item "auto" Whether the deinterlacer should trust the interlaced flag and only deinterlace frames marked as interlaced. .RS 4 .IP "\fB0\fR" 4 .IX Item "0" Deinterlace all frames. .IP "\fB1\fR" 4 .IX Item "1" Only deinterlace frames marked as interlaced. .RE .RS 4 .Sp The default value is 0. .RE .PP Below is a description of the currently available video sources. .SS "buffer" .IX Subsection "buffer" Buffer video frames, and make them available to the filter chain. .PP This source is mainly intended for a programmatic use, in particular through the interface defined in \fIlibavfilter/vsrc_buffer.h\fR. .PP It accepts the following parameters: .IP "\fBwidth\fR" 4 .IX Item "width" The input video width. .IP "\fBheight\fR" 4 .IX Item "height" The input video height. .IP "\fBpix_fmt\fR" 4 .IX Item "pix_fmt" The name of the input video pixel format. .IP "\fBtime_base\fR" 4 .IX Item "time_base" The time base used for input timestamps. .IP "\fBsar\fR" 4 .IX Item "sar" The sample (pixel) aspect ratio of the input video. .PP For example: .PP .Vb 1 \& buffer=width=320:height=240:pix_fmt=yuv410p:time_base=1/24:sar=1 .Ve .PP will instruct the source to accept video frames with size 320x240 and with format \*(L"yuv410p\*(R", assuming 1/24 as the timestamps timebase and square pixels (1:1 sample aspect ratio). .SS "color" .IX Subsection "color" Provide an uniformly colored input. .PP It accepts the following parameters: .IP "\fBcolor\fR" 4 .IX Item "color" Specify the color of the source. It can be the name of a color (case insensitive match) or a 0xRRGGBB[\s-1AA\s0] sequence, possibly followed by an alpha specifier. The default value is \*(L"black\*(R". .IP "\fBsize\fR" 4 .IX Item "size" Specify the size of the sourced video, it may be a string of the form \&\fIwidth\fRx\fIheight\fR, or the name of a size abbreviation. The default value is \*(L"320x240\*(R". .IP "\fBframerate\fR" 4 .IX Item "framerate" Specify the frame rate of the sourced video, as the number of frames generated per second. It has to be a string in the format \&\fIframe_rate_num\fR/\fIframe_rate_den\fR, an integer number, a floating point number or a valid video frame rate abbreviation. The default value is \&\*(L"25\*(R". .PP The following graph description will generate a red source with an opacity of 0.2, with size \*(L"qcif\*(R" and a frame rate of 10 frames per second, which will be overlayed over the source connected to the pad with identifier \*(L"in\*(R": .PP .Vb 1 \& "color=red@0.2:qcif:10 [color]; [in][color] overlay [out]" .Ve .SS "movie" .IX Subsection "movie" Read a video stream from a movie container. .PP Note that this source is a hack that bypasses the standard input path. It can be useful in applications that do not support arbitrary filter graphs, but its use is discouraged in those that do. It should never be used with \&\fBavconv\fR; the \fB\-filter_complex\fR option fully replaces it. .PP It accepts the following parameters: .IP "\fBfilename\fR" 4 .IX Item "filename" The name of the resource to read (not necessarily a file; it can also be a device or a stream accessed through some protocol). .IP "\fBformat_name, f\fR" 4 .IX Item "format_name, f" Specifies the format assumed for the movie to read, and can be either the name of a container or an input device. If not specified, the format is guessed from \fImovie_name\fR or by probing. .IP "\fBseek_point, sp\fR" 4 .IX Item "seek_point, sp" Specifies the seek point in seconds. The frames will be output starting from this seek point. The parameter is evaluated with \&\f(CW\*(C`av_strtod\*(C'\fR, so the numerical value may be suffixed by an \s-1IS\s0 postfix. The default value is \*(L"0\*(R". .IP "\fBstream_index, si\fR" 4 .IX Item "stream_index, si" Specifies the index of the video stream to read. If the value is \-1, the most suitable video stream will be automatically selected. The default value is \*(L"\-1\*(R". .PP It allows overlaying a second video on top of the main input of a filtergraph, as shown in this graph: .PP .Vb 4 \& input \-\-\-\-\-\-\-\-\-\-\-> deltapts0 \-\-> overlay \-\-> output \& ^ \& | \& movie \-\-> scale\-\-> deltapts1 \-\-\-\-\-\-\-+ .Ve .PP Some examples: .PP .Vb 4 \& # Skip 3.2 seconds from the start of the AVI file in.avi, and overlay it \& # on top of the input labelled "in" \& movie=in.avi:seek_point=3.2, scale=180:\-1, setpts=PTS\-STARTPTS [movie]; \& [in] setpts=PTS\-STARTPTS, [movie] overlay=16:16 [out] \& \& # Read from a video4linux2 device, and overlay it on top of the input \& # labelled "in" \& movie=/dev/video0:f=video4linux2, scale=180:\-1, setpts=PTS\-STARTPTS [movie]; \& [in] setpts=PTS\-STARTPTS, [movie] overlay=16:16 [out] .Ve .SS "nullsrc" .IX Subsection "nullsrc" Null video source: never return images. It is mainly useful as a template and to be employed in analysis / debugging tools. .PP It accepts a string of the form \&\fIwidth\fR:\fIheight\fR:\fItimebase\fR as an optional parameter. .PP \&\fIwidth\fR and \fIheight\fR specify the size of the configured source. The default values of \fIwidth\fR and \fIheight\fR are respectively 352 and 288 (corresponding to the \s-1CIF\s0 size format). .PP \&\fItimebase\fR specifies an arithmetic expression representing a timebase. The expression can contain the constants \*(L"\s-1PI\*(R", \*(L"E\*(R", \*(L"PHI\*(R",\s0 and \&\*(L"\s-1AVTB\*(R" \s0(the default timebase), and defaults to the value \*(L"\s-1AVTB\*(R".\s0 .SS "frei0r_src" .IX Subsection "frei0r_src" Provide a frei0r source. .PP To enable compilation of this filter you need to install the frei0r header and configure Libav with \-\-enable\-frei0r. .PP This source accepts the following parameters: .IP "\fBsize\fR" 4 .IX Item "size" The size of the video to generate. It may be a string of the form \&\fIwidth\fRx\fIheight\fR or a frame size abbreviation. .IP "\fBframerate\fR" 4 .IX Item "framerate" The framerate of the generated video. It may be a string of the form \&\fInum\fR/\fIden\fR or a frame rate abbreviation. .IP "\fBfilter_name\fR" 4 .IX Item "filter_name" The name to the frei0r source to load. For more information regarding frei0r and how to set the parameters, read the frei0r section in the video filters documentation. .IP "\fBfilter_params\fR" 4 .IX Item "filter_params" A '|'\-separated list of parameters to pass to the frei0r source. .PP An example: .PP .Vb 3 \& # Generate a frei0r partik0l source with size 200x200 and framerate 10 \& # which is overlayed on the overlay filter main input \& frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay .Ve .SS "rgbtestsrc, testsrc" .IX Subsection "rgbtestsrc, testsrc" The \f(CW\*(C`rgbtestsrc\*(C'\fR source generates an \s-1RGB\s0 test pattern useful for detecting \s-1RGB\s0 vs \s-1BGR\s0 issues. You should see a red, green and blue stripe from top to bottom. .PP The \f(CW\*(C`testsrc\*(C'\fR source generates a test video pattern, showing a color pattern, a scrolling gradient and a timestamp. This is mainly intended for testing purposes. .PP The sources accept the following parameters: .IP "\fBsize, s\fR" 4 .IX Item "size, s" Specify the size of the sourced video, it may be a string of the form \&\fIwidth\fRx\fIheight\fR, or the name of a size abbreviation. The default value is \*(L"320x240\*(R". .IP "\fBrate, r\fR" 4 .IX Item "rate, r" Specify the frame rate of the sourced video, as the number of frames generated per second. It has to be a string in the format \&\fIframe_rate_num\fR/\fIframe_rate_den\fR, an integer number, a floating point number or a valid video frame rate abbreviation. The default value is \&\*(L"25\*(R". .IP "\fBsar\fR" 4 .IX Item "sar" Set the sample aspect ratio of the sourced video. .IP "\fBduration\fR" 4 .IX Item "duration" Set the video duration of the sourced video. The accepted syntax is: .Sp .Vb 2 \& [\-]HH[:MM[:SS[.m...]]] \& [\-]S+[.m...] .Ve .Sp Also see the the \f(CW\*(C`av_parse_time()\*(C'\fR function. .Sp If not specified, or the expressed duration is negative, the video is supposed to be generated forever. .PP For example the following: .PP .Vb 1 \& testsrc=duration=5.3:size=qcif:rate=10 .Ve .PP will generate a video with a duration of 5.3 seconds, with size 176x144 and a framerate of 10 frames per second. .PP Below is a description of the currently available video sinks. .SS "buffersink" .IX Subsection "buffersink" Buffer video frames, and make them available to the end of the filter graph. .PP This sink is intended for programmatic use through the interface defined in \&\fIlibavfilter/buffersink.h\fR. .SS "nullsink" .IX Subsection "nullsink" Null video sink: do absolutely nothing with the input video. It is mainly useful as a template and for use in analysis / debugging tools. .PP \&\fIavconv\fR\|(1), \fIavprobe\fR\|(1) and the Libav \s-1HTML\s0 documentation .PP The Libav developers