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