Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ 47d944d2

History | View | Annotate | Download (7.91 KB)

1 85f07f22 Fabrice Bellard
# 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 9cfe269e Philip Gladstone
# This the maximum amount of kbit/sec that you are prepared to
19
# consume when streaming to clients
20
21
MaxBandwidth 1000
22
23 85f07f22 Fabrice Bellard
# Access Log file (uses standard Apache log file format)
24
# '-' is the standard output
25
26
CustomLog -
27
28 bc4a1ffe Fabrice Bellard
# Suppress that if you want to launch ffserver as a daemon
29
NoDaemon
30
31 85f07f22 Fabrice Bellard
##################################################################
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 4e33b83b Philip Gladstone
FileMaxSize 200K
53
54
# Specify launch in order to start ffmpeg automatically
55
# Launch
56 85f07f22 Fabrice Bellard
57 a28d4f86 Philip Gladstone
# Only allow connections from localhost to the feed
58
ACL allow 127.0.0.1
59
60 85f07f22 Fabrice Bellard
</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 f359a5be Philip Gladstone
# transmit only intra frames (useful for low bitrates, but kills frame rate) 
115
#VideoIntraOnly
116 85f07f22 Fabrice Bellard
117
# If non intra only, an intra frame is transmitted every VideoGopSize
118
# frames Video synchronization can only begin at an I frames.
119 f359a5be Philip Gladstone
VideoGopSize 12
120
121
# Choose your codecs: 
122
123
#AudioCodec mp2
124
#VideoCodec mpeg1video
125 85f07f22 Fabrice Bellard
126
# Suppress audio
127
#NoAudio
128
129
# Suppress video
130
#NoVideo
131
132 9cfe269e Philip Gladstone
#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 a28d4f86 Philip Gladstone
# 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 85f07f22 Fabrice Bellard
</Stream>
154
155
# second mpeg stream with high frame rate
156
157 f359a5be Philip Gladstone
#<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 85f07f22 Fabrice Bellard
##################################################################
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 f359a5be Philip Gladstone
# another file streaming
174
<Stream file.rm>
175 85f07f22 Fabrice Bellard
176 f359a5be Philip Gladstone
File "/usr/local/httpd/htdocs/tlive.rm"
177
NoAudio
178 85f07f22 Fabrice Bellard
179
</Stream>
180
181 f359a5be Philip Gladstone
<Stream file.asf>
182 85f07f22 Fabrice Bellard
183 f359a5be Philip Gladstone
File "/usr/local/httpd/htdocs/test.asf"
184
NoAudio
185 e4c47db4 Philip Gladstone
Author "Me"
186
Copyright "Super MegaCorp"
187
Title "Test stream from disk"
188
Comment "Test comment"
189 85f07f22 Fabrice Bellard
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 f359a5be Philip Gladstone
NoAudio
202 85f07f22 Fabrice Bellard
203
</Stream>
204
205
##################################################################
206
# Another stream : Real with audio and video at 64 kbits
207
208 f359a5be Philip Gladstone
#<Stream test.rm>
209 85f07f22 Fabrice Bellard
210 f359a5be Philip Gladstone
#Feed feed1.ffm
211
#Format rm
212 85f07f22 Fabrice Bellard
213 f359a5be Philip Gladstone
#AudioBitRate 32
214
#VideoBitRate 128
215
#VideoFrameRate 25
216
#VideoGopSize 25
217
#NoAudio
218 85f07f22 Fabrice Bellard
219 f359a5be Philip Gladstone
#</Stream>
220 85f07f22 Fabrice Bellard
221 f359a5be Philip Gladstone
<Stream test2.rm>
222 85f07f22 Fabrice Bellard
223
Feed feed1.ffm
224 f359a5be Philip Gladstone
Format rm
225 85f07f22 Fabrice Bellard
226 f359a5be Philip Gladstone
VideoBitRate 128
227
VideoFrameRate 15
228
VideoGopSize 25
229
VideoSize    320x240
230
AudioBitRate 64
231 85f07f22 Fabrice Bellard
232
</Stream>
233
234
##################################################################
235
# Another stream : Multipart JPEG
236
237 f359a5be Philip Gladstone
#<Stream test.mjpg>
238
#
239
#Feed feed1.ffm
240
#Format mpjpeg
241
#
242
#VideoFrameRate 2
243
#VideoIntraOnly
244
#NoAudio
245
#
246
#</Stream>
247 85f07f22 Fabrice Bellard
248
##################################################################
249
# Another stream : Multipart JPEG
250
251 f359a5be Philip Gladstone
#<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 85f07f22 Fabrice Bellard
265
##################################################################
266
# Another stream : Flash
267
268 f359a5be Philip Gladstone
#<Stream test.swf>
269 85f07f22 Fabrice Bellard
270 f359a5be Philip Gladstone
#Feed feed1.ffm
271
#Format swf
272
#
273
#VideoFrameRate 2
274
#VideoIntraOnly
275
#NoAudio
276
#
277
#</Stream>
278 85f07f22 Fabrice Bellard
279
280
##################################################################
281
# Another stream : ASF compatible
282
283
<Stream test.asf>
284
285
Feed feed1.ffm
286
Format asf
287 f359a5be Philip Gladstone
#
288
VideoFrameRate 15
289
VideoSize 352x240
290 4e33b83b Philip Gladstone
VideoBitRate 256
291 f359a5be Philip Gladstone
VideoGopSize 30
292 85f07f22 Fabrice Bellard
AudioBitRate 64
293 abb2a5e2 Philip Gladstone
StartSendOnKey
294 85f07f22 Fabrice Bellard
295
</Stream>
296
297 4e33b83b Philip Gladstone
<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 85f07f22 Fabrice Bellard
##################################################################
326 bc4a1ffe Fabrice Bellard
# 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 85f07f22 Fabrice Bellard
# Special stream : server status
345
346
<Stream stat.html>
347
348
Format status
349
350 a28d4f86 Philip Gladstone
# 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 4e33b83b Philip Gladstone
FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
356
357 85f07f22 Fabrice Bellard
</Stream>
358 4e33b83b Philip Gladstone
359
360
<Redirect index.html>
361
# maps index.html to the appropriate site
362
URL http://ffmpeg.sourceforge.net/
363
</Redirect>