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