ffserver.conf 8.9 KB

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