]> git.sesse.net Git - ffmpeg/blob - doc/ffserver.texi
Merge commit 'ad1ee5fa75a3d69d54c0691048939e94ab5a7f0d'
[ffmpeg] / doc / ffserver.texi
1 \input texinfo @c -*- texinfo -*-
2
3 @settitle ffserver Documentation
4 @titlepage
5 @center @titlefont{ffserver Documentation}
6 @end titlepage
7
8 @top
9
10 @contents
11
12 @chapter Synopsis
13
14 ffserver [@var{options}]
15
16 @chapter Description
17 @c man begin DESCRIPTION
18
19 @command{ffserver} is a streaming server for both audio and video.
20 It supports several live feeds, streaming from files and time shifting
21 on live feeds. You can seek to positions in the past on each live
22 feed, provided you specify a big enough feed storage.
23
24 @command{ffserver} is configured through a configuration file, which
25 is read at startup. If not explicitly specified, it will read from
26 @file{/etc/ffserver.conf}.
27
28 @command{ffserver} receives prerecorded files or FFM streams from some
29 @command{ffmpeg} instance as input, then streams them over
30 RTP/RTSP/HTTP.
31
32 An @command{ffserver} instance will listen on some port as specified
33 in the configuration file. You can launch one or more instances of
34 @command{ffmpeg} and send one or more FFM streams to the port where
35 ffserver is expecting to receive them. Alternately, you can make
36 @command{ffserver} launch such @command{ffmpeg} instances at startup.
37
38 Input streams are called feeds, and each one is specified by a
39 @code{<Feed>} section in the configuration file.
40
41 For each feed you can have different output streams in various
42 formats, each one specified by a @code{<Stream>} section in the
43 configuration file.
44
45 @chapter Detailed description
46
47 @command{ffserver} works by forwarding streams encoded by
48 @command{ffmpeg}, or pre-recorded streams which are read from disk.
49
50 Precisely, @command{ffserver} acts as an HTTP server, accepting POST
51 requests from @command{ffmpeg} to acquire the stream to publish, and
52 serving RTSP clients or HTTP clients GET requests with the stream
53 media content.
54
55 A feed is an @ref{FFM} stream created by @command{ffmpeg}, and sent to
56 a port where @command{ffserver} is listening.
57
58 Each feed is identified by a unique name, corresponding to the name
59 of the resource published on @command{ffserver}, and is configured by
60 a dedicated @code{Feed} section in the configuration file.
61
62 The feed publish URL is given by:
63 @example
64 http://@var{ffserver_ip_address}:@var{http_port}/@var{feed_name}
65 @end example
66
67 where @var{ffserver_ip_address} is the IP address of the machine where
68 @command{ffserver} is installed, @var{http_port} is the port number of
69 the HTTP server (configured through the @option{Port} option), and
70 @var{feed_name} is the name of the corresponding feed defined in the
71 configuration file.
72
73 Each feed is associated to a file which is stored on disk. This stored
74 file is used to allow to send pre-recorded data to a player as fast as
75 possible when new content is added in real-time to the stream.
76
77 A "live-stream" or "stream" is a resource published by
78 @command{ffserver}, and made accessible through the HTTP protocol to
79 clients.
80
81 A stream can be connected to a feed, or to a file. In the first case,
82 the published stream is forwarded from the corresponding feed
83 generated by a running instance of @command{ffmpeg}, in the second
84 case the stream is read from a pre-recorded file.
85
86 Each stream is identified by a unique name, corresponding to the name
87 of the resource served by @command{ffserver}, and is configured by
88 a dedicated @code{Stream} section in the configuration file.
89
90 The stream access HTTP URL is given by:
91 @example
92 http://@var{ffserver_ip_address}:@var{http_port}/@var{stream_name}[@var{options}]
93 @end example
94
95 The stream access RTSP URL is given by:
96 @example
97 http://@var{ffserver_ip_address}:@var{rtsp_port}/@var{stream_name}[@var{options}]
98 @end example
99
100 @var{stream_name} is the name of the corresponding stream defined in
101 the configuration file. @var{options} is a list of options specified
102 after the URL which affects how the stream is served by
103 @command{ffserver}. @var{http_port} and @var{rtsp_port} are the HTTP
104 and RTSP ports configured with the options @var{Port} and
105 @var{RTSPPort} respectively.
106
107 In case the stream is associated to a feed, the encoding parameters
108 must be configured in the stream configuration. They are sent to
109 @command{ffmpeg} when setting up the encoding. This allows
110 @command{ffserver} to define the encoding parameters used by
111 the @command{ffmpeg} encoders.
112
113 The @command{ffmpeg} @option{override_ffserver} commandline option
114 allows one to override the encoding parameters set by the server.
115
116 Multiple streams can be connected to the same feed.
117
118 For example, you can have a situation described by the following
119 graph:
120 @example
121                _________       __________
122               |         |     |          |
123 ffmpeg 1 -----| feed 1  |-----| stream 1 |
124     \         |_________|\    |__________|
125      \                    \
126       \                    \   __________
127        \                    \ |          |
128         \                    \| stream 2 |
129          \                    |__________|
130           \
131            \   _________       __________
132             \ |         |     |          |
133              \| feed 2  |-----| stream 3 |
134               |_________|     |__________|
135
136                _________       __________
137               |         |     |          |
138 ffmpeg 2 -----| feed 3  |-----| stream 4 |
139               |_________|     |__________|
140
141                _________       __________
142               |         |     |          |
143               | file 1  |-----| stream 5 |
144               |_________|     |__________|
145 @end example
146
147 @anchor{FFM}
148 @section FFM, FFM2 formats
149
150 FFM and FFM2 are formats used by ffserver. They allow storing a wide variety of
151 video and audio streams and encoding options, and can store a moving time segment
152 of an infinite movie or a whole movie.
153
154 FFM is version specific, and there is limited compatibility of FFM files
155 generated by one version of ffmpeg/ffserver and another version of
156 ffmpeg/ffserver. It may work but it is not guaranteed to work.
157
158 FFM2 is extensible while maintaining compatibility and should work between
159 differing versions of tools. FFM2 is the default.
160
161 @section Status stream
162
163 @command{ffserver} supports an HTTP interface which exposes the
164 current status of the server.
165
166 Simply point your browser to the address of the special status stream
167 specified in the configuration file.
168
169 For example if you have:
170 @example
171 <Stream status.html>
172 Format status
173
174 # Only allow local people to get the status
175 ACL allow localhost
176 ACL allow 192.168.0.0 192.168.255.255
177 </Stream>
178 @end example
179
180 then the server will post a page with the status information when
181 the special stream @file{status.html} is requested.
182
183 @section How do I make it work?
184
185 As a simple test, just run the following two command lines where INPUTFILE
186 is some file which you can decode with ffmpeg:
187
188 @example
189 ffserver -f doc/ffserver.conf &
190 ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm
191 @end example
192
193 At this point you should be able to go to your Windows machine and fire up
194 Windows Media Player (WMP). Go to Open URL and enter
195
196 @example
197     http://<linuxbox>:8090/test.asf
198 @end example
199
200 You should (after a short delay) see video and hear audio.
201
202 WARNING: trying to stream test1.mpg doesn't work with WMP as it tries to
203 transfer the entire file before starting to play.
204 The same is true of AVI files.
205
206 You should edit the @file{ffserver.conf} file to suit your needs (in
207 terms of frame rates etc). Then install @command{ffserver} and
208 @command{ffmpeg}, write a script to start them up, and off you go.
209
210 @section What else can it do?
211
212 You can replay video from .ffm files that was recorded earlier.
213 However, there are a number of caveats, including the fact that the
214 ffserver parameters must match the original parameters used to record the
215 file. If they do not, then ffserver deletes the file before recording into it.
216 (Now that I write this, it seems broken).
217
218 You can fiddle with many of the codec choices and encoding parameters, and
219 there are a bunch more parameters that you cannot control. Post a message
220 to the mailing list if there are some 'must have' parameters. Look in
221 ffserver.conf for a list of the currently available controls.
222
223 It will automatically generate the ASX or RAM files that are often used
224 in browsers. These files are actually redirections to the underlying ASF
225 or RM file. The reason for this is that the browser often fetches the
226 entire file before starting up the external viewer. The redirection files
227 are very small and can be transferred quickly. [The stream itself is
228 often 'infinite' and thus the browser tries to download it and never
229 finishes.]
230
231 @section Tips
232
233 * When you connect to a live stream, most players (WMP, RA, etc) want to
234 buffer a certain number of seconds of material so that they can display the
235 signal continuously. However, ffserver (by default) starts sending data
236 in realtime. This means that there is a pause of a few seconds while the
237 buffering is being done by the player. The good news is that this can be
238 cured by adding a '?buffer=5' to the end of the URL. This means that the
239 stream should start 5 seconds in the past -- and so the first 5 seconds
240 of the stream are sent as fast as the network will allow. It will then
241 slow down to real time. This noticeably improves the startup experience.
242
243 You can also add a 'Preroll 15' statement into the ffserver.conf that will
244 add the 15 second prebuffering on all requests that do not otherwise
245 specify a time. In addition, ffserver will skip frames until a key_frame
246 is found. This further reduces the startup delay by not transferring data
247 that will be discarded.
248
249 @section Why does the ?buffer / Preroll stop working after a time?
250
251 It turns out that (on my machine at least) the number of frames successfully
252 grabbed is marginally less than the number that ought to be grabbed. This
253 means that the timestamp in the encoded data stream gets behind realtime.
254 This means that if you say 'Preroll 10', then when the stream gets 10
255 or more seconds behind, there is no Preroll left.
256
257 Fixing this requires a change in the internals of how timestamps are
258 handled.
259
260 @section Does the @code{?date=} stuff work.
261
262 Yes (subject to the limitation outlined above). Also note that whenever you
263 start ffserver, it deletes the ffm file (if any parameters have changed),
264 thus wiping out what you had recorded before.
265
266 The format of the @code{?date=xxxxxx} is fairly flexible. You should use one
267 of the following formats (the 'T' is literal):
268
269 @example
270 * YYYY-MM-DDTHH:MM:SS     (localtime)
271 * YYYY-MM-DDTHH:MM:SSZ    (UTC)
272 @end example
273
274 You can omit the YYYY-MM-DD, and then it refers to the current day. However
275 note that @samp{?date=16:00:00} refers to 16:00 on the current day -- this
276 may be in the future and so is unlikely to be useful.
277
278 You use this by adding the ?date= to the end of the URL for the stream.
279 For example:   @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}.
280 @c man end
281
282 @chapter Options
283 @c man begin OPTIONS
284
285 @include fftools-common-opts.texi
286
287 @section Main options
288
289 @table @option
290 @item -f @var{configfile}
291 Read configuration file @file{configfile}. If not specified it will
292 read by default from @file{/etc/ffserver.conf}.
293
294 @item -n
295 Enable no-launch mode. This option disables all the @code{Launch}
296 directives within the various @code{<Feed>} sections. Since
297 @command{ffserver} will not launch any @command{ffmpeg} instances, you
298 will have to launch them manually.
299
300 @item -d
301 Enable debug mode. This option increases log verbosity, and directs
302 log messages to stdout. When specified, the @option{CustomLog} option
303 is ignored.
304 @end table
305
306 @chapter Configuration file syntax
307
308 @command{ffserver} reads a configuration file containing global
309 options and settings for each stream and feed.
310
311 The configuration file consists of global options and dedicated
312 sections, which must be introduced by "<@var{SECTION_NAME}
313 @var{ARGS}>" on a separate line and must be terminated by a line in
314 the form "</@var{SECTION_NAME}>". @var{ARGS} is optional.
315
316 Currently the following sections are recognized: @samp{Feed},
317 @samp{Stream}, @samp{Redirect}.
318
319 A line starting with @code{#} is ignored and treated as a comment.
320
321 Name of options and sections are case-insensitive.
322
323 @section ACL syntax
324 An ACL (Access Control List) specifies the address which are allowed
325 to access a given stream, or to write a given feed.
326
327 It accepts the folling forms
328 @itemize
329 @item
330 Allow/deny access to @var{address}.
331 @example
332 ACL ALLOW <address>
333 ACL DENY <address>
334 @end example
335
336 @item
337 Allow/deny access to ranges of addresses from @var{first_address} to
338 @var{last_address}.
339 @example
340 ACL ALLOW <first_address> <last_address>
341 ACL DENY <first_address> <last_address>
342 @end example
343 @end itemize
344
345 You can repeat the ACL allow/deny as often as you like. It is on a per
346 stream basis. The first match defines the action. If there are no matches,
347 then the default is the inverse of the last ACL statement.
348
349 Thus 'ACL allow localhost' only allows access from localhost.
350 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
351 allow everybody else.
352
353 @section Global options
354 @table @option
355 @item Port @var{port_number}
356 @item RTSPPort @var{port_number}
357
358 Set TCP port number on which the HTTP/RTSP server is listening. You
359 must select a different port from your standard HTTP web server if it
360 is running on the same computer.
361
362 If not specified, no corresponding server will be created.
363
364 @item BindAddress @var{ip_address}
365 @item RTSPBindAddress @var{ip_address}
366 Set address on which the HTTP/RTSP server is bound. Only useful if you
367 have several network interfaces.
368
369 @item MaxHTTPConnections @var{n}
370 Set number of simultaneous HTTP connections that can be handled. It
371 has to be defined @emph{before} the @option{MaxClients} parameter,
372 since it defines the @option{MaxClients} maximum limit.
373
374 Default value is 2000.
375
376 @item MaxClients @var{n}
377 Set number of simultaneous requests that can be handled. Since
378 @command{ffserver} is very fast, it is more likely that you will want
379 to leave this high and use @option{MaxBandwidth}.
380
381 Default value is 5.
382
383 @item MaxBandwidth @var{kbps}
384 Set the maximum amount of kbit/sec that you are prepared to consume
385 when streaming to clients.
386
387 Default value is 1000.
388
389 @item CustomLog @var{filename}
390 Set access log file (uses standard Apache log file format). '-' is the
391 standard output.
392
393 If not specified @command{ffserver} will produce no log.
394
395 In case the commandline option @option{-d} is specified this option is
396 ignored, and the log is written to standard output.
397
398 @item NoDaemon
399 Set no-daemon mode. This option is currently ignored since now
400 @command{ffserver} will always work in no-daemon mode, and is
401 deprecated.
402 @end table
403
404 @section Feed section
405
406 A Feed section defines a feed provided to @command{ffserver}.
407
408 Each live feed contains one video and/or audio sequence coming from an
409 @command{ffmpeg} encoder or another @command{ffserver}. This sequence
410 may be encoded simultaneously with several codecs at several
411 resolutions.
412
413 A feed instance specification is introduced by a line in the form:
414 @example
415 <Feed FEED_FILENAME>
416 @end example
417
418 where @var{FEED_FILENAME} specifies the unique name of the FFM stream.
419
420 The following options are recognized within a Feed section.
421
422 @table @option
423 @item File @var{filename}
424 @item ReadOnlyFile @var{filename}
425 Set the path where the feed file is stored on disk.
426
427 If not specified, the @file{/tmp/FEED.ffm} is assumed, where
428 @var{FEED} is the feed name.
429
430 If @option{ReadOnlyFile} is used the file is marked as read-only and
431 it will not be deleted or updated.
432
433 @item Truncate
434 Truncate the feed file, rather than appending to it. By default
435 @command{ffserver} will append data to the file, until the maximum
436 file size value is reached (see @option{FileMaxSize} option).
437
438 @item FileMaxSize @var{size}
439 Set maximum size of the feed file in bytes. 0 means unlimited. The
440 postfixes @code{K} (2^10), @code{M} (2^20), and @code{G} (2^30) are
441 recognized.
442
443 Default value is 5M.
444
445 @item Launch @var{args}
446 Launch an @command{ffmpeg} command when creating @command{ffserver}.
447
448 @var{args} must be a sequence of arguments to be provided to an
449 @command{ffmpeg} instance. The first provided argument is ignored, and
450 it is replaced by a path with the same dirname of the @command{ffserver}
451 instance, followed by the remaining argument and terminated with a
452 path corresponding to the feed.
453
454 When the launched process exits, @command{ffserver} will launch
455 another program instance.
456
457 In case you need a more complex @command{ffmpeg} configuration,
458 e.g. if you need to generate multiple FFM feeds with a single
459 @command{ffmpeg} instance, you should launch @command{ffmpeg} by hand.
460
461 This option is ignored in case the commandline option @option{-n} is
462 specified.
463
464 @item ACL @var{spec}
465 Specify the list of IP address which are allowed or denied to write
466 the feed. Multiple ACL options can be specified.
467 @end table
468
469 @section Stream section
470
471 A Stream section defines a stream provided by @command{ffserver}, and
472 identified by a single name.
473
474 The stream is sent when answering a request containing the stream
475 name.
476
477 A stream section must be introduced by the line:
478 @example
479 <Stream STREAM_NAME>
480 @end example
481
482 where @var{STREAM_NAME} specifies the unique name of the stream.
483
484 The following options are recognized within a Stream section.
485
486 Encoding options are marked with the @emph{encoding} tag, and they are
487 used to set the encoding parameters, and are mapped to libavcodec
488 encoding options. Not all encoding options are supported, in
489 particular it is not possible to set encoder private options. In order
490 to override the encoding options specified by @command{ffserver}, you
491 can use the @command{ffmpeg} @option{override_ffserver} commandline
492 option.
493
494 Only one of the @option{Feed} and @option{File} options should be set.
495
496 @table @option
497 @item Feed @var{feed_name}
498 Set the input feed. @var{feed_name} must correspond to an existing
499 feed defined in a @code{Feed} section.
500
501 When this option is set, encoding options are used to setup the
502 encoding operated by the remote @command{ffmpeg} process.
503
504 @item File @var{filename}
505 Set the filename of the pre-recorded input file to stream.
506
507 When this option is set, encoding options are ignored and the input
508 file content is re-streamed as is.
509
510 @item Format @var{format_name}
511 Set the format of the output stream.
512
513 Must be the name of a format recognized by FFmpeg. If set to
514 @samp{status}, it is treated as a status stream.
515
516 @item InputFormat @var{format_name}
517 Set input format. If not specified, it is automatically guessed.
518
519 @item Preroll @var{n}
520 Set this to the number of seconds backwards in time to start. Note that
521 most players will buffer 5-10 seconds of video, and also you need to allow
522 for a keyframe to appear in the data stream.
523
524 Default value is 0.
525
526 @item StartSendOnKey
527 Do not send stream until it gets the first key frame. By default
528 @command{ffserver} will send data immediately.
529
530 @item MaxTime @var{n}
531 Set the number of seconds to run. This value set the maximum duration
532 of the stream a client will be able to receive.
533
534 A value of 0 means that no limit is set on the stream duration.
535
536 @item ACL @var{spec}
537 Set ACL for the stream.
538
539 @item DynamicACL @var{spec}
540
541 @item RTSPOption @var{option}
542
543 @item MulticastAddress @var{address}
544
545 @item MulticastPort @var{port}
546
547 @item MulticastTTL @var{integer}
548
549 @item NoLoop
550
551 @item FaviconURL @var{url}
552 Set favicon (favourite icon) for the server status page. It is ignored
553 for regular streams.
554
555 @item Author @var{value}
556 @item Comment @var{value}
557 @item Copyright @var{value}
558 @item Title @var{value}
559 Set metadata corresponding to the option. All these options are
560 deprecated in favor of @option{Metadata}.
561
562 @item Metadata @var{key} @var{value}
563 Set metadata value on the output stream.
564
565 @item NoAudio
566 @item NoVideo
567 Suppress audio/video.
568
569 @item AudioCodec @var{codec_name} (@emph{encoding,audio})
570 Set audio codec.
571
572 @item AudioBitRate @var{rate} (@emph{encoding,audio})
573 Set bitrate for the audio stream in kbits per second.
574
575 @item AudioChannels @var{n} (@emph{encoding,audio})
576 Set number of audio channels.
577
578 @item AudioSampleRate @var{n} (@emph{encoding,audio})
579 Set sampling frequency for audio. When using low bitrates, you should
580 lower this frequency to 22050 or 11025. The supported frequencies
581 depend on the selected audio codec.
582
583 @item AVOptionAudio @var{option} @var{value} (@emph{encoding,audio})
584 Set generic option for audio stream.
585
586 @item AVPresetAudio @var{preset} (@emph{encoding,audio})
587 Set preset for audio stream.
588
589 @item VideoCodec @var{codec_name} (@emph{encoding,video})
590 Set video codec.
591
592 @item VideoBitRate @var{n} (@emph{encoding,video})
593 Set bitrate for the video stream in kbits per second.
594
595 @item VideoBitRateRange @var{range} (@emph{encoding,video})
596 Set video bitrate range.
597
598 A range must be specified in the form @var{minrate}-@var{maxrate}, and
599 specifies the @option{minrate} and @option{maxrate} encoding options
600 expressed in kbits per second.
601
602 @item VideoBitRateRangeTolerance @var{n} (@emph{encoding,video})
603 Set video bitrate tolerance in kbits per second.
604
605 @item PixelFormat @var{pixel_format} (@emph{encoding,video})
606 Set video pixel format.
607
608 @item Debug @var{integer} (@emph{encoding,video})
609 Set video @option{debug} encoding option.
610
611 @item Strict @var{integer} (@emph{encoding,video})
612 Set video @option{strict} encoding option.
613
614 @item VideoBufferSize @var{n} (@emph{encoding,video})
615 Set ratecontrol buffer size, expressed in KB.
616
617 @item VideoFrameRate @var{n} (@emph{encoding,video})
618 Set number of video frames per second.
619
620 @item VideoSize (@emph{encoding,video})
621 Set size of the video frame, must be an abbreviation or in the form
622 @var{W}x@var{H}.  See @ref{video size syntax,,the Video size section
623 in the ffmpeg-utils(1) manual,ffmpeg-utils}.
624
625 Default value is @code{160x128}.
626
627 @item VideoIntraOnly (@emph{encoding,video})
628 Transmit only intra frames (useful for low bitrates, but kills frame rate).
629
630 @item VideoGopSize @var{n} (@emph{encoding,video})
631 If non-intra only, an intra frame is transmitted every VideoGopSize
632 frames. Video synchronization can only begin at an intra frame.
633
634 @item VideoTag @var{tag} (@emph{encoding,video})
635 Set video tag.
636
637 @item VideoHighQuality (@emph{encoding,video})
638 @item Video4MotionVector (@emph{encoding,video})
639
640 @item BitExact (@emph{encoding,video})
641 Set bitexact encoding flag.
642
643 @item IdctSimple (@emph{encoding,video})
644 Set simple IDCT algorithm.
645
646 @item Qscale @var{n} (@emph{encoding,video})
647 Enable constant quality encoding, and set video qscale (quantization
648 scale) value, expressed in @var{n} QP units.
649
650 @item VideoQMin @var{n} (@emph{encoding,video})
651 @item VideoQMax @var{n} (@emph{encoding,video})
652 Set video qmin/qmax.
653
654 @item VideoQDiff @var{integer} (@emph{encoding,video})
655 Set video @option{qdiff} encoding option.
656
657 @item LumiMask @var{float} (@emph{encoding,video})
658 @item DarkMask @var{float} (@emph{encoding,video})
659 Set @option{lumi_mask}/@option{dark_mask} encoding options.
660
661 @item AVOptionVideo @var{option} @var{value} (@emph{encoding,video})
662 Set generic option for video stream.
663
664 @item AVPresetVideo @var{preset} (@emph{encoding,video})
665 Set preset for video stream.
666
667 @var{preset} must be the path of a preset file.
668 @end table
669
670 @subsection Server status stream
671
672 A server status stream is a special stream which is used to show
673 statistics about the @command{ffserver} operations.
674
675 It must be specified setting the option @option{Format} to
676 @samp{status}.
677
678 @section Redirect section
679
680 A redirect section specifies where to redirect the requested URL to
681 another page.
682
683 A redirect section must be introduced by the line:
684 @example
685 <Redirect NAME>
686 @end example
687
688 where @var{NAME} is the name of the page which should be redirected.
689
690 It only accepts the option @option{URL}, which specify the redirection
691 URL.
692
693 @chapter Stream examples
694
695 @itemize
696 @item
697 Multipart JPEG
698 @example
699 <Stream test.mjpg>
700 Feed feed1.ffm
701 Format mpjpeg
702 VideoFrameRate 2
703 VideoIntraOnly
704 NoAudio
705 Strict -1
706 </Stream>
707 @end example
708
709 @item
710 Single JPEG
711 @example
712 <Stream test.jpg>
713 Feed feed1.ffm
714 Format jpeg
715 VideoFrameRate 2
716 VideoIntraOnly
717 VideoSize 352x240
718 NoAudio
719 Strict -1
720 </Stream>
721 @end example
722
723 @item
724 Flash
725 @example
726 <Stream test.swf>
727 Feed feed1.ffm
728 Format swf
729 VideoFrameRate 2
730 VideoIntraOnly
731 NoAudio
732 </Stream>
733 @end example
734
735 @item
736 ASF compatible
737 @example
738 <Stream test.asf>
739 Feed feed1.ffm
740 Format asf
741 VideoFrameRate 15
742 VideoSize 352x240
743 VideoBitRate 256
744 VideoBufferSize 40
745 VideoGopSize 30
746 AudioBitRate 64
747 StartSendOnKey
748 </Stream>
749 @end example
750
751 @item
752 MP3 audio
753 @example
754 <Stream test.mp3>
755 Feed feed1.ffm
756 Format mp2
757 AudioCodec mp3
758 AudioBitRate 64
759 AudioChannels 1
760 AudioSampleRate 44100
761 NoVideo
762 </Stream>
763 @end example
764
765 @item
766 Ogg Vorbis audio
767 @example
768 <Stream test.ogg>
769 Feed feed1.ffm
770 Metadata title "Stream title"
771 AudioBitRate 64
772 AudioChannels 2
773 AudioSampleRate 44100
774 NoVideo
775 </Stream>
776 @end example
777
778 @item
779 Real with audio only at 32 kbits
780 @example
781 <Stream test.ra>
782 Feed feed1.ffm
783 Format rm
784 AudioBitRate 32
785 NoVideo
786 </Stream>
787 @end example
788
789 @item
790 Real with audio and video at 64 kbits
791 @example
792 <Stream test.rm>
793 Feed feed1.ffm
794 Format rm
795 AudioBitRate 32
796 VideoBitRate 128
797 VideoFrameRate 25
798 VideoGopSize 25
799 </Stream>
800 @end example
801
802 @item
803 For stream coming from a file: you only need to set the input filename
804 and optionally a new format.
805
806 @example
807 <Stream file.rm>
808 File "/usr/local/httpd/htdocs/tlive.rm"
809 NoAudio
810 </Stream>
811 @end example
812
813 @example
814 <Stream file.asf>
815 File "/usr/local/httpd/htdocs/test.asf"
816 NoAudio
817 Metadata author "Me"
818 Metadata copyright "Super MegaCorp"
819 Metadata title "Test stream from disk"
820 Metadata comment "Test comment"
821 </Stream>
822 @end example
823 @end itemize
824
825 @c man end
826
827 @include config.texi
828 @ifset config-all
829 @ifset config-avutil
830 @include utils.texi
831 @end ifset
832 @ifset config-avcodec
833 @include codecs.texi
834 @include bitstream_filters.texi
835 @end ifset
836 @ifset config-avformat
837 @include formats.texi
838 @include protocols.texi
839 @end ifset
840 @ifset config-avdevice
841 @include devices.texi
842 @end ifset
843 @ifset config-swresample
844 @include resampler.texi
845 @end ifset
846 @ifset config-swscale
847 @include scaler.texi
848 @end ifset
849 @ifset config-avfilter
850 @include filters.texi
851 @end ifset
852 @end ifset
853
854 @chapter See Also
855
856 @ifhtml
857 @ifset config-all
858 @url{ffserver.html,ffserver},
859 @end ifset
860 @ifset config-not-all
861 @url{ffserver-all.html,ffserver-all},
862 @end ifset
863 the @file{doc/ffserver.conf} example,
864 @url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe},
865 @url{ffmpeg-utils.html,ffmpeg-utils},
866 @url{ffmpeg-scaler.html,ffmpeg-scaler},
867 @url{ffmpeg-resampler.html,ffmpeg-resampler},
868 @url{ffmpeg-codecs.html,ffmpeg-codecs},
869 @url{ffmpeg-bitstream-filters.html,ffmpeg-bitstream-filters},
870 @url{ffmpeg-formats.html,ffmpeg-formats},
871 @url{ffmpeg-devices.html,ffmpeg-devices},
872 @url{ffmpeg-protocols.html,ffmpeg-protocols},
873 @url{ffmpeg-filters.html,ffmpeg-filters}
874 @end ifhtml
875
876 @ifnothtml
877 @ifset config-all
878 ffserver(1),
879 @end ifset
880 @ifset config-not-all
881 ffserver-all(1),
882 @end ifset
883 the @file{doc/ffserver.conf} example, ffmpeg(1), ffplay(1), ffprobe(1),
884 ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
885 ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
886 ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
887 @end ifnothtml
888
889 @include authors.texi
890
891 @ignore
892
893 @setfilename ffserver
894 @settitle ffserver video server
895
896 @end ignore
897
898 @bye