Advertisement
Guest User

ffserver.conf

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