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