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