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