]> git.sesse.net Git - ffmpeg/blob - doc/ffserver.texi
doc/bitstream_filters: remove mp3_header_decompress filter
[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.
554
555 @item NoAudio
556 @item NoVideo
557 Suppress audio/video.
558
559 @item AudioCodec @var{codec_name} (@emph{encoding,audio})
560 Set audio codec.
561
562 @item AudioBitRate @var{rate} (@emph{encoding,audio})
563 Set bitrate for the audio stream in kbits per second.
564
565 @item AudioChannels @var{n} (@emph{encoding,audio})
566 Set number of audio channels.
567
568 @item AudioSampleRate @var{n} (@emph{encoding,audio})
569 Set sampling frequency for audio. When using low bitrates, you should
570 lower this frequency to 22050 or 11025. The supported frequencies
571 depend on the selected audio codec.
572
573 @item AVOptionAudio @var{option} @var{value} (@emph{encoding,audio})
574 Set generic option for audio stream.
575
576 @item AVPresetAudio @var{preset} (@emph{encoding,audio})
577 Set preset for audio stream.
578
579 @item VideoCodec @var{codec_name} (@emph{encoding,video})
580 Set video codec.
581
582 @item VideoBitRate @var{n} (@emph{encoding,video})
583 Set bitrate for the video stream in kbits per second.
584
585 @item VideoBitRateRange @var{range} (@emph{encoding,video})
586 Set video bitrate range.
587
588 A range must be specified in the form @var{minrate}-@var{maxrate}, and
589 specifies the @option{minrate} and @option{maxrate} encoding options
590 expressed in kbits per second.
591
592 @item VideoBitRateRangeTolerance @var{n} (@emph{encoding,video})
593 Set video bitrate tolerance in kbits per second.
594
595 @item PixelFormat @var{pixel_format} (@emph{encoding,video})
596 Set video pixel format.
597
598 @item Debug @var{integer} (@emph{encoding,video})
599 Set video @option{debug} encoding option.
600
601 @item Strict @var{integer} (@emph{encoding,video})
602 Set video @option{strict} encoding option.
603
604 @item VideoBufferSize @var{n} (@emph{encoding,video})
605 Set ratecontrol buffer size, expressed in KB.
606
607 @item VideoFrameRate @var{n} (@emph{encoding,video})
608 Set number of video frames per second.
609
610 @item VideoSize (@emph{encoding,video})
611 Set size of the video frame, must be an abbreviation or in the form
612 @var{W}x@var{H}.  See @ref{video size syntax,,the Video size section
613 in the ffmpeg-utils(1) manual,ffmpeg-utils}.
614
615 Default value is @code{160x128}.
616
617 @item VideoIntraOnly (@emph{encoding,video})
618 Transmit only intra frames (useful for low bitrates, but kills frame rate).
619
620 @item VideoGopSize @var{n} (@emph{encoding,video})
621 If non-intra only, an intra frame is transmitted every VideoGopSize
622 frames. Video synchronization can only begin at an intra frame.
623
624 @item VideoTag @var{tag} (@emph{encoding,video})
625 Set video tag.
626
627 @item VideoHighQuality (@emph{encoding,video})
628 @item Video4MotionVector (@emph{encoding,video})
629
630 @item BitExact (@emph{encoding,video})
631 Set bitexact encoding flag.
632
633 @item IdctSimple (@emph{encoding,video})
634 Set simple IDCT algorithm.
635
636 @item Qscale @var{n} (@emph{encoding,video})
637 Enable constant quality encoding, and set video qscale (quantization
638 scale) value, expressed in @var{n} QP units.
639
640 @item VideoQMin @var{n} (@emph{encoding,video})
641 @item VideoQMax @var{n} (@emph{encoding,video})
642 Set video qmin/qmax.
643
644 @item VideoQDiff @var{integer} (@emph{encoding,video})
645 Set video @option{qdiff} encoding option.
646
647 @item LumiMask @var{float} (@emph{encoding,video})
648 @item DarkMask @var{float} (@emph{encoding,video})
649 Set @option{lumi_mask}/@option{dark_mask} encoding options.
650
651 @item AVOptionVideo @var{option} @var{value} (@emph{encoding,video})
652 Set generic option for video stream.
653
654 @item AVPresetVideo @var{preset} (@emph{encoding,video})
655 Set preset for video stream.
656
657 @var{preset} must be the path of a preset file.
658 @end table
659
660 @subsection Server status stream
661
662 A server status stream is a special stream which is used to show
663 statistics about the @command{ffserver} operations.
664
665 It must be specified setting the option @option{Format} to
666 @samp{status}.
667
668 @section Redirect section
669
670 A redirect section specifies where to redirect the requested URL to
671 another page.
672
673 A redirect section must be introduced by the line:
674 @example
675 <Redirect NAME>
676 @end example
677
678 where @var{NAME} is the name of the page which should be redirected.
679
680 It only accepts the option @option{URL}, which specify the redirection
681 URL.
682
683 @chapter Stream examples
684
685 @itemize
686 @item
687 Multipart JPEG
688 @example
689 <Stream test.mjpg>
690 Feed feed1.ffm
691 Format mpjpeg
692 VideoFrameRate 2
693 VideoIntraOnly
694 NoAudio
695 Strict -1
696 </Stream>
697 @end example
698
699 @item
700 Single JPEG
701 @example
702 <Stream test.jpg>
703 Feed feed1.ffm
704 Format jpeg
705 VideoFrameRate 2
706 VideoIntraOnly
707 VideoSize 352x240
708 NoAudio
709 Strict -1
710 </Stream>
711 @end example
712
713 @item
714 Flash
715 @example
716 <Stream test.swf>
717 Feed feed1.ffm
718 Format swf
719 VideoFrameRate 2
720 VideoIntraOnly
721 NoAudio
722 </Stream>
723 @end example
724
725 @item
726 ASF compatible
727 @example
728 <Stream test.asf>
729 Feed feed1.ffm
730 Format asf
731 VideoFrameRate 15
732 VideoSize 352x240
733 VideoBitRate 256
734 VideoBufferSize 40
735 VideoGopSize 30
736 AudioBitRate 64
737 StartSendOnKey
738 </Stream>
739 @end example
740
741 @item
742 MP3 audio
743 @example
744 <Stream test.mp3>
745 Feed feed1.ffm
746 Format mp2
747 AudioCodec mp3
748 AudioBitRate 64
749 AudioChannels 1
750 AudioSampleRate 44100
751 NoVideo
752 </Stream>
753 @end example
754
755 @item
756 Ogg Vorbis audio
757 @example
758 <Stream test.ogg>
759 Feed feed1.ffm
760 Title "Stream title"
761 AudioBitRate 64
762 AudioChannels 2
763 AudioSampleRate 44100
764 NoVideo
765 </Stream>
766 @end example
767
768 @item
769 Real with audio only at 32 kbits
770 @example
771 <Stream test.ra>
772 Feed feed1.ffm
773 Format rm
774 AudioBitRate 32
775 NoVideo
776 </Stream>
777 @end example
778
779 @item
780 Real with audio and video at 64 kbits
781 @example
782 <Stream test.rm>
783 Feed feed1.ffm
784 Format rm
785 AudioBitRate 32
786 VideoBitRate 128
787 VideoFrameRate 25
788 VideoGopSize 25
789 </Stream>
790 @end example
791
792 @item
793 For stream coming from a file: you only need to set the input filename
794 and optionally a new format.
795
796 @example
797 <Stream file.rm>
798 File "/usr/local/httpd/htdocs/tlive.rm"
799 NoAudio
800 </Stream>
801 @end example
802
803 @example
804 <Stream file.asf>
805 File "/usr/local/httpd/htdocs/test.asf"
806 NoAudio
807 Author "Me"
808 Copyright "Super MegaCorp"
809 Title "Test stream from disk"
810 Comment "Test comment"
811 </Stream>
812 @end example
813 @end itemize
814
815 @c man end
816
817 @include config.texi
818 @ifset config-all
819 @ifset config-avutil
820 @include utils.texi
821 @end ifset
822 @ifset config-avcodec
823 @include codecs.texi
824 @include bitstream_filters.texi
825 @end ifset
826 @ifset config-avformat
827 @include formats.texi
828 @include protocols.texi
829 @end ifset
830 @ifset config-avdevice
831 @include devices.texi
832 @end ifset
833 @ifset config-swresample
834 @include resampler.texi
835 @end ifset
836 @ifset config-swscale
837 @include scaler.texi
838 @end ifset
839 @ifset config-avfilter
840 @include filters.texi
841 @end ifset
842 @end ifset
843
844 @chapter See Also
845
846 @ifhtml
847 @ifset config-all
848 @url{ffserver.html,ffserver},
849 @end ifset
850 @ifset config-not-all
851 @url{ffserver-all.html,ffserver-all},
852 @end ifset
853 the @file{doc/ffserver.conf} example,
854 @url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe},
855 @url{ffmpeg-utils.html,ffmpeg-utils},
856 @url{ffmpeg-scaler.html,ffmpeg-scaler},
857 @url{ffmpeg-resampler.html,ffmpeg-resampler},
858 @url{ffmpeg-codecs.html,ffmpeg-codecs},
859 @url{ffmpeg-bitstream-filters.html,ffmpeg-bitstream-filters},
860 @url{ffmpeg-formats.html,ffmpeg-formats},
861 @url{ffmpeg-devices.html,ffmpeg-devices},
862 @url{ffmpeg-protocols.html,ffmpeg-protocols},
863 @url{ffmpeg-filters.html,ffmpeg-filters}
864 @end ifhtml
865
866 @ifnothtml
867 @ifset config-all
868 ffserver(1),
869 @end ifset
870 @ifset config-not-all
871 ffserver-all(1),
872 @end ifset
873 the @file{doc/ffserver.conf} example, ffmpeg(1), ffplay(1), ffprobe(1),
874 ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
875 ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
876 ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
877 @end ifnothtml
878
879 @include authors.texi
880
881 @ignore
882
883 @setfilename ffserver
884 @settitle ffserver video server
885
886 @end ignore
887
888 @bye