]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blob - doc/ffserver.conf
Add some examples of using ACL
[frescor/ffmpeg.git] / doc / ffserver.conf
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
5 Port 8090
6
7 # Address on which the server is bound. Only useful if you have
8 # several network interfaces.
9
10 BindAddress 0.0.0.0
11
12 # Number of simultaneous requests that can be handled. Since FFServer
13 # is very fast, this limit is determined mainly by your Internet
14 # connection speed.
15
16 MaxClients 1000
17
18 # This the maximum amount of kbit/sec that you are prepared to
19 # consume when streaming to clients
20
21 MaxBandwidth 1000
22
23 # Access Log file (uses standard Apache log file format)
24 # '-' is the standard output
25
26 CustomLog -
27
28 # Suppress that if you want to launch ffserver as a daemon
29 NoDaemon
30
31 ##################################################################
32 # Definition of the live feeds. Each live feed contains one video
33 # and/or audio sequence coming from an ffmpeg encoder or another
34 # ffserver. This sequence may be encoded simultaneously with several
35 # codecs at several resolutions.
36
37 <Feed feed1.ffm>
38
39 # You must use 'ffmpeg' to send a live feed to ffserver. In this
40 # example, you can type:
41
42 # ffmpeg http://localhost:8090/feed1.ffm
43
44 # ffserver can also do time shifting. It means that it can stream any
45 # previously recorded live stream. The request should contain:
46 # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
47 # a path where the feed is stored on disk. You also specify the
48 # maximum size of the feed (100M bytes here). Default:
49 # File=/tmp/feed_name.ffm FileMaxSize=5M
50
51 File /tmp/feed1.ffm
52 FileMaxSize 200K
53
54 # Specify launch in order to start ffmpeg automatically
55 # Launch
56
57 # Only allow connections from localhost to the feed
58 ACL allow 127.0.0.1
59
60 </Feed>
61
62 ##################################################################
63 # Now you can define each stream which will be generated from the
64 # original audio and video stream. Each format has a filename (here
65 # 'test128.mpg'). FFServer will send this stream when answering a
66 # request containing this filename.
67
68 <Stream test1.mpg>
69
70 # coming from live feed 'feed1'
71 Feed feed1.ffm
72
73 # Format of the stream : you can choose among:
74 # mpeg       : MPEG1 multiplexed video and audio
75 # mpegvideo  : only MPEG1 video
76 # mp2        : MPEG audio layer 2
77 # mp3        : MPEG audio layer 3 (currently sent as layer 2)
78 # rm         : Real Networks compatible stream. Multiplexed audio and video.
79 # ra         : Real Networks compatible stream. Audio only.
80 # mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
81 # jpeg       : Generate a single JPEG image.
82 # asf        : ASF compatible stream (Windows Media Player format). Not finished yet.
83 # swf        : Macromedia flash(tm) compatible stream
84 # avi        : AVI format (open divx video, mpeg audio sound)
85 # master     : special ffmpeg stream used to duplicate a server
86
87 Format mpeg
88
89 # Bitrate for the audio stream. Codecs usually support only a few different bitrates. 
90
91 AudioBitRate 32
92
93 # Number of audio channels : 1 = mono, 2 = stereo
94
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
101 AudioSampleRate 44100
102
103 # Bitrate for the video stream.
104 VideoBitRate 64
105
106 # Number of frames per second
107 VideoFrameRate 3
108
109 # Size of the video frame : WxH (default: 160x128)
110 # W : width, H : height
111 # The following abbreviation are defined : sqcif, qcif, cif, 4cif
112 VideoSize    160x128
113
114 # transmit only intra frames (useful for low bitrates, but kills frame rate) 
115 #VideoIntraOnly
116
117 # If non intra only, an intra frame is transmitted every VideoGopSize
118 # frames Video synchronization can only begin at an I frames.
119 VideoGopSize 12
120
121 # Choose your codecs: 
122
123 #AudioCodec mp2
124 #VideoCodec mpeg1video
125
126 # Suppress audio
127 #NoAudio
128
129 # Suppress video
130 #NoVideo
131
132 #VideoQMin 3
133 #VideoQMax 31
134
135 # Set this to the number of seconds backwards in time to start. Note that
136 # most players will buffer 5-10 seconds of video, and also you need to allow
137 # for a key frame to appear in the data stream.
138 #PreRoll 15
139
140 # ACL:
141
142 # You can allow ranges of addresses (or single addresses)
143 # ACL ALLOW <first address> <last address>
144
145 # You can deny ranges of addresses (or single addresses)
146 # ACL DENY <first address> <last address>
147
148 # You can repeat the ACL allow/deny as often as you like. It is on a per stream basis. The first
149 # match defines the action. If there are no matches, then the default is the inverse of the last
150 # ACL statement. Thus 'ACL allow localhost' only allows access from localhost. 
151 # 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and allow everybody else.
152
153 </Stream>
154
155 # second mpeg stream with high frame rate
156
157 #<Stream test2.mpg>
158 #Feed feed1.ffm
159 #Format mpegvideo
160 #VideoBitRate 128
161 #VideoFrameRate 25
162 ###VideoSize    352x240
163 #VideoGopSize 25
164 #NoAudio
165 #</Stream>
166 #
167 ##################################################################
168 # A stream coming from a file : you only need to set the input
169 # filename and optionnally a new format. Supported conversions:
170 #    avi -> asf
171 #
172
173 # another file streaming
174 <Stream file.rm>
175
176 File "/usr/local/httpd/htdocs/tlive.rm"
177 NoAudio
178
179 </Stream>
180
181 <Stream file.asf>
182
183 File "/usr/local/httpd/htdocs/test.asf"
184 NoAudio
185 Author "Me"
186 Copyright "Super MegaCorp"
187 Title "Test stream from disk"
188 Comment "Test comment"
189
190 </Stream>
191
192 ##################################################################
193 # Another stream : Real with audio only at 32 kbits
194
195 <Stream test.ra>
196
197 Feed feed1.ffm
198 Format rm
199 AudioBitRate 32
200 NoVideo
201 NoAudio
202
203 </Stream>
204
205 ##################################################################
206 # Another stream : Real with audio and video at 64 kbits
207
208 #<Stream test.rm>
209
210 #Feed feed1.ffm
211 #Format rm
212
213 #AudioBitRate 32
214 #VideoBitRate 128
215 #VideoFrameRate 25
216 #VideoGopSize 25
217 #NoAudio
218
219 #</Stream>
220
221 <Stream test2.rm>
222
223 Feed feed1.ffm
224 Format rm
225
226 VideoBitRate 128
227 VideoFrameRate 15
228 VideoGopSize 25
229 VideoSize    320x240
230 AudioBitRate 64
231
232 </Stream>
233
234 ##################################################################
235 # Another stream : Multipart JPEG
236
237 #<Stream test.mjpg>
238 #
239 #Feed feed1.ffm
240 #Format mpjpeg
241 #
242 #VideoFrameRate 2
243 #VideoIntraOnly
244 #NoAudio
245 #
246 #</Stream>
247
248 ##################################################################
249 # Another stream : Multipart JPEG
250
251 #<Stream test.jpg>
252 #
253 #Feed feed1.ffm
254 #Format jpeg
255 #
256 ## the parameters are choose here to take the same output as the
257 ## Multipart JPEG one.
258 #VideoFrameRate 2 
259 #VideoIntraOnly
260 ##VideoSize 352x240
261 #NoAudio
262 #
263 #</Stream>
264
265 ##################################################################
266 # Another stream : Flash
267
268 #<Stream test.swf>
269
270 #Feed feed1.ffm
271 #Format swf
272 #
273 #VideoFrameRate 2
274 #VideoIntraOnly
275 #NoAudio
276 #
277 #</Stream>
278
279
280 ##################################################################
281 # Another stream : ASF compatible
282
283 <Stream test.asf>
284
285 Feed feed1.ffm
286 Format asf
287 #
288 VideoFrameRate 15
289 VideoSize 352x240
290 VideoBitRate 256
291 VideoGopSize 30
292 AudioBitRate 64
293 StartSendOnKey
294
295 </Stream>
296
297 <Stream testv.asf>
298
299 Feed feed1.ffm
300 Format asf
301 #
302 VideoFrameRate 15
303 VideoSize 352x240
304 VideoBitRate 256
305 VideoGopSize 30
306 NoAudio
307 StartSendOnKey
308
309 </Stream>
310
311 <Stream testv2.asf>
312
313 Feed feed1.ffm
314 Format asf
315 #
316 VideoFrameRate 15
317 VideoSize 352x240
318 VideoBitRate 128
319 VideoGopSize 30
320 NoAudio
321 StartSendOnKey
322
323 </Stream>
324
325 ##################################################################
326 # RTSP examples
327
328 # You can access to this stream with the RTSP URL:
329 #
330 # rtsp://localhost:5454/test1-rtsp.mpg
331 #
332 # A non standard redirector is also created. Its URL is:
333 #
334 # http://localhost:8090/test1-rtsp.rtsp
335 #
336 #<Stream test1-rtsp.mpg>
337 #
338 #Format rtp
339 #File "/usr/local/httpd/htdocs/test1.mpg"
340 #
341 #</Stream>
342
343 ##################################################################
344 # Special stream : server status
345
346 <Stream stat.html>
347
348 Format status
349
350 # Only allow local people to get to the status
351
352 ACL allow localhost
353 ACL allow 192.168.0.0 192.168.255.255
354
355 FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
356
357 </Stream>
358
359
360 <Redirect index.html>
361 # maps index.html to the appropriate site
362 URL http://ffmpeg.sourceforge.net/
363 </Redirect>