]> git.sesse.net Git - ffmpeg/blobdiff - doc/ffserver.texi
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / doc / ffserver.texi
index 80e726d2eda874f85c135fcd8782137880b711cb..3f7a98dbe56ab792483b93e90cd74df675ae1bb4 100644 (file)
@@ -42,6 +42,114 @@ For each feed you can have different output streams in various
 formats, each one specified by a @code{<Stream>} section in the
 configuration file.
 
+@chapter Detailed description
+
+@command{ffserver} works by forwarding streams encoded by
+@command{ffmpeg}, or pre-recorded streams which are read from disk.
+
+Precisely, @command{ffserver} acts as an HTTP server, accepting POST
+requests from @command{ffmpeg} to acquire the stream to publish, and
+serving HTTP clients GET requests with the stream media content.
+
+A feed is an @ref{FFM} stream created by @command{ffmpeg}, and sent to
+a port where @command{ffserver} is listening.
+
+Each feed is identified by a unique name, corresponding to the name
+of the resource published on @command{ffserver}, and is configured by
+a dedicated @code{Feed} section in the configuration file.
+
+The feed publish URL is given by:
+@example
+http://@var{ffserver_ip_address}:@var{http_port}/@var{feed_name}
+@end example
+
+where @var{ffserver_ip_address} is the IP address of the machine where
+@command{ffserver} is installed, @var{http_port} is the port number of
+the HTTP server (configured through the @option{Port} option), and
+@var{feed_name} is the name of the corresponding feed defined in the
+configuration file.
+
+Each feed is associated to a file which is stored on disk. This stored
+file is used to allow to send pre-recorded data to a player as fast as
+possible when new content is added in real-time to the stream.
+
+A "live-stream" or "stream" is a resource published by
+@command{ffserver}, and made accessible through the HTTP protocol to
+clients.
+
+A stream can be connected to a feed, or to a file. In the first case,
+the published stream is forwarded from the corresponding feed
+generated by a running instance of @command{ffmpeg}, in the second
+case the stream is read from a pre-recorded file.
+
+Each stream is identified by a unique name, corresponding to the name
+of the resource served by @command{ffserver}, and is configured by
+a dedicated @code{Stream} section in the configuration file.
+
+The stream access URL is given by:
+@example
+http://@var{ffserver_ip_address}:@var{http_port}/@var{stream_name}[@var{options}]
+@end example
+
+@var{stream_name} is the name of the corresponding stream defined in
+the configuration file. @var{options} is a list of options specified
+after the URL which affects how the stream is served by
+@command{ffserver}.
+
+In case the stream is associated to a feed, the encoding parameters
+must be configured in the stream configuration. They are sent to
+@command{ffmpeg} when setting up the encoding. This allows
+@command{ffserver} to define the encoding parameters used by
+the @command{ffmpeg} encoders.
+
+The @command{ffmpeg} @option{override_ffserver} commandline option
+allows to override the encoding parameters set by the server.
+
+Multiple streams can be connected to the same feed.
+
+For example, you can have a situation described by the following
+graph:
+@example
+               _________       __________
+              |         |     |          |
+ffmpeg 1 -----| feed 1  |-----| stream 1 |
+    \         |_________|\    |__________|
+     \                    \
+      \                    \   __________
+       \                    \ |          |
+        \                    \| stream 2 |
+         \                    |__________|
+          \
+           \   _________       __________
+            \ |         |     |          |
+             \| feed 2  |-----| stream 3 |
+              |_________|     |__________|
+
+               _________       __________
+              |         |     |          |
+ffmpeg 2 -----| feed 3  |-----| stream 4 |
+              |_________|     |__________|
+
+               _________       __________
+              |         |     |          |
+              | file 1  |-----| stream 5 |
+              |_________|     |__________|
+@end example
+
+@anchor{FFM}
+@section FFM, FFM2 formats
+
+FFM and FFM2 are formats used by ffserver. They allow storing a wide variety of
+video and audio streams and encoding options, and can store a moving time segment
+of an infinite movie or a whole movie.
+
+FFM is version specific, and there is limited compatibility of FFM files
+generated by one version of ffmpeg/ffserver and another version of
+ffmpeg/ffserver. It may work but it is not guaranteed to work.
+
+FFM2 is extensible while maintaining compatibility and should work between
+differing versions of tools. FFM2 is the default.
+
 @section Status stream
 
 @command{ffserver} supports an HTTP interface which exposes the
@@ -66,13 +174,6 @@ the special stream @file{status.html} is requested.
 
 @section How do I make it work?
 
-First, build the kit. It *really* helps to have installed LAME first. Then when
-you run the ffserver ./configure, make sure that you have the
-@code{--enable-libmp3lame} flag turned on.
-
-LAME is important as it allows for streaming audio to Windows Media Player.
-Don't ask why the other audio types do not work.
-
 As a simple test, just run the following two command lines where INPUTFILE
 is some file which you can decode with ffmpeg:
 
@@ -172,19 +273,6 @@ You use this by adding the ?date= to the end of the URL for the stream.
 For example:   @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}.
 @c man end
 
-@section What is FFM, FFM2
-
-FFM and FFM2 are formats used by ffserver. They allow storing a wide variety of
-video and audio streams and encoding options, and can store a moving time segment
-of an infinite movie or a whole movie.
-
-FFM is version specific, and there is limited compatibility of FFM files
-generated by one version of ffmpeg/ffserver and another version of
-ffmpeg/ffserver. It may work but it is not guaranteed to work.
-
-FFM2 is extensible while maintaining compatibility and should work between
-differing versions of tools. FFM2 is the default.
-
 @chapter Options
 @c man begin OPTIONS
 
@@ -303,8 +391,8 @@ ignored, and the log is written to standard output.
 
 @item NoDaemon
 Set no-daemon mode. This option is currently ignored since now
-@command{ffserver} will work in no-daemon mode, and is deprecated.
-
+@command{ffserver} will always work in no-daemon mode, and is
+deprecated.
 @end table
 
 @section Feed section
@@ -342,8 +430,9 @@ Truncate the feed file, rather than appending to it. By default
 file size value is reached (see @option{FileMaxSize} option).
 
 @item FileMaxSize @var{size}
-Set maximum size of the feed. 0 means unlimited. The postfixes
-@code{K}, @code{M}, and @code{G} are recognized.
+Set maximum size of the feed file in bytes. 0 means unlimited. The
+postfixes @code{K} (2^10), @code{M} (2^20), and @code{G} (2^30) are
+recognized.
 
 Default value is 5M.
 
@@ -664,7 +753,7 @@ NoVideo
 @end example
 
 @item
-Ogg Vorbis audio:
+Ogg Vorbis audio
 @example
 <Stream test.ogg>
 Feed feed1.ffm
@@ -684,7 +773,6 @@ Feed feed1.ffm
 Format rm
 AudioBitRate 32
 NoVideo
-NoAudio
 </Stream>
 @end example
 
@@ -698,7 +786,6 @@ AudioBitRate 32
 VideoBitRate 128
 VideoFrameRate 25
 VideoGopSize 25
-NoAudio
 </Stream>
 @end example