Advertisement
Guest User

Untitled

a guest
Mar 11th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.28 KB | None | 0 0
  1. cat /etc/ffserver.conf
  2. # Port on which the server is listening. You must select a different
  3. # port from your standard HTTP web server if it is running on the same
  4. # computer.
  5. Port 8090
  6.  
  7. # Address on which the server is bound. Only useful if you have
  8. # several network interfaces.
  9. BindAddress 0.0.0.0
  10.  
  11. # Number of simultaneous HTTP connections that can be handled. It has
  12. # to be defined *before* the MaxClients parameter, since it defines the
  13. # MaxClients maximum limit.
  14. MaxHTTPConnections 2000
  15.  
  16. # Number of simultaneous requests that can be handled. Since FFServer
  17. # is very fast, it is more likely that you will want to leave this high
  18. # and use MaxBandwidth, below.
  19. MaxClients 1000
  20.  
  21. # This the maximum amount of kbit/sec that you are prepared to
  22. # consume when streaming to clients.
  23. MaxBandwidth 1000
  24.  
  25. # Access log file (uses standard Apache log file format)
  26. # '-' is the standard output.
  27. CustomLog -
  28.  
  29. # Suppress that if you want to launch ffserver as a daemon.
  30. NoDaemon
  31.  
  32.  
  33. ##################################################################
  34. # Definition of the live feeds. Each live feed contains one video
  35. # and/or audio sequence coming from an ffmpeg encoder or another
  36. # ffserver. This sequence may be encoded simultaneously with several
  37. # codecs at several resolutions.
  38.  
  39. <Feed feed1.ffm>
  40.  
  41. # You must use 'ffmpeg' to send a live feed to ffserver. In this
  42. # example, you can type:
  43. #
  44. # ffmpeg http://localhost:8090/feed1.ffm
  45.  
  46. # ffserver can also do time shifting. It means that it can stream any
  47. # previously recorded live stream. The request should contain:
  48. # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
  49. # a path where the feed is stored on disk. You also specify the
  50. # maximum size of the feed, where zero means unlimited. Default:
  51. # File=/tmp/feed_name.ffm FileMaxSize=5M
  52. File /tmp/feed1.ffm
  53. FileMaxSize 200K
  54.  
  55. # You could specify
  56. # ReadOnlyFile /saved/specialvideo.ffm
  57. # This marks the file as readonly and it will not be deleted or updated.
  58.  
  59. # Specify launch in order to start ffmpeg automatically.
  60. # First ffmpeg must be defined with an appropriate path if needed,
  61. # after that options can follow, but avoid adding the http:// field
  62. #Launch ffmpeg
  63.  
  64. # Only allow connections from localhost to the feed.
  65. ACL allow 127.0.0.1
  66.  
  67. </Feed>
  68.  
  69.  
  70. ##################################################################
  71. # Now you can define each stream which will be generated from the
  72. # original audio and video stream. Each format has a filename (here
  73. # 'test1.mpg'). FFServer will send this stream when answering a
  74. # request containing this filename.
  75.  
  76. #<Stream test1.mpg>
  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 16
  98.  
  99. # Number of audio channels: 1 = mono, 2 = stereo
  100. #AudioChannels 1
  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. #AudioSampleRate 44100
  106.  
  107. # Bitrate for the video stream
  108. #VideoBitRate 128
  109.  
  110. # Ratecontrol buffer size
  111. #VideoBufferSize 40
  112.  
  113. # Number of frames per second
  114. #VideoFrameRate 3
  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 320x240
  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.  
  134. # Choose your codecs:
  135. #AudioCodec libfaac
  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. #Feed feed1.ffm
  204. #Format swf
  205. #VideoFrameRate 2
  206. #VideoIntraOnly
  207. #NoAudio
  208. #</Stream>
  209.  
  210.  
  211. # ASF compatible
  212.  
  213. #<Stream test.asf>
  214. #Feed feed1.ffm
  215. #Format asf
  216. #VideoFrameRate 15
  217. #VideoSize 352x240
  218. #VideoBitRate 256
  219. #VideoBufferSize 40
  220. #VideoGopSize 30
  221. #AudioBitRate 64
  222. #StartSendOnKey
  223. #</Stream>
  224.  
  225.  
  226. # MP3 audio
  227.  
  228. #<Stream test.mp3>
  229. #Feed feed1.ffm
  230. #Format mp2
  231. #AudioCodec mp3
  232. #AudioBitRate 64
  233. #AudioChannels 1
  234. #AudioSampleRate 44100
  235. #NoVideo
  236. #</Stream>
  237.  
  238.  
  239. # Ogg Vorbis audio
  240.  
  241. #<Stream test.ogg>
  242. #Feed feed1.ffm
  243. #Title "Stream title"
  244. #AudioBitRate 64
  245. #AudioChannels 2
  246. #AudioSampleRate 44100
  247. #NoVideo
  248. #</Stream>
  249.  
  250.  
  251. # Real with audio only at 32 kbits
  252.  
  253. #<Stream test.ra>
  254. #Feed feed1.ffm
  255. #Format rm
  256. #AudioBitRate 32
  257. #NoVideo
  258. #NoAudio
  259. #</Stream>
  260.  
  261.  
  262. # Real with audio and video at 64 kbits
  263.  
  264. #<Stream test.rm>
  265. #Feed feed1.ffm
  266. #Format rm
  267. #AudioBitRate 32
  268. #VideoBitRate 128
  269. #VideoFrameRate 25
  270. #VideoGopSize 25
  271. #NoAudio
  272. #</Stream>
  273.  
  274.  
  275. ##################################################################
  276. # A stream coming from a file: you only need to set the input
  277. # filename and optionally a new format. Supported conversions:
  278. # AVI -> ASF
  279.  
  280. #<Stream file.rm>
  281. #File "/usr/local/httpd/htdocs/tlive.rm"
  282. #NoAudio
  283. #</Stream>
  284.  
  285. #<Stream file.asf>
  286. #File "/usr/local/httpd/htdocs/test.asf"
  287. #NoAudio
  288. #Author "Me"
  289. #Copyright "Super MegaCorp"
  290. #Title "Test stream from disk"
  291. #Comment "Test comment"
  292. #</Stream>
  293.  
  294.  
  295. ##################################################################
  296. # RTSP examples
  297. #
  298. # You can access this stream with the RTSP URL:
  299. # rtsp://localhost:5454/test1-rtsp.mpg
  300. #
  301. # A non-standard RTSP redirector is also created. Its URL is:
  302. # http://localhost:8090/test1-rtsp.rtsp
  303.  
  304. #<Stream test1-rtsp.mpg>
  305. #Format rtp
  306. #File "/usr/local/httpd/htdocs/test1.mpg"
  307. #</Stream>
  308.  
  309.  
  310. # Transcode an incoming live feed to another live feed,
  311. # using libx264 and video presets
  312.  
  313. <Stream live.h264>
  314. Format rtp
  315. Feed feed1.ffm
  316. VideoCodec libx264
  317. VideoFrameRate 24
  318. VideoBitRate 128
  319. VideoSize 320x240
  320. #AVPresetVideo default
  321. #AVPresetVideo baseline
  322. AVOptionVideo flags +global_header
  323. #
  324. AudioCodec libfaac
  325. AudioBitRate 16
  326. AudioChannels 1
  327. AudioSampleRate 44100
  328. AVOptionAudio flags +global_header
  329. </Stream>
  330.  
  331. ##################################################################
  332. # SDP/multicast examples
  333. #
  334. # If you want to send your stream in multicast, you must set the
  335. # multicast address with MulticastAddress. The port and the TTL can
  336. # also be set.
  337. #
  338. # An SDP file is automatically generated by ffserver by adding the
  339. # 'sdp' extension to the stream name (here
  340. # http://localhost:8090/test1-sdp.sdp). You should usually give this
  341. # file to your player to play the stream.
  342. #
  343. # The 'NoLoop' option can be used to avoid looping when the stream is
  344. # terminated.
  345.  
  346. #<Stream test1-sdp.mpg>
  347. #Format rtp
  348. #File "/usr/local/httpd/htdocs/test1.mpg"
  349. #MulticastAddress 224.124.0.1
  350. #MulticastPort 5000
  351. #MulticastTTL 16
  352. #NoLoop
  353. #</Stream>
  354.  
  355.  
  356. ##################################################################
  357. # Special streams
  358.  
  359. # Server status
  360.  
  361. <Stream stat.html>
  362. Format status
  363.  
  364. # Only allow local people to get the status
  365. ACL allow localhost
  366. ACL allow 192.168.0.0 192.168.255.255
  367.  
  368. #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
  369. </Stream>
  370.  
  371.  
  372. # Redirect index.html to the appropriate site
  373.  
  374. <Redirect index.html>
  375. URL http://www.ffmpeg.org/
  376. </Redirect>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement