ffserver.conf 8.9 KB

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