annotate ffmpeg/doc/ffserver.1 @ 13:844d341cf643 tip

Back up before ISMIR
author Yading Song <yading.song@eecs.qmul.ac.uk>
date Thu, 31 Oct 2013 13:17:06 +0000
parents 6840f77b83aa
children
rev   line source
yading@10 1 .\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.14)
yading@10 2 .\"
yading@10 3 .\" Standard preamble:
yading@10 4 .\" ========================================================================
yading@10 5 .de Sp \" Vertical space (when we can't use .PP)
yading@10 6 .if t .sp .5v
yading@10 7 .if n .sp
yading@10 8 ..
yading@10 9 .de Vb \" Begin verbatim text
yading@10 10 .ft CW
yading@10 11 .nf
yading@10 12 .ne \\$1
yading@10 13 ..
yading@10 14 .de Ve \" End verbatim text
yading@10 15 .ft R
yading@10 16 .fi
yading@10 17 ..
yading@10 18 .\" Set up some character translations and predefined strings. \*(-- will
yading@10 19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
yading@10 20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
yading@10 21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
yading@10 22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
yading@10 23 .\" nothing in troff, for use with C<>.
yading@10 24 .tr \(*W-
yading@10 25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
yading@10 26 .ie n \{\
yading@10 27 . ds -- \(*W-
yading@10 28 . ds PI pi
yading@10 29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
yading@10 30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
yading@10 31 . ds L" ""
yading@10 32 . ds R" ""
yading@10 33 . ds C` ""
yading@10 34 . ds C' ""
yading@10 35 'br\}
yading@10 36 .el\{\
yading@10 37 . ds -- \|\(em\|
yading@10 38 . ds PI \(*p
yading@10 39 . ds L" ``
yading@10 40 . ds R" ''
yading@10 41 'br\}
yading@10 42 .\"
yading@10 43 .\" Escape single quotes in literal strings from groff's Unicode transform.
yading@10 44 .ie \n(.g .ds Aq \(aq
yading@10 45 .el .ds Aq '
yading@10 46 .\"
yading@10 47 .\" If the F register is turned on, we'll generate index entries on stderr for
yading@10 48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
yading@10 49 .\" entries marked with X<> in POD. Of course, you'll have to process the
yading@10 50 .\" output yourself in some meaningful fashion.
yading@10 51 .ie \nF \{\
yading@10 52 . de IX
yading@10 53 . tm Index:\\$1\t\\n%\t"\\$2"
yading@10 54 ..
yading@10 55 . nr % 0
yading@10 56 . rr F
yading@10 57 .\}
yading@10 58 .el \{\
yading@10 59 . de IX
yading@10 60 ..
yading@10 61 .\}
yading@10 62 .\"
yading@10 63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
yading@10 64 .\" Fear. Run. Save yourself. No user-serviceable parts.
yading@10 65 . \" fudge factors for nroff and troff
yading@10 66 .if n \{\
yading@10 67 . ds #H 0
yading@10 68 . ds #V .8m
yading@10 69 . ds #F .3m
yading@10 70 . ds #[ \f1
yading@10 71 . ds #] \fP
yading@10 72 .\}
yading@10 73 .if t \{\
yading@10 74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
yading@10 75 . ds #V .6m
yading@10 76 . ds #F 0
yading@10 77 . ds #[ \&
yading@10 78 . ds #] \&
yading@10 79 .\}
yading@10 80 . \" simple accents for nroff and troff
yading@10 81 .if n \{\
yading@10 82 . ds ' \&
yading@10 83 . ds ` \&
yading@10 84 . ds ^ \&
yading@10 85 . ds , \&
yading@10 86 . ds ~ ~
yading@10 87 . ds /
yading@10 88 .\}
yading@10 89 .if t \{\
yading@10 90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
yading@10 91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
yading@10 92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
yading@10 93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
yading@10 94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
yading@10 95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
yading@10 96 .\}
yading@10 97 . \" troff and (daisy-wheel) nroff accents
yading@10 98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
yading@10 99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
yading@10 100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
yading@10 101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
yading@10 102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
yading@10 103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
yading@10 104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
yading@10 105 .ds ae a\h'-(\w'a'u*4/10)'e
yading@10 106 .ds Ae A\h'-(\w'A'u*4/10)'E
yading@10 107 . \" corrections for vroff
yading@10 108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
yading@10 109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
yading@10 110 . \" for low resolution devices (crt and lpr)
yading@10 111 .if \n(.H>23 .if \n(.V>19 \
yading@10 112 \{\
yading@10 113 . ds : e
yading@10 114 . ds 8 ss
yading@10 115 . ds o a
yading@10 116 . ds d- d\h'-1'\(ga
yading@10 117 . ds D- D\h'-1'\(hy
yading@10 118 . ds th \o'bp'
yading@10 119 . ds Th \o'LP'
yading@10 120 . ds ae ae
yading@10 121 . ds Ae AE
yading@10 122 .\}
yading@10 123 .rm #[ #] #H #V #F C
yading@10 124 .\" ========================================================================
yading@10 125 .\"
yading@10 126 .IX Title "FFSERVER 1"
yading@10 127 .TH FFSERVER 1 "2013-04-21" " " " "
yading@10 128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
yading@10 129 .\" way too many mistakes in technical documents.
yading@10 130 .if n .ad l
yading@10 131 .nh
yading@10 132 .SH "NAME"
yading@10 133 ffserver \- ffserver video server
yading@10 134 .SH "SYNOPSIS"
yading@10 135 .IX Header "SYNOPSIS"
yading@10 136 ffserver [\fIoptions\fR]
yading@10 137 .SH "DESCRIPTION"
yading@10 138 .IX Header "DESCRIPTION"
yading@10 139 \&\fBffserver\fR is a streaming server for both audio and video. It
yading@10 140 supports several live feeds, streaming from files and time shifting on
yading@10 141 live feeds (you can seek to positions in the past on each live feed,
yading@10 142 provided you specify a big enough feed storage in
yading@10 143 \&\fIffserver.conf\fR).
yading@10 144 .PP
yading@10 145 \&\fBffserver\fR receives prerecorded files or \s-1FFM\s0 streams from some
yading@10 146 \&\fBffmpeg\fR instance as input, then streams them over
yading@10 147 \&\s-1RTP/RTSP/HTTP\s0.
yading@10 148 .PP
yading@10 149 An \fBffserver\fR instance will listen on some port as specified
yading@10 150 in the configuration file. You can launch one or more instances of
yading@10 151 \&\fBffmpeg\fR and send one or more \s-1FFM\s0 streams to the port where
yading@10 152 ffserver is expecting to receive them. Alternately, you can make
yading@10 153 \&\fBffserver\fR launch such \fBffmpeg\fR instances at startup.
yading@10 154 .PP
yading@10 155 Input streams are called feeds, and each one is specified by a
yading@10 156 \&\f(CW\*(C`<Feed>\*(C'\fR section in the configuration file.
yading@10 157 .PP
yading@10 158 For each feed you can have different output streams in various
yading@10 159 formats, each one specified by a \f(CW\*(C`<Stream>\*(C'\fR section in the
yading@10 160 configuration file.
yading@10 161 .SS "Status stream"
yading@10 162 .IX Subsection "Status stream"
yading@10 163 ffserver supports an \s-1HTTP\s0 interface which exposes the current status
yading@10 164 of the server.
yading@10 165 .PP
yading@10 166 Simply point your browser to the address of the special status stream
yading@10 167 specified in the configuration file.
yading@10 168 .PP
yading@10 169 For example if you have:
yading@10 170 .PP
yading@10 171 .Vb 2
yading@10 172 \& <Stream status.html>
yading@10 173 \& Format status
yading@10 174 \&
yading@10 175 \& # Only allow local people to get the status
yading@10 176 \& ACL allow localhost
yading@10 177 \& ACL allow 192.168.0.0 192.168.255.255
yading@10 178 \& </Stream>
yading@10 179 .Ve
yading@10 180 .PP
yading@10 181 then the server will post a page with the status information when
yading@10 182 the special stream \fIstatus.html\fR is requested.
yading@10 183 .SS "What can this do?"
yading@10 184 .IX Subsection "What can this do?"
yading@10 185 When properly configured and running, you can capture video and audio in real
yading@10 186 time from a suitable capture card, and stream it out over the Internet to
yading@10 187 either Windows Media Player or RealAudio player (with some restrictions).
yading@10 188 .PP
yading@10 189 It can also stream from files, though that is currently broken. Very often, a
yading@10 190 web server can be used to serve up the files just as well.
yading@10 191 .PP
yading@10 192 It can stream prerecorded video from .ffm files, though it is somewhat tricky
yading@10 193 to make it work correctly.
yading@10 194 .SS "How do I make it work?"
yading@10 195 .IX Subsection "How do I make it work?"
yading@10 196 First, build the kit. It *really* helps to have installed \s-1LAME\s0 first. Then when
yading@10 197 you run the ffserver ./configure, make sure that you have the
yading@10 198 \&\f(CW\*(C`\-\-enable\-libmp3lame\*(C'\fR flag turned on.
yading@10 199 .PP
yading@10 200 \&\s-1LAME\s0 is important as it allows for streaming audio to Windows Media Player.
yading@10 201 Don't ask why the other audio types do not work.
yading@10 202 .PP
yading@10 203 As a simple test, just run the following two command lines where \s-1INPUTFILE\s0
yading@10 204 is some file which you can decode with ffmpeg:
yading@10 205 .PP
yading@10 206 .Vb 2
yading@10 207 \& ffserver \-f doc/ffserver.conf &
yading@10 208 \& ffmpeg \-i INPUTFILE http://localhost:8090/feed1.ffm
yading@10 209 .Ve
yading@10 210 .PP
yading@10 211 At this point you should be able to go to your Windows machine and fire up
yading@10 212 Windows Media Player (\s-1WMP\s0). Go to Open \s-1URL\s0 and enter
yading@10 213 .PP
yading@10 214 .Vb 1
yading@10 215 \& http://<linuxbox>:8090/test.asf
yading@10 216 .Ve
yading@10 217 .PP
yading@10 218 You should (after a short delay) see video and hear audio.
yading@10 219 .PP
yading@10 220 \&\s-1WARNING:\s0 trying to stream test1.mpg doesn't work with \s-1WMP\s0 as it tries to
yading@10 221 transfer the entire file before starting to play.
yading@10 222 The same is true of \s-1AVI\s0 files.
yading@10 223 .SS "What happens next?"
yading@10 224 .IX Subsection "What happens next?"
yading@10 225 You should edit the ffserver.conf file to suit your needs (in terms of
yading@10 226 frame rates etc). Then install ffserver and ffmpeg, write a script to start
yading@10 227 them up, and off you go.
yading@10 228 .SS "Troubleshooting"
yading@10 229 .IX Subsection "Troubleshooting"
yading@10 230 \fII don't hear any audio, but video is fine.\fR
yading@10 231 .IX Subsection "I don't hear any audio, but video is fine."
yading@10 232 .PP
yading@10 233 Maybe you didn't install \s-1LAME\s0, or got your ./configure statement wrong. Check
yading@10 234 the ffmpeg output to see if a line referring to \s-1MP3\s0 is present. If not, then
yading@10 235 your configuration was incorrect. If it is, then maybe your wiring is not
yading@10 236 set up correctly. Maybe the sound card is not getting data from the right
yading@10 237 input source. Maybe you have a really awful audio interface (like I do)
yading@10 238 that only captures in stereo and also requires that one channel be flipped.
yading@10 239 If you are one of these people, then export 'AUDIO_FLIP_LEFT=1' before
yading@10 240 starting ffmpeg.
yading@10 241 .PP
yading@10 242 \fIThe audio and video lose sync after a while.\fR
yading@10 243 .IX Subsection "The audio and video lose sync after a while."
yading@10 244 .PP
yading@10 245 Yes, they do.
yading@10 246 .PP
yading@10 247 \fIAfter a long while, the video update rate goes way down in \s-1WMP\s0.\fR
yading@10 248 .IX Subsection "After a long while, the video update rate goes way down in WMP."
yading@10 249 .PP
yading@10 250 Yes, it does. Who knows why?
yading@10 251 .PP
yading@10 252 \fI\s-1WMP\s0 6.4 behaves differently to \s-1WMP\s0 7.\fR
yading@10 253 .IX Subsection "WMP 6.4 behaves differently to WMP 7."
yading@10 254 .PP
yading@10 255 Yes, it does. Any thoughts on this would be gratefully received. These
yading@10 256 differences extend to embedding \s-1WMP\s0 into a web page. [There are two
yading@10 257 object IDs that you can use: The old one, which does not play well, and
yading@10 258 the new one, which does (both tested on the same system). However,
yading@10 259 I suspect that the new one is not available unless you have installed \s-1WMP\s0 7].
yading@10 260 .SS "What else can it do?"
yading@10 261 .IX Subsection "What else can it do?"
yading@10 262 You can replay video from .ffm files that was recorded earlier.
yading@10 263 However, there are a number of caveats, including the fact that the
yading@10 264 ffserver parameters must match the original parameters used to record the
yading@10 265 file. If they do not, then ffserver deletes the file before recording into it.
yading@10 266 (Now that I write this, it seems broken).
yading@10 267 .PP
yading@10 268 You can fiddle with many of the codec choices and encoding parameters, and
yading@10 269 there are a bunch more parameters that you cannot control. Post a message
yading@10 270 to the mailing list if there are some 'must have' parameters. Look in
yading@10 271 ffserver.conf for a list of the currently available controls.
yading@10 272 .PP
yading@10 273 It will automatically generate the \s-1ASX\s0 or \s-1RAM\s0 files that are often used
yading@10 274 in browsers. These files are actually redirections to the underlying \s-1ASF\s0
yading@10 275 or \s-1RM\s0 file. The reason for this is that the browser often fetches the
yading@10 276 entire file before starting up the external viewer. The redirection files
yading@10 277 are very small and can be transferred quickly. [The stream itself is
yading@10 278 often 'infinite' and thus the browser tries to download it and never
yading@10 279 finishes.]
yading@10 280 .SS "Tips"
yading@10 281 .IX Subsection "Tips"
yading@10 282 * When you connect to a live stream, most players (\s-1WMP\s0, \s-1RA\s0, etc) want to
yading@10 283 buffer a certain number of seconds of material so that they can display the
yading@10 284 signal continuously. However, ffserver (by default) starts sending data
yading@10 285 in realtime. This means that there is a pause of a few seconds while the
yading@10 286 buffering is being done by the player. The good news is that this can be
yading@10 287 cured by adding a '?buffer=5' to the end of the \s-1URL\s0. This means that the
yading@10 288 stream should start 5 seconds in the past \*(-- and so the first 5 seconds
yading@10 289 of the stream are sent as fast as the network will allow. It will then
yading@10 290 slow down to real time. This noticeably improves the startup experience.
yading@10 291 .PP
yading@10 292 You can also add a 'Preroll 15' statement into the ffserver.conf that will
yading@10 293 add the 15 second prebuffering on all requests that do not otherwise
yading@10 294 specify a time. In addition, ffserver will skip frames until a key_frame
yading@10 295 is found. This further reduces the startup delay by not transferring data
yading@10 296 that will be discarded.
yading@10 297 .PP
yading@10 298 * You may want to adjust the MaxBandwidth in the ffserver.conf to limit
yading@10 299 the amount of bandwidth consumed by live streams.
yading@10 300 .SS "Why does the ?buffer / Preroll stop working after a time?"
yading@10 301 .IX Subsection "Why does the ?buffer / Preroll stop working after a time?"
yading@10 302 It turns out that (on my machine at least) the number of frames successfully
yading@10 303 grabbed is marginally less than the number that ought to be grabbed. This
yading@10 304 means that the timestamp in the encoded data stream gets behind realtime.
yading@10 305 This means that if you say 'Preroll 10', then when the stream gets 10
yading@10 306 or more seconds behind, there is no Preroll left.
yading@10 307 .PP
yading@10 308 Fixing this requires a change in the internals of how timestamps are
yading@10 309 handled.
yading@10 310 .ie n .SS "Does the ""?date="" stuff work."
yading@10 311 .el .SS "Does the \f(CW?date=\fP stuff work."
yading@10 312 .IX Subsection "Does the ?date= stuff work."
yading@10 313 Yes (subject to the limitation outlined above). Also note that whenever you
yading@10 314 start ffserver, it deletes the ffm file (if any parameters have changed),
yading@10 315 thus wiping out what you had recorded before.
yading@10 316 .PP
yading@10 317 The format of the \f(CW\*(C`?date=xxxxxx\*(C'\fR is fairly flexible. You should use one
yading@10 318 of the following formats (the 'T' is literal):
yading@10 319 .PP
yading@10 320 .Vb 2
yading@10 321 \& * YYYY\-MM\-DDTHH:MM:SS (localtime)
yading@10 322 \& * YYYY\-MM\-DDTHH:MM:SSZ (UTC)
yading@10 323 .Ve
yading@10 324 .PP
yading@10 325 You can omit the YYYY-MM-DD, and then it refers to the current day. However
yading@10 326 note that \fB?date=16:00:00\fR refers to 16:00 on the current day \*(-- this
yading@10 327 may be in the future and so is unlikely to be useful.
yading@10 328 .PP
yading@10 329 You use this by adding the ?date= to the end of the \s-1URL\s0 for the stream.
yading@10 330 For example: \fBhttp://localhost:8080/test.asf?date=2002\-07\-26T23:05:00\fR.
yading@10 331 .SS "What is \s-1FFM\s0, \s-1FFM2\s0"
yading@10 332 .IX Subsection "What is FFM, FFM2"
yading@10 333 \&\s-1FFM\s0 and \s-1FFM2\s0 are formats used by ffserver. They allow storing a wide variety of
yading@10 334 video and audio streams and encoding options, and can store a moving time segment
yading@10 335 of an infinite movie or a whole movie.
yading@10 336 .PP
yading@10 337 \&\s-1FFM\s0 is version specific, and there is limited compatibility of \s-1FFM\s0 files
yading@10 338 generated by one version of ffmpeg/ffserver and another version of
yading@10 339 ffmpeg/ffserver. It may work but it is not guaranteed to work.
yading@10 340 .PP
yading@10 341 \&\s-1FFM2\s0 is extensible while maintaining compatibility and should work between
yading@10 342 differing versions of tools. \s-1FFM2\s0 is the default.
yading@10 343 .SH "OPTIONS"
yading@10 344 .IX Header "OPTIONS"
yading@10 345 All the numerical options, if not specified otherwise, accept a string
yading@10 346 representing a number as input, which may be followed by one of the \s-1SI\s0
yading@10 347 unit prefixes, for example: 'K', 'M', or 'G'.
yading@10 348 .PP
yading@10 349 If 'i' is appended to the \s-1SI\s0 unit prefix, the complete prefix will be
yading@10 350 interpreted as a unit prefix for binary multiplies, which are based on
yading@10 351 powers of 1024 instead of powers of 1000. Appending 'B' to the \s-1SI\s0 unit
yading@10 352 prefix multiplies the value by 8. This allows using, for example:
yading@10 353 \&'\s-1KB\s0', 'MiB', 'G' and 'B' as number suffixes.
yading@10 354 .PP
yading@10 355 Options which do not take arguments are boolean options, and set the
yading@10 356 corresponding value to true. They can be set to false by prefixing
yading@10 357 the option name with \*(L"no\*(R". For example using \*(L"\-nofoo\*(R"
yading@10 358 will set the boolean option with name \*(L"foo\*(R" to false.
yading@10 359 .SS "Stream specifiers"
yading@10 360 .IX Subsection "Stream specifiers"
yading@10 361 Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
yading@10 362 are used to precisely specify which stream(s) a given option belongs to.
yading@10 363 .PP
yading@10 364 A stream specifier is a string generally appended to the option name and
yading@10 365 separated from it by a colon. E.g. \f(CW\*(C`\-codec:a:1 ac3\*(C'\fR contains the
yading@10 366 \&\f(CW\*(C`a:1\*(C'\fR stream specifier, which matches the second audio stream. Therefore, it
yading@10 367 would select the ac3 codec for the second audio stream.
yading@10 368 .PP
yading@10 369 A stream specifier can match several streams, so that the option is applied to all
yading@10 370 of them. E.g. the stream specifier in \f(CW\*(C`\-b:a 128k\*(C'\fR matches all audio
yading@10 371 streams.
yading@10 372 .PP
yading@10 373 An empty stream specifier matches all streams. For example, \f(CW\*(C`\-codec copy\*(C'\fR
yading@10 374 or \f(CW\*(C`\-codec: copy\*(C'\fR would copy all the streams without reencoding.
yading@10 375 .PP
yading@10 376 Possible forms of stream specifiers are:
yading@10 377 .IP "\fIstream_index\fR" 4
yading@10 378 .IX Item "stream_index"
yading@10 379 Matches the stream with this index. E.g. \f(CW\*(C`\-threads:1 4\*(C'\fR would set the
yading@10 380 thread count for the second stream to 4.
yading@10 381 .IP "\fIstream_type\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4
yading@10 382 .IX Item "stream_type[:stream_index]"
yading@10 383 \&\fIstream_type\fR is one of following: 'v' for video, 'a' for audio, 's' for subtitle,
yading@10 384 \&'d' for data, and 't' for attachments. If \fIstream_index\fR is given, then it matches
yading@10 385 stream number \fIstream_index\fR of this type. Otherwise, it matches all
yading@10 386 streams of this type.
yading@10 387 .IP "\fBp:\fR\fIprogram_id\fR\fB[:\fR\fIstream_index\fR\fB]\fR" 4
yading@10 388 .IX Item "p:program_id[:stream_index]"
yading@10 389 If \fIstream_index\fR is given, then it matches the stream with number \fIstream_index\fR
yading@10 390 in the program with the id \fIprogram_id\fR. Otherwise, it matches all streams in the
yading@10 391 program.
yading@10 392 .IP "\fB#\fR\fIstream_id\fR" 4
yading@10 393 .IX Item "#stream_id"
yading@10 394 Matches the stream by a format-specific \s-1ID\s0.
yading@10 395 .SS "Generic options"
yading@10 396 .IX Subsection "Generic options"
yading@10 397 These options are shared amongst the ff* tools.
yading@10 398 .IP "\fB\-L\fR" 4
yading@10 399 .IX Item "-L"
yading@10 400 Show license.
yading@10 401 .IP "\fB\-h, \-?, \-help, \-\-help [\fR\fIarg\fR\fB]\fR" 4
yading@10 402 .IX Item "-h, -?, -help, --help [arg]"
yading@10 403 Show help. An optional parameter may be specified to print help about a specific
yading@10 404 item.
yading@10 405 .Sp
yading@10 406 Possible values of \fIarg\fR are:
yading@10 407 .RS 4
yading@10 408 .IP "\fBdecoder=\fR\fIdecoder_name\fR" 4
yading@10 409 .IX Item "decoder=decoder_name"
yading@10 410 Print detailed information about the decoder named \fIdecoder_name\fR. Use the
yading@10 411 \&\fB\-decoders\fR option to get a list of all decoders.
yading@10 412 .IP "\fBencoder=\fR\fIencoder_name\fR" 4
yading@10 413 .IX Item "encoder=encoder_name"
yading@10 414 Print detailed information about the encoder named \fIencoder_name\fR. Use the
yading@10 415 \&\fB\-encoders\fR option to get a list of all encoders.
yading@10 416 .IP "\fBdemuxer=\fR\fIdemuxer_name\fR" 4
yading@10 417 .IX Item "demuxer=demuxer_name"
yading@10 418 Print detailed information about the demuxer named \fIdemuxer_name\fR. Use the
yading@10 419 \&\fB\-formats\fR option to get a list of all demuxers and muxers.
yading@10 420 .IP "\fBmuxer=\fR\fImuxer_name\fR" 4
yading@10 421 .IX Item "muxer=muxer_name"
yading@10 422 Print detailed information about the muxer named \fImuxer_name\fR. Use the
yading@10 423 \&\fB\-formats\fR option to get a list of all muxers and demuxers.
yading@10 424 .IP "\fBfilter=\fR\fIfilter_name\fR" 4
yading@10 425 .IX Item "filter=filter_name"
yading@10 426 Print detailed information about the filter name \fIfilter_name\fR. Use the
yading@10 427 \&\fB\-filters\fR option to get a list of all filters.
yading@10 428 .RE
yading@10 429 .RS 4
yading@10 430 .RE
yading@10 431 .IP "\fB\-version\fR" 4
yading@10 432 .IX Item "-version"
yading@10 433 Show version.
yading@10 434 .IP "\fB\-formats\fR" 4
yading@10 435 .IX Item "-formats"
yading@10 436 Show available formats.
yading@10 437 .IP "\fB\-codecs\fR" 4
yading@10 438 .IX Item "-codecs"
yading@10 439 Show all codecs known to libavcodec.
yading@10 440 .Sp
yading@10 441 Note that the term 'codec' is used throughout this documentation as a shortcut
yading@10 442 for what is more correctly called a media bitstream format.
yading@10 443 .IP "\fB\-decoders\fR" 4
yading@10 444 .IX Item "-decoders"
yading@10 445 Show available decoders.
yading@10 446 .IP "\fB\-encoders\fR" 4
yading@10 447 .IX Item "-encoders"
yading@10 448 Show all available encoders.
yading@10 449 .IP "\fB\-bsfs\fR" 4
yading@10 450 .IX Item "-bsfs"
yading@10 451 Show available bitstream filters.
yading@10 452 .IP "\fB\-protocols\fR" 4
yading@10 453 .IX Item "-protocols"
yading@10 454 Show available protocols.
yading@10 455 .IP "\fB\-filters\fR" 4
yading@10 456 .IX Item "-filters"
yading@10 457 Show available libavfilter filters.
yading@10 458 .IP "\fB\-pix_fmts\fR" 4
yading@10 459 .IX Item "-pix_fmts"
yading@10 460 Show available pixel formats.
yading@10 461 .IP "\fB\-sample_fmts\fR" 4
yading@10 462 .IX Item "-sample_fmts"
yading@10 463 Show available sample formats.
yading@10 464 .IP "\fB\-layouts\fR" 4
yading@10 465 .IX Item "-layouts"
yading@10 466 Show channel names and standard channel layouts.
yading@10 467 .IP "\fB\-loglevel [repeat+]\fR\fIloglevel\fR \fB| \-v [repeat+]\fR\fIloglevel\fR" 4
yading@10 468 .IX Item "-loglevel [repeat+]loglevel | -v [repeat+]loglevel"
yading@10 469 Set the logging level used by the library.
yading@10 470 Adding \*(L"repeat+\*(R" indicates that repeated log output should not be compressed
yading@10 471 to the first line and the \*(L"Last message repeated n times\*(R" line will be
yading@10 472 omitted. \*(L"repeat\*(R" can also be used alone.
yading@10 473 If \*(L"repeat\*(R" is used alone, and with no prior loglevel set, the default
yading@10 474 loglevel will be used. If multiple loglevel parameters are given, using
yading@10 475 \&'repeat' will not change the loglevel.
yading@10 476 \&\fIloglevel\fR is a number or a string containing one of the following values:
yading@10 477 .RS 4
yading@10 478 .IP "\fBquiet\fR" 4
yading@10 479 .IX Item "quiet"
yading@10 480 Show nothing at all; be silent.
yading@10 481 .IP "\fBpanic\fR" 4
yading@10 482 .IX Item "panic"
yading@10 483 Only show fatal errors which could lead the process to crash, such as
yading@10 484 and assert failure. This is not currently used for anything.
yading@10 485 .IP "\fBfatal\fR" 4
yading@10 486 .IX Item "fatal"
yading@10 487 Only show fatal errors. These are errors after which the process absolutely
yading@10 488 cannot continue after.
yading@10 489 .IP "\fBerror\fR" 4
yading@10 490 .IX Item "error"
yading@10 491 Show all errors, including ones which can be recovered from.
yading@10 492 .IP "\fBwarning\fR" 4
yading@10 493 .IX Item "warning"
yading@10 494 Show all warnings and errors. Any message related to possibly
yading@10 495 incorrect or unexpected events will be shown.
yading@10 496 .IP "\fBinfo\fR" 4
yading@10 497 .IX Item "info"
yading@10 498 Show informative messages during processing. This is in addition to
yading@10 499 warnings and errors. This is the default value.
yading@10 500 .IP "\fBverbose\fR" 4
yading@10 501 .IX Item "verbose"
yading@10 502 Same as \f(CW\*(C`info\*(C'\fR, except more verbose.
yading@10 503 .IP "\fBdebug\fR" 4
yading@10 504 .IX Item "debug"
yading@10 505 Show everything, including debugging information.
yading@10 506 .RE
yading@10 507 .RS 4
yading@10 508 .Sp
yading@10 509 By default the program logs to stderr, if coloring is supported by the
yading@10 510 terminal, colors are used to mark errors and warnings. Log coloring
yading@10 511 can be disabled setting the environment variable
yading@10 512 \&\fB\s-1AV_LOG_FORCE_NOCOLOR\s0\fR or \fB\s-1NO_COLOR\s0\fR, or can be forced setting
yading@10 513 the environment variable \fB\s-1AV_LOG_FORCE_COLOR\s0\fR.
yading@10 514 The use of the environment variable \fB\s-1NO_COLOR\s0\fR is deprecated and
yading@10 515 will be dropped in a following FFmpeg version.
yading@10 516 .RE
yading@10 517 .IP "\fB\-report\fR" 4
yading@10 518 .IX Item "-report"
yading@10 519 Dump full command line and console output to a file named
yading@10 520 \&\f(CW\*(C`\f(CIprogram\f(CW\-\f(CIYYYYMMDD\f(CW\-\f(CIHHMMSS\f(CW.log\*(C'\fR in the current
yading@10 521 directory.
yading@10 522 This file can be useful for bug reports.
yading@10 523 It also implies \f(CW\*(C`\-loglevel verbose\*(C'\fR.
yading@10 524 .Sp
yading@10 525 Setting the environment variable \f(CW\*(C`FFREPORT\*(C'\fR to any value has the
yading@10 526 same effect. If the value is a ':'\-separated key=value sequence, these
yading@10 527 options will affect the report; options values must be escaped if they
yading@10 528 contain special characters or the options delimiter ':' (see the
yading@10 529 ``Quoting and escaping'' section in the ffmpeg-utils manual). The
yading@10 530 following option is recognized:
yading@10 531 .RS 4
yading@10 532 .IP "\fBfile\fR" 4
yading@10 533 .IX Item "file"
yading@10 534 set the file name to use for the report; \f(CW%p\fR is expanded to the name
yading@10 535 of the program, \f(CW%t\fR is expanded to a timestamp, \f(CW\*(C`%%\*(C'\fR is expanded
yading@10 536 to a plain \f(CW\*(C`%\*(C'\fR
yading@10 537 .RE
yading@10 538 .RS 4
yading@10 539 .Sp
yading@10 540 Errors in parsing the environment variable are not fatal, and will not
yading@10 541 appear in the report.
yading@10 542 .RE
yading@10 543 .IP "\fB\-cpuflags flags (\fR\fIglobal\fR\fB)\fR" 4
yading@10 544 .IX Item "-cpuflags flags (global)"
yading@10 545 Allows setting and clearing cpu flags. This option is intended
yading@10 546 for testing. Do not use it unless you know what you're doing.
yading@10 547 .Sp
yading@10 548 .Vb 3
yading@10 549 \& ffmpeg \-cpuflags \-sse+mmx ...
yading@10 550 \& ffmpeg \-cpuflags mmx ...
yading@10 551 \& ffmpeg \-cpuflags 0 ...
yading@10 552 .Ve
yading@10 553 .Sp
yading@10 554 Possible flags for this option are:
yading@10 555 .RS 4
yading@10 556 .IP "\fBx86\fR" 4
yading@10 557 .IX Item "x86"
yading@10 558 .RS 4
yading@10 559 .PD 0
yading@10 560 .IP "\fBmmx\fR" 4
yading@10 561 .IX Item "mmx"
yading@10 562 .IP "\fBmmxext\fR" 4
yading@10 563 .IX Item "mmxext"
yading@10 564 .IP "\fBsse\fR" 4
yading@10 565 .IX Item "sse"
yading@10 566 .IP "\fBsse2\fR" 4
yading@10 567 .IX Item "sse2"
yading@10 568 .IP "\fBsse2slow\fR" 4
yading@10 569 .IX Item "sse2slow"
yading@10 570 .IP "\fBsse3\fR" 4
yading@10 571 .IX Item "sse3"
yading@10 572 .IP "\fBsse3slow\fR" 4
yading@10 573 .IX Item "sse3slow"
yading@10 574 .IP "\fBssse3\fR" 4
yading@10 575 .IX Item "ssse3"
yading@10 576 .IP "\fBatom\fR" 4
yading@10 577 .IX Item "atom"
yading@10 578 .IP "\fBsse4.1\fR" 4
yading@10 579 .IX Item "sse4.1"
yading@10 580 .IP "\fBsse4.2\fR" 4
yading@10 581 .IX Item "sse4.2"
yading@10 582 .IP "\fBavx\fR" 4
yading@10 583 .IX Item "avx"
yading@10 584 .IP "\fBxop\fR" 4
yading@10 585 .IX Item "xop"
yading@10 586 .IP "\fBfma4\fR" 4
yading@10 587 .IX Item "fma4"
yading@10 588 .IP "\fB3dnow\fR" 4
yading@10 589 .IX Item "3dnow"
yading@10 590 .IP "\fB3dnowext\fR" 4
yading@10 591 .IX Item "3dnowext"
yading@10 592 .IP "\fBcmov\fR" 4
yading@10 593 .IX Item "cmov"
yading@10 594 .RE
yading@10 595 .RS 4
yading@10 596 .RE
yading@10 597 .IP "\fB\s-1ARM\s0\fR" 4
yading@10 598 .IX Item "ARM"
yading@10 599 .RS 4
yading@10 600 .IP "\fBarmv5te\fR" 4
yading@10 601 .IX Item "armv5te"
yading@10 602 .IP "\fBarmv6\fR" 4
yading@10 603 .IX Item "armv6"
yading@10 604 .IP "\fBarmv6t2\fR" 4
yading@10 605 .IX Item "armv6t2"
yading@10 606 .IP "\fBvfp\fR" 4
yading@10 607 .IX Item "vfp"
yading@10 608 .IP "\fBvfpv3\fR" 4
yading@10 609 .IX Item "vfpv3"
yading@10 610 .IP "\fBneon\fR" 4
yading@10 611 .IX Item "neon"
yading@10 612 .RE
yading@10 613 .RS 4
yading@10 614 .RE
yading@10 615 .IP "\fBPowerPC\fR" 4
yading@10 616 .IX Item "PowerPC"
yading@10 617 .RS 4
yading@10 618 .IP "\fBaltivec\fR" 4
yading@10 619 .IX Item "altivec"
yading@10 620 .RE
yading@10 621 .RS 4
yading@10 622 .RE
yading@10 623 .IP "\fBSpecific Processors\fR" 4
yading@10 624 .IX Item "Specific Processors"
yading@10 625 .RS 4
yading@10 626 .IP "\fBpentium2\fR" 4
yading@10 627 .IX Item "pentium2"
yading@10 628 .IP "\fBpentium3\fR" 4
yading@10 629 .IX Item "pentium3"
yading@10 630 .IP "\fBpentium4\fR" 4
yading@10 631 .IX Item "pentium4"
yading@10 632 .IP "\fBk6\fR" 4
yading@10 633 .IX Item "k6"
yading@10 634 .IP "\fBk62\fR" 4
yading@10 635 .IX Item "k62"
yading@10 636 .IP "\fBathlon\fR" 4
yading@10 637 .IX Item "athlon"
yading@10 638 .IP "\fBathlonxp\fR" 4
yading@10 639 .IX Item "athlonxp"
yading@10 640 .IP "\fBk8\fR" 4
yading@10 641 .IX Item "k8"
yading@10 642 .RE
yading@10 643 .RS 4
yading@10 644 .RE
yading@10 645 .RE
yading@10 646 .RS 4
yading@10 647 .RE
yading@10 648 .IP "\fB\-opencl_options options (\fR\fIglobal\fR\fB)\fR" 4
yading@10 649 .IX Item "-opencl_options options (global)"
yading@10 650 .PD
yading@10 651 Set OpenCL environment options. This option is only available when
yading@10 652 FFmpeg has been compiled with \f(CW\*(C`\-\-enable\-opencl\*(C'\fR.
yading@10 653 .Sp
yading@10 654 \&\fIoptions\fR must be a list of \fIkey\fR=\fIvalue\fR option pairs
yading@10 655 separated by ':'. See the ``OpenCL Options'' section in the
yading@10 656 ffmpeg-utils manual for the list of supported options.
yading@10 657 .SS "AVOptions"
yading@10 658 .IX Subsection "AVOptions"
yading@10 659 These options are provided directly by the libavformat, libavdevice and
yading@10 660 libavcodec libraries. To see the list of available AVOptions, use the
yading@10 661 \&\fB\-help\fR option. They are separated into two categories:
yading@10 662 .IP "\fBgeneric\fR" 4
yading@10 663 .IX Item "generic"
yading@10 664 These options can be set for any container, codec or device. Generic options
yading@10 665 are listed under AVFormatContext options for containers/devices and under
yading@10 666 AVCodecContext options for codecs.
yading@10 667 .IP "\fBprivate\fR" 4
yading@10 668 .IX Item "private"
yading@10 669 These options are specific to the given container, device or codec. Private
yading@10 670 options are listed under their corresponding containers/devices/codecs.
yading@10 671 .PP
yading@10 672 For example to write an ID3v2.3 header instead of a default ID3v2.4 to
yading@10 673 an \s-1MP3\s0 file, use the \fBid3v2_version\fR private option of the \s-1MP3\s0
yading@10 674 muxer:
yading@10 675 .PP
yading@10 676 .Vb 1
yading@10 677 \& ffmpeg \-i input.flac \-id3v2_version 3 out.mp3
yading@10 678 .Ve
yading@10 679 .PP
yading@10 680 All codec AVOptions are obviously per-stream, so the chapter on stream
yading@10 681 specifiers applies to them
yading@10 682 .PP
yading@10 683 Note \fB\-nooption\fR syntax cannot be used for boolean AVOptions,
yading@10 684 use \fB\-option 0\fR/\fB\-option 1\fR.
yading@10 685 .PP
yading@10 686 Note2 old undocumented way of specifying per-stream AVOptions by prepending
yading@10 687 v/a/s to the options name is now obsolete and will be removed soon.
yading@10 688 .SS "Main options"
yading@10 689 .IX Subsection "Main options"
yading@10 690 .IP "\fB\-f\fR \fIconfigfile\fR" 4
yading@10 691 .IX Item "-f configfile"
yading@10 692 Use \fIconfigfile\fR instead of \fI/etc/ffserver.conf\fR.
yading@10 693 .IP "\fB\-n\fR" 4
yading@10 694 .IX Item "-n"
yading@10 695 Enable no-launch mode. This option disables all the Launch directives
yading@10 696 within the various <Stream> sections. Since ffserver will not launch
yading@10 697 any ffmpeg instances, you will have to launch them manually.
yading@10 698 .IP "\fB\-d\fR" 4
yading@10 699 .IX Item "-d"
yading@10 700 Enable debug mode. This option increases log verbosity, directs log
yading@10 701 messages to stdout.
yading@10 702 .SH "SEE ALSO"
yading@10 703 .IX Header "SEE ALSO"
yading@10 704 \&\fIffserver\-all\fR\|(1),
yading@10 705 the \fIdoc/ffserver.conf\fR example, \fIffmpeg\fR\|(1), \fIffplay\fR\|(1), \fIffprobe\fR\|(1),
yading@10 706 \&\fIffmpeg\-utils\fR\|(1), \fIffmpeg\-scaler\fR\|(1), \fIffmpeg\-resampler\fR\|(1),
yading@10 707 \&\fIffmpeg\-codecs\fR\|(1), \fIffmpeg\-bitstream\-filters\fR\|(1), \fIffmpeg\-formats\fR\|(1),
yading@10 708 \&\fIffmpeg\-devices\fR\|(1), \fIffmpeg\-protocols\fR\|(1), \fIffmpeg\-filters\fR\|(1)
yading@10 709 .SH "AUTHORS"
yading@10 710 .IX Header "AUTHORS"
yading@10 711 The FFmpeg developers.
yading@10 712 .PP
yading@10 713 For details about the authorship, see the Git history of the project
yading@10 714 (git://source.ffmpeg.org/ffmpeg), e.g. by typing the command
yading@10 715 \&\fBgit log\fR in the FFmpeg source directory, or browsing the
yading@10 716 online repository at <\fBhttp://source.ffmpeg.org\fR>.
yading@10 717 .PP
yading@10 718 Maintainers for the specific components are listed in the file
yading@10 719 \&\fI\s-1MAINTAINERS\s0\fR in the source code tree.