Revision 34d7008d doc/ffserver.conf

View differences:

doc/ffserver.conf
1 1
# Port on which the server is listening. You must select a different
2 2
# port from your standard http web server if it is running on the same
3 3
# computer.
4

  
5 4
Port 8090
6 5

  
7 6
# Address on which the server is bound. Only useful if you have
8 7
# several network interfaces.
9

  
10 8
BindAddress 0.0.0.0
11 9

  
12 10
# 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

  
11
# is very fast, it is more likely that you will want to leave this high
12
# and use MaxBandwidth, below.
16 13
MaxClients 1000
17 14

  
18 15
# This the maximum amount of kbit/sec that you are prepared to
19 16
# consume when streaming to clients
20

  
21 17
MaxBandwidth 1000
22 18

  
23 19
# Access Log file (uses standard Apache log file format)
24 20
# '-' is the standard output
25

  
26 21
CustomLog -
27 22

  
28 23
# Suppress that if you want to launch ffserver as a daemon
29 24
NoDaemon
30 25

  
26

  
31 27
##################################################################
32 28
# Definition of the live feeds. Each live feed contains one video
33 29
# and/or audio sequence coming from an ffmpeg encoder or another
......
47 43
# a path where the feed is stored on disk. You also specify the
48 44
# maximum size of the feed (100M bytes here). Default:
49 45
# File=/tmp/feed_name.ffm FileMaxSize=5M
50

  
51 46
File /tmp/feed1.ffm
52 47
FileMaxSize 200K
53 48

  
54 49
# Specify launch in order to start ffmpeg automatically
55
# Launch
50
#Launch
56 51

  
57 52
# Only allow connections from localhost to the feed
58 53
ACL allow 127.0.0.1
59 54

  
60 55
</Feed>
61 56

  
57

  
62 58
##################################################################
63 59
# Now you can define each stream which will be generated from the
64 60
# original audio and video stream. Each format has a filename (here
65
# 'test128.mpg'). FFServer will send this stream when answering a
61
# 'test1.mpg'). FFServer will send this stream when answering a
66 62
# request containing this filename.
67 63

  
68 64
<Stream test1.mpg>
......
73 69
# Format of the stream : you can choose among:
74 70
# mpeg       : MPEG1 multiplexed video and audio
75 71
# mpegvideo  : only MPEG1 video
76
# mp2        : MPEG audio layer 2
77
# mp3        : MPEG audio layer 3 (currently sent as layer 2)
72
# mp2        : MPEG2 audio (use AudioCodec to select layer 2 and 3 codec)
73
# ogg        : Ogg format (Vorbis audio codec)
78 74
# rm         : Real Networks compatible stream. Multiplexed audio and video.
79 75
# ra         : Real Networks compatible stream. Audio only.
80 76
# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
81 77
# jpeg       : Generate a single JPEG image.
82
# asf        : ASF compatible stream (Windows Media Player format). Not finished yet.
78
# asf        : ASF compatible stream (Windows Media Player format).
83 79
# swf        : Macromedia flash(tm) compatible stream
84 80
# avi        : AVI format (open divx video, mpeg audio sound)
85 81
# master     : special ffmpeg stream used to duplicate a server
86

  
87 82
Format mpeg
88 83

  
89
# Bitrate for the audio stream. Codecs usually support only a few different bitrates. 
90

  
84
# Bitrate for the audio stream. Codecs usually support only a few
85
# different bitrates. 
91 86
AudioBitRate 32
92 87

  
93 88
# Number of audio channels : 1 = mono, 2 = stereo
94

  
95 89
AudioChannels 1
96 90

  
97 91
# Sampling frequency for audio. When using low bitrates, you should
98 92
# lower this frequency to 22050 or 11025. The supported frequencies
99 93
# depend on the selected audio codec.
100

  
101 94
AudioSampleRate 44100
102 95

  
103 96
# Bitrate for the video stream.
......
107 100
VideoFrameRate 3
108 101

  
109 102
# Size of the video frame : WxH (default: 160x128)
110
# W : width, H : height
111 103
# The following abbreviation are defined : sqcif, qcif, cif, 4cif
112
VideoSize    160x128
104
VideoSize 160x128
113 105

  
114 106
# transmit only intra frames (useful for low bitrates, but kills frame rate) 
115 107
#VideoIntraOnly
......
119 111
VideoGopSize 12
120 112

  
121 113
# Choose your codecs: 
122

  
123 114
#AudioCodec mp2
124 115
#VideoCodec mpeg1video
125 116

  
......
140 131
# ACL:
141 132

  
142 133
# You can allow ranges of addresses (or single addresses)
143
# ACL ALLOW <first address> <last address>
134
#ACL ALLOW <first address> <last address>
144 135

  
145 136
# You can deny ranges of addresses (or single addresses)
146
# ACL DENY <first address> <last address>
137
#ACL DENY <first address> <last address>
147 138

  
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
139
# You can repeat the ACL allow/deny as often as you like. It is on a per
140
# stream basis. The first match defines the action. If there are no matches,
141
# then the default is the inverse of the last ACL statement.
171 142
#
172

  
173
# another file streaming
174
<Stream file.rm>
175

  
176
File "/usr/local/httpd/htdocs/tlive.rm"
177
NoAudio
143
# Thus 'ACL allow localhost' only allows access from localhost. 
144
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
145
# allow everybody else.
178 146

  
179 147
</Stream>
180 148

  
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 149

  
192 150
##################################################################
193
# Another stream : Real with audio only at 32 kbits
151
# Example streams
194 152

  
195
<Stream test.ra>
196 153

  
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
154
# Multipart JPEG
236 155

  
237 156
#<Stream test.mjpg>
238
#
239 157
#Feed feed1.ffm
240 158
#Format mpjpeg
241
#
242 159
#VideoFrameRate 2
243 160
#VideoIntraOnly
244 161
#NoAudio
245
#
246 162
#</Stream>
247 163

  
248
##################################################################
249
# Another stream : Multipart JPEG
164

  
165
# Single JPEG
250 166

  
251 167
#<Stream test.jpg>
252
#
253 168
#Feed feed1.ffm
254 169
#Format jpeg
255
#
256
## the parameters are choose here to take the same output as the
257
## Multipart JPEG one.
258 170
#VideoFrameRate 2 
259 171
#VideoIntraOnly
260 172
##VideoSize 352x240
261 173
#NoAudio
262
#
263 174
#</Stream>
264 175

  
265
##################################################################
266
# Another stream : Flash
267 176

  
268
#<Stream test.swf>
177
# Flash
269 178

  
179
#<Stream test.swf>
270 180
#Feed feed1.ffm
271 181
#Format swf
272
#
273 182
#VideoFrameRate 2
274 183
#VideoIntraOnly
275 184
#NoAudio
276
#
277 185
#</Stream>
278 186

  
279 187

  
280
##################################################################
281
# Another stream : ASF compatible
188
# ASF compatible
282 189

  
283
<Stream test.asf>
190
#<Stream test.asf>
191
#Feed feed1.ffm
192
#Format asf
193
#VideoFrameRate 15
194
#VideoSize 352x240
195
#VideoBitRate 256
196
#VideoGopSize 30
197
#AudioBitRate 64
198
#StartSendOnKey
199
#</Stream>
284 200

  
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 201

  
295
</Stream>
202
# MP3 audio 
296 203

  
297
<Stream testv.asf>
204
#<Stream test.mp3>
205
#Feed feed1.ffm
206
#Format mp2
207
#AudioCodec mp3
208
#AudioBitRate 64
209
#AudioChannels 1
210
#AudioSampleRate 44100
211
#NoVideo
212
#</Stream>
298 213

  
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 214

  
309
</Stream>
215
# Ogg Vorbis audio
310 216

  
311
<Stream testv2.asf>
217
#<Stream test.ogg>
218
#Feed feed1.ffm
219
#Title "Stream title"
220
#AudioBitRate 64
221
#AudioChannels 2
222
#AudioSampleRate 44100
223
#NoVideo
224
#</Stream>
312 225

  
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 226

  
323
</Stream>
227
# Real with audio only at 32 kbits
228

  
229
#<Stream test.ra>
230
#Feed feed1.ffm
231
#Format rm
232
#AudioBitRate 32
233
#NoVideo
234
#NoAudio
235
#</Stream>
236

  
237

  
238
# Real with audio and video at 64 kbits
239

  
240
#<Stream test.rm>
241
#Feed feed1.ffm
242
#Format rm
243
#AudioBitRate 32
244
#VideoBitRate 128
245
#VideoFrameRate 25
246
#VideoGopSize 25
247
#NoAudio
248
#</Stream>
249

  
324 250

  
325 251
##################################################################
326
# RTSP examples
252
# A stream coming from a file : you only need to set the input
253
# filename and optionnally a new format. Supported conversions:
254
#    avi -> asf
327 255

  
328
# You can access to this stream with the RTSP URL:
256
#<Stream file.rm>
257
#File "/usr/local/httpd/htdocs/tlive.rm"
258
#NoAudio
259
#</Stream>
260

  
261
#<Stream file.asf>
262
#File "/usr/local/httpd/htdocs/test.asf"
263
#NoAudio
264
#Author "Me"
265
#Copyright "Super MegaCorp"
266
#Title "Test stream from disk"
267
#Comment "Test comment"
268
#</Stream>
269

  
270

  
271
##################################################################
272
# RTSP examples
329 273
#
330
# rtsp://localhost:5454/test1-rtsp.mpg
274
# You can access to this stream with the RTSP URL:
275
#   rtsp://localhost:5454/test1-rtsp.mpg
331 276
#
332 277
# A non standard RTSP redirector is also created. Its URL is:
333
#
334
# http://localhost:8090/test1-rtsp.rtsp
335
#
278
#   http://localhost:8090/test1-rtsp.rtsp
279

  
336 280
#<Stream test1-rtsp.mpg>
337
#
338 281
#Format rtp
339 282
#File "/usr/local/httpd/htdocs/test1.mpg"
340
#
341 283
#</Stream>
342 284

  
285

  
343 286
##################################################################
344 287
# SDP/multicast examples
345

  
288
#
346 289
# If you want to send your stream in multicast, you must set the
347 290
# multicast address with MulticastAddress. The port and the TTL can
348 291
# also be set.
......
354 297
# 
355 298
# The 'NoLoop' option can be used to avoid looping when the stream is
356 299
# terminated.
357
#
300

  
358 301
#<Stream test1-sdp.mpg>
359
#
360 302
#Format rtp
361 303
#File "/usr/local/httpd/htdocs/test1.mpg"
362 304
#MulticastAddress 224.124.0.1
363 305
#MulticastPort 5000
364 306
#MulticastTTL 16
365 307
#NoLoop
366
#
367 308
#</Stream>
368 309

  
310

  
369 311
##################################################################
370
# Special stream : server status
312
# Special streams
371 313

  
372
<Stream stat.html>
314
# Server status
373 315

  
316
<Stream stat.html>
374 317
Format status
375 318

  
376 319
# Only allow local people to get to the status
377

  
378 320
ACL allow localhost
379 321
ACL allow 192.168.0.0 192.168.255.255
380 322

  
381
FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
382

  
323
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
383 324
</Stream>
384 325

  
385 326

  
327
# Redirect index.html to the appropriate site
328

  
386 329
<Redirect index.html>
387
# maps index.html to the appropriate site
388 330
URL http://ffmpeg.sourceforge.net/
389 331
</Redirect>
332

  
333

  

Also available in: Unified diff