ffserver.conf 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. # Port on which the server is listening. You must select a different
  2. # port from your standard HTTP web server if it is running on the same
  3. # computer.
  4. Port 8090
  5. # Address on which the server is bound. Only useful if you have
  6. # several network interfaces.
  7. BindAddress 0.0.0.0
  8. # Number of simultaneous requests that can be handled. Since FFServer
  9. # is very fast, it is more likely that you will want to leave this high
  10. # and use MaxBandwidth, below.
  11. MaxClients 1000
  12. # This the maximum amount of kbit/sec that you are prepared to
  13. # consume when streaming to clients.
  14. MaxBandwidth 1000
  15. # Access log file (uses standard Apache log file format)
  16. # '-' is the standard output.
  17. CustomLog -
  18. # Suppress that if you want to launch ffserver as a daemon.
  19. NoDaemon
  20. ##################################################################
  21. # Definition of the live feeds. Each live feed contains one video
  22. # and/or audio sequence coming from an ffmpeg encoder or another
  23. # ffserver. This sequence may be encoded simultaneously with several
  24. # codecs at several resolutions.
  25. <Feed feed1.ffm>
  26. # You must use 'ffmpeg' to send a live feed to ffserver. In this
  27. # example, you can type:
  28. #
  29. # ffmpeg http://localhost:8090/feed1.ffm
  30. # ffserver can also do time shifting. It means that it can stream any
  31. # previously recorded live stream. The request should contain:
  32. # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
  33. # a path where the feed is stored on disk. You also specify the
  34. # maximum size of the feed, where zero means unlimited. Default:
  35. # File=/tmp/feed_name.ffm FileMaxSize=5M
  36. File /tmp/feed1.ffm
  37. FileMaxSize 200K
  38. # You could specify
  39. # ReadOnlyFile /saved/specialvideo.ffm
  40. # This marks the file as readonly and it will not be deleted or updated.
  41. # Specify launch in order to start ffmpeg automatically.
  42. # First ffmpeg must be defined with an appropriate path if needed,
  43. # after that options can follow, but avoid adding the http:// field
  44. #Launch ffmpeg
  45. # Only allow connections from localhost to the feed.
  46. ACL allow 127.0.0.1
  47. </Feed>
  48. ##################################################################
  49. # Now you can define each stream which will be generated from the
  50. # original audio and video stream. Each format has a filename (here
  51. # 'test1.mpg'). FFServer will send this stream when answering a
  52. # request containing this filename.
  53. <Stream test1.mpg>
  54. # coming from live feed 'feed1'
  55. Feed feed1.ffm
  56. # Format of the stream : you can choose among:
  57. # mpeg : MPEG-1 multiplexed video and audio
  58. # mpegvideo : only MPEG-1 video
  59. # mp2 : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)
  60. # ogg : Ogg format (Vorbis audio codec)
  61. # rm : RealNetworks-compatible stream. Multiplexed audio and video.
  62. # ra : RealNetworks-compatible stream. Audio only.
  63. # mpjpeg : Multipart JPEG (works with Netscape without any plugin)
  64. # jpeg : Generate a single JPEG image.
  65. # asf : ASF compatible streaming (Windows Media Player format).
  66. # swf : Macromedia Flash compatible stream
  67. # avi : AVI format (MPEG-4 video, MPEG audio sound)
  68. # master : special ffmpeg stream used to duplicate a server
  69. Format mpeg
  70. # Bitrate for the audio stream. Codecs usually support only a few
  71. # different bitrates.
  72. AudioBitRate 32
  73. # Number of audio channels: 1 = mono, 2 = stereo
  74. AudioChannels 1
  75. # Sampling frequency for audio. When using low bitrates, you should
  76. # lower this frequency to 22050 or 11025. The supported frequencies
  77. # depend on the selected audio codec.
  78. AudioSampleRate 44100
  79. # Bitrate for the video stream
  80. VideoBitRate 64
  81. # Ratecontrol buffer size
  82. VideoBufferSize 40
  83. # Number of frames per second
  84. VideoFrameRate 3
  85. # Size of the video frame: WxH (default: 160x128)
  86. # The following abbreviations are defined: sqcif, qcif, cif, 4cif
  87. VideoSize 160x128
  88. # Transmit only intra frames (useful for low bitrates, but kills frame rate).
  89. #VideoIntraOnly
  90. # If non-intra only, an intra frame is transmitted every VideoGopSize
  91. # frames. Video synchronization can only begin at an intra frame.
  92. VideoGopSize 12
  93. # More MPEG-4 parameters
  94. # VideoHighQuality
  95. # Video4MotionVector
  96. # Choose your codecs:
  97. #AudioCodec mp2
  98. #VideoCodec mpeg1video
  99. # Suppress audio
  100. #NoAudio
  101. # Suppress video
  102. #NoVideo
  103. #VideoQMin 3
  104. #VideoQMax 31
  105. # Set this to the number of seconds backwards in time to start. Note that
  106. # most players will buffer 5-10 seconds of video, and also you need to allow
  107. # for a keyframe to appear in the data stream.
  108. #Preroll 15
  109. # ACL:
  110. # You can allow ranges of addresses (or single addresses)
  111. #ACL ALLOW <first address> <last address>
  112. # You can deny ranges of addresses (or single addresses)
  113. #ACL DENY <first address> <last address>
  114. # You can repeat the ACL allow/deny as often as you like. It is on a per
  115. # stream basis. The first match defines the action. If there are no matches,
  116. # then the default is the inverse of the last ACL statement.
  117. #
  118. # Thus 'ACL allow localhost' only allows access from localhost.
  119. # 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
  120. # allow everybody else.
  121. </Stream>
  122. ##################################################################
  123. # Example streams
  124. # Multipart JPEG
  125. #<Stream test.mjpg>
  126. #Feed feed1.ffm
  127. #Format mpjpeg
  128. #VideoFrameRate 2
  129. #VideoIntraOnly
  130. #NoAudio
  131. #Strict -1
  132. #</Stream>
  133. # Single JPEG
  134. #<Stream test.jpg>
  135. #Feed feed1.ffm
  136. #Format jpeg
  137. #VideoFrameRate 2
  138. #VideoIntraOnly
  139. ##VideoSize 352x240
  140. #NoAudio
  141. #Strict -1
  142. #</Stream>
  143. # Flash
  144. #<Stream test.swf>
  145. #Feed feed1.ffm
  146. #Format swf
  147. #VideoFrameRate 2
  148. #VideoIntraOnly
  149. #NoAudio
  150. #</Stream>
  151. # ASF compatible
  152. <Stream test.asf>
  153. Feed feed1.ffm
  154. Format asf
  155. VideoFrameRate 15
  156. VideoSize 352x240
  157. VideoBitRate 256
  158. VideoBufferSize 40
  159. VideoGopSize 30
  160. AudioBitRate 64
  161. StartSendOnKey
  162. </Stream>
  163. # MP3 audio
  164. #<Stream test.mp3>
  165. #Feed feed1.ffm
  166. #Format mp2
  167. #AudioCodec mp3
  168. #AudioBitRate 64
  169. #AudioChannels 1
  170. #AudioSampleRate 44100
  171. #NoVideo
  172. #</Stream>
  173. # Ogg Vorbis audio
  174. #<Stream test.ogg>
  175. #Feed feed1.ffm
  176. #Title "Stream title"
  177. #AudioBitRate 64
  178. #AudioChannels 2
  179. #AudioSampleRate 44100
  180. #NoVideo
  181. #</Stream>
  182. # Real with audio only at 32 kbits
  183. #<Stream test.ra>
  184. #Feed feed1.ffm
  185. #Format rm
  186. #AudioBitRate 32
  187. #NoVideo
  188. #NoAudio
  189. #</Stream>
  190. # Real with audio and video at 64 kbits
  191. #<Stream test.rm>
  192. #Feed feed1.ffm
  193. #Format rm
  194. #AudioBitRate 32
  195. #VideoBitRate 128
  196. #VideoFrameRate 25
  197. #VideoGopSize 25
  198. #NoAudio
  199. #</Stream>
  200. ##################################################################
  201. # A stream coming from a file: you only need to set the input
  202. # filename and optionally a new format. Supported conversions:
  203. # AVI -> ASF
  204. #<Stream file.rm>
  205. #File "/usr/local/httpd/htdocs/tlive.rm"
  206. #NoAudio
  207. #</Stream>
  208. #<Stream file.asf>
  209. #File "/usr/local/httpd/htdocs/test.asf"
  210. #NoAudio
  211. #Author "Me"
  212. #Copyright "Super MegaCorp"
  213. #Title "Test stream from disk"
  214. #Comment "Test comment"
  215. #</Stream>
  216. ##################################################################
  217. # RTSP examples
  218. #
  219. # You can access this stream with the RTSP URL:
  220. # rtsp://localhost:5454/test1-rtsp.mpg
  221. #
  222. # A non-standard RTSP redirector is also created. Its URL is:
  223. # http://localhost:8090/test1-rtsp.rtsp
  224. #<Stream test1-rtsp.mpg>
  225. #Format rtp
  226. #File "/usr/local/httpd/htdocs/test1.mpg"
  227. #</Stream>
  228. ##################################################################
  229. # SDP/multicast examples
  230. #
  231. # If you want to send your stream in multicast, you must set the
  232. # multicast address with MulticastAddress. The port and the TTL can
  233. # also be set.
  234. #
  235. # An SDP file is automatically generated by ffserver by adding the
  236. # 'sdp' extension to the stream name (here
  237. # http://localhost:8090/test1-sdp.sdp). You should usually give this
  238. # file to your player to play the stream.
  239. #
  240. # The 'NoLoop' option can be used to avoid looping when the stream is
  241. # terminated.
  242. #<Stream test1-sdp.mpg>
  243. #Format rtp
  244. #File "/usr/local/httpd/htdocs/test1.mpg"
  245. #MulticastAddress 224.124.0.1
  246. #MulticastPort 5000
  247. #MulticastTTL 16
  248. #NoLoop
  249. #</Stream>
  250. ##################################################################
  251. # Special streams
  252. # Server status
  253. <Stream stat.html>
  254. Format status
  255. # Only allow local people to get the status
  256. ACL allow localhost
  257. ACL allow 192.168.0.0 192.168.255.255
  258. #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
  259. </Stream>
  260. # Redirect index.html to the appropriate site
  261. <Redirect index.html>
  262. URL http://www.ffmpeg.org/
  263. </Redirect>