ffserver.conf 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  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 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. # asf : ASF compatible streaming (Windows Media Player format).
  68. # swf : Macromedia Flash compatible stream
  69. # avi : AVI format (MPEG-4 video, MPEG audio sound)
  70. Format mpeg
  71. # Bitrate for the audio stream. Codecs usually support only a few
  72. # different bitrates.
  73. AudioBitRate 32
  74. # Number of audio channels: 1 = mono, 2 = stereo
  75. AudioChannels 1
  76. # Sampling frequency for audio. When using low bitrates, you should
  77. # lower this frequency to 22050 or 11025. The supported frequencies
  78. # depend on the selected audio codec.
  79. AudioSampleRate 44100
  80. # Bitrate for the video stream
  81. VideoBitRate 64
  82. # Ratecontrol buffer size
  83. VideoBufferSize 40
  84. # Number of frames per second
  85. VideoFrameRate 3
  86. # Size of the video frame: WxH (default: 160x128)
  87. # The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
  88. # qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
  89. # wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
  90. # hd1080
  91. VideoSize 160x128
  92. # Transmit only intra frames (useful for low bitrates, but kills frame rate).
  93. #VideoIntraOnly
  94. # If non-intra only, an intra frame is transmitted every VideoGopSize
  95. # frames. Video synchronization can only begin at an intra frame.
  96. VideoGopSize 12
  97. # More MPEG-4 parameters
  98. # VideoHighQuality
  99. # Video4MotionVector
  100. # Choose your codecs:
  101. #AudioCodec mp2
  102. #VideoCodec mpeg1video
  103. # Suppress audio
  104. #NoAudio
  105. # Suppress video
  106. #NoVideo
  107. #VideoQMin 3
  108. #VideoQMax 31
  109. # Set this to the number of seconds backwards in time to start. Note that
  110. # most players will buffer 5-10 seconds of video, and also you need to allow
  111. # for a keyframe to appear in the data stream.
  112. #Preroll 15
  113. # ACL:
  114. # You can allow ranges of addresses (or single addresses)
  115. #ACL ALLOW <first address> <last address>
  116. # You can deny ranges of addresses (or single addresses)
  117. #ACL DENY <first address> <last address>
  118. # You can repeat the ACL allow/deny as often as you like. It is on a per
  119. # stream basis. The first match defines the action. If there are no matches,
  120. # then the default is the inverse of the last ACL statement.
  121. #
  122. # Thus 'ACL allow localhost' only allows access from localhost.
  123. # 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
  124. # allow everybody else.
  125. </Stream>
  126. ##################################################################
  127. # Example streams
  128. # Multipart JPEG
  129. #<Stream test.mjpg>
  130. #Feed feed1.ffm
  131. #Format mpjpeg
  132. #VideoFrameRate 2
  133. #VideoIntraOnly
  134. #NoAudio
  135. #Strict -1
  136. #</Stream>
  137. # Single JPEG
  138. #<Stream test.jpg>
  139. #Feed feed1.ffm
  140. #Format jpeg
  141. #VideoFrameRate 2
  142. #VideoIntraOnly
  143. ##VideoSize 352x240
  144. #NoAudio
  145. #Strict -1
  146. #</Stream>
  147. # Flash
  148. #<Stream test.swf>
  149. #Feed feed1.ffm
  150. #Format swf
  151. #VideoFrameRate 2
  152. #VideoIntraOnly
  153. #NoAudio
  154. #</Stream>
  155. # ASF compatible
  156. <Stream test.asf>
  157. Feed feed1.ffm
  158. Format asf
  159. VideoFrameRate 15
  160. VideoSize 352x240
  161. VideoBitRate 256
  162. VideoBufferSize 40
  163. VideoGopSize 30
  164. AudioBitRate 64
  165. StartSendOnKey
  166. </Stream>
  167. # MP3 audio
  168. #<Stream test.mp3>
  169. #Feed feed1.ffm
  170. #Format mp2
  171. #AudioCodec mp3
  172. #AudioBitRate 64
  173. #AudioChannels 1
  174. #AudioSampleRate 44100
  175. #NoVideo
  176. #</Stream>
  177. # Ogg Vorbis audio
  178. #<Stream test.ogg>
  179. #Feed feed1.ffm
  180. #Title "Stream title"
  181. #AudioBitRate 64
  182. #AudioChannels 2
  183. #AudioSampleRate 44100
  184. #NoVideo
  185. #</Stream>
  186. # Real with audio only at 32 kbits
  187. #<Stream test.ra>
  188. #Feed feed1.ffm
  189. #Format rm
  190. #AudioBitRate 32
  191. #NoVideo
  192. #NoAudio
  193. #</Stream>
  194. # Real with audio and video at 64 kbits
  195. #<Stream test.rm>
  196. #Feed feed1.ffm
  197. #Format rm
  198. #AudioBitRate 32
  199. #VideoBitRate 128
  200. #VideoFrameRate 25
  201. #VideoGopSize 25
  202. #NoAudio
  203. #</Stream>
  204. ##################################################################
  205. # A stream coming from a file: you only need to set the input
  206. # filename and optionally a new format. Supported conversions:
  207. # AVI -> ASF
  208. #<Stream file.rm>
  209. #File "/usr/local/httpd/htdocs/tlive.rm"
  210. #NoAudio
  211. #</Stream>
  212. #<Stream file.asf>
  213. #File "/usr/local/httpd/htdocs/test.asf"
  214. #NoAudio
  215. #Author "Me"
  216. #Copyright "Super MegaCorp"
  217. #Title "Test stream from disk"
  218. #Comment "Test comment"
  219. #</Stream>
  220. ##################################################################
  221. # RTSP examples
  222. #
  223. # You can access this stream with the RTSP URL:
  224. # rtsp://localhost:5454/test1-rtsp.mpg
  225. #
  226. # A non-standard RTSP redirector is also created. Its URL is:
  227. # http://localhost:8090/test1-rtsp.rtsp
  228. #<Stream test1-rtsp.mpg>
  229. #Format rtp
  230. #File "/usr/local/httpd/htdocs/test1.mpg"
  231. #</Stream>
  232. # Transcode an incoming live feed to another live feed,
  233. # using libx264 and video presets
  234. #<Stream live.h264>
  235. #Format rtp
  236. #Feed feed1.ffm
  237. #VideoCodec libx264
  238. #VideoFrameRate 24
  239. #VideoBitRate 100
  240. #VideoSize 480x272
  241. #AVPresetVideo default
  242. #AVPresetVideo baseline
  243. #AVOptionVideo flags +global_header
  244. #
  245. #AudioCodec libfaac
  246. #AudioBitRate 32
  247. #AudioChannels 2
  248. #AudioSampleRate 22050
  249. #AVOptionAudio flags +global_header
  250. #</Stream>
  251. ##################################################################
  252. # SDP/multicast examples
  253. #
  254. # If you want to send your stream in multicast, you must set the
  255. # multicast address with MulticastAddress. The port and the TTL can
  256. # also be set.
  257. #
  258. # An SDP file is automatically generated by ffserver by adding the
  259. # 'sdp' extension to the stream name (here
  260. # http://localhost:8090/test1-sdp.sdp). You should usually give this
  261. # file to your player to play the stream.
  262. #
  263. # The 'NoLoop' option can be used to avoid looping when the stream is
  264. # terminated.
  265. #<Stream test1-sdp.mpg>
  266. #Format rtp
  267. #File "/usr/local/httpd/htdocs/test1.mpg"
  268. #MulticastAddress 224.124.0.1
  269. #MulticastPort 5000
  270. #MulticastTTL 16
  271. #NoLoop
  272. #</Stream>
  273. ##################################################################
  274. # Special streams
  275. # Server status
  276. <Stream stat.html>
  277. Format status
  278. # Only allow local people to get the status
  279. ACL allow localhost
  280. ACL allow 192.168.0.0 192.168.255.255
  281. #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
  282. </Stream>
  283. # Redirect index.html to the appropriate site
  284. <Redirect index.html>
  285. URL http://www.ffmpeg.org/
  286. </Redirect>