Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ 22b6a24c

History | View | Annotate | Download (8.46 KB)

1 85f07f22 Fabrice Bellard
# Port on which the server is listening. You must select a different
2 ed815ddb Diego Biurrun
# port from your standard HTTP web server if it is running on the same
3 85f07f22 Fabrice Bellard
# 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 1c9ff179 Stefano Sabatini
# 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
15 85f07f22 Fabrice Bellard
# Number of simultaneous requests that can be handled. Since FFServer
16 34d7008d Philip Gladstone
# is very fast, it is more likely that you will want to leave this high
17
# and use MaxBandwidth, below.
18 85f07f22 Fabrice Bellard
MaxClients 1000
19
20 9cfe269e Philip Gladstone
# This the maximum amount of kbit/sec that you are prepared to
21 ed815ddb Diego Biurrun
# consume when streaming to clients.
22 9cfe269e Philip Gladstone
MaxBandwidth 1000
23
24 ed815ddb Diego Biurrun
# Access log file (uses standard Apache log file format)
25
# '-' is the standard output.
26 85f07f22 Fabrice Bellard
CustomLog -
27
28 ed815ddb Diego Biurrun
# Suppress that if you want to launch ffserver as a daemon.
29 bc4a1ffe Fabrice Bellard
NoDaemon
30
31 34d7008d Philip Gladstone
32 85f07f22 Fabrice Bellard
##################################################################
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:
42 115329f1 Diego Biurrun
#
43 85f07f22 Fabrice Bellard
# 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
49 6b0bdc75 Alex Beregszaszi
# maximum size of the feed, where zero means unlimited. Default:
50 85f07f22 Fabrice Bellard
# File=/tmp/feed_name.ffm FileMaxSize=5M
51
File /tmp/feed1.ffm
52 4e33b83b Philip Gladstone
FileMaxSize 200K
53
54 e322ea48 Philip Gladstone
# You could specify
55
# ReadOnlyFile /saved/specialvideo.ffm
56 ed815ddb Diego Biurrun
# This marks the file as readonly and it will not be deleted or updated.
57 e322ea48 Philip Gladstone
58 ed815ddb Diego Biurrun
# Specify launch in order to start ffmpeg automatically.
59 ac6a655b Alex Beregszaszi
# 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
62 85f07f22 Fabrice Bellard
63 ed815ddb Diego Biurrun
# Only allow connections from localhost to the feed.
64 a28d4f86 Philip Gladstone
ACL allow 127.0.0.1
65
66 85f07f22 Fabrice Bellard
</Feed>
67
68 34d7008d Philip Gladstone
69 85f07f22 Fabrice Bellard
##################################################################
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
72 34d7008d Philip Gladstone
# 'test1.mpg'). FFServer will send this stream when answering a
73 85f07f22 Fabrice Bellard
# 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:
81 ed815ddb Diego Biurrun
# 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)
84 34d7008d Philip Gladstone
# ogg        : Ogg format (Vorbis audio codec)
85 2adf8482 Diego Biurrun
# rm         : RealNetworks-compatible stream. Multiplexed audio and video.
86
# ra         : RealNetworks-compatible stream. Audio only.
87 85f07f22 Fabrice Bellard
# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
88
# jpeg       : Generate a single JPEG image.
89 6a6362f0 Fabrice Bellard
# asf        : ASF compatible streaming (Windows Media Player format).
90 2adf8482 Diego Biurrun
# swf        : Macromedia Flash compatible stream
91 f5f30f1b Diego Biurrun
# avi        : AVI format (MPEG-4 video, MPEG audio sound)
92 85f07f22 Fabrice Bellard
Format mpeg
93
94 34d7008d Philip Gladstone
# Bitrate for the audio stream. Codecs usually support only a few
95 115329f1 Diego Biurrun
# different bitrates.
96 85f07f22 Fabrice Bellard
AudioBitRate 32
97
98 2adf8482 Diego Biurrun
# Number of audio channels: 1 = mono, 2 = stereo
99 85f07f22 Fabrice Bellard
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.
104
AudioSampleRate 44100
105
106 ed815ddb Diego Biurrun
# Bitrate for the video stream
107 85f07f22 Fabrice Bellard
VideoBitRate 64
108
109 d4d1de91 Panagiotis Issaris
# Ratecontrol buffer size
110
VideoBufferSize 40
111
112 85f07f22 Fabrice Bellard
# Number of frames per second
113
VideoFrameRate 3
114
115 2adf8482 Diego Biurrun
# Size of the video frame: WxH (default: 160x128)
116 7d88b5ca Benoit Fouet
# 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
120 34d7008d Philip Gladstone
VideoSize 160x128
121 85f07f22 Fabrice Bellard
122 ed815ddb Diego Biurrun
# Transmit only intra frames (useful for low bitrates, but kills frame rate).
123 f359a5be Philip Gladstone
#VideoIntraOnly
124 85f07f22 Fabrice Bellard
125 ed815ddb Diego Biurrun
# If non-intra only, an intra frame is transmitted every VideoGopSize
126
# frames. Video synchronization can only begin at an intra frame.
127 f359a5be Philip Gladstone
VideoGopSize 12
128
129 ed815ddb Diego Biurrun
# More MPEG-4 parameters
130 e322ea48 Philip Gladstone
# VideoHighQuality
131
# Video4MotionVector
132
133 115329f1 Diego Biurrun
# Choose your codecs:
134 f359a5be Philip Gladstone
#AudioCodec mp2
135
#VideoCodec mpeg1video
136 85f07f22 Fabrice Bellard
137
# Suppress audio
138
#NoAudio
139
140
# Suppress video
141
#NoVideo
142
143 9cfe269e Philip Gladstone
#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
148 ed815ddb Diego Biurrun
# for a keyframe to appear in the data stream.
149 a2632fd2 Diego Biurrun
#Preroll 15
150 9cfe269e Philip Gladstone
151 a28d4f86 Philip Gladstone
# ACL:
152
153
# You can allow ranges of addresses (or single addresses)
154 34d7008d Philip Gladstone
#ACL ALLOW <first address> <last address>
155 a28d4f86 Philip Gladstone
156
# You can deny ranges of addresses (or single addresses)
157 34d7008d Philip Gladstone
#ACL DENY <first address> <last address>
158 a28d4f86 Philip Gladstone
159 34d7008d Philip Gladstone
# 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.
162 85f07f22 Fabrice Bellard
#
163 115329f1 Diego Biurrun
# Thus 'ACL allow localhost' only allows access from localhost.
164 34d7008d Philip Gladstone
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
165
# allow everybody else.
166 85f07f22 Fabrice Bellard
167
</Stream>
168
169
170
##################################################################
171 34d7008d Philip Gladstone
# Example streams
172 85f07f22 Fabrice Bellard
173
174 34d7008d Philip Gladstone
# Multipart JPEG
175 85f07f22 Fabrice Bellard
176 f359a5be Philip Gladstone
#<Stream test.mjpg>
177
#Feed feed1.ffm
178
#Format mpjpeg
179
#VideoFrameRate 2
180
#VideoIntraOnly
181
#NoAudio
182 97246091 Alex Beregszaszi
#Strict -1
183 f359a5be Philip Gladstone
#</Stream>
184 85f07f22 Fabrice Bellard
185 34d7008d Philip Gladstone
186
# Single JPEG
187 85f07f22 Fabrice Bellard
188 f359a5be Philip Gladstone
#<Stream test.jpg>
189
#Feed feed1.ffm
190
#Format jpeg
191 115329f1 Diego Biurrun
#VideoFrameRate 2
192 f359a5be Philip Gladstone
#VideoIntraOnly
193
##VideoSize 352x240
194
#NoAudio
195 97246091 Alex Beregszaszi
#Strict -1
196 f359a5be Philip Gladstone
#</Stream>
197 85f07f22 Fabrice Bellard
198
199 34d7008d Philip Gladstone
# Flash
200 85f07f22 Fabrice Bellard
201 34d7008d Philip Gladstone
#<Stream test.swf>
202 f359a5be Philip Gladstone
#Feed feed1.ffm
203
#Format swf
204
#VideoFrameRate 2
205
#VideoIntraOnly
206
#NoAudio
207
#</Stream>
208 85f07f22 Fabrice Bellard
209
210 34d7008d Philip Gladstone
# ASF compatible
211 85f07f22 Fabrice Bellard
212 41fc0dd5 Philip Gladstone
<Stream test.asf>
213
Feed feed1.ffm
214
Format asf
215
VideoFrameRate 15
216
VideoSize 352x240
217
VideoBitRate 256
218 d4d1de91 Panagiotis Issaris
VideoBufferSize 40
219 41fc0dd5 Philip Gladstone
VideoGopSize 30
220
AudioBitRate 64
221
StartSendOnKey
222
</Stream>
223 85f07f22 Fabrice Bellard
224
225 115329f1 Diego Biurrun
# MP3 audio
226 85f07f22 Fabrice Bellard
227 34d7008d Philip Gladstone
#<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>
236 4e33b83b Philip Gladstone
237
238 34d7008d Philip Gladstone
# Ogg Vorbis audio
239 4e33b83b Philip Gladstone
240 34d7008d Philip Gladstone
#<Stream test.ogg>
241
#Feed feed1.ffm
242
#Title "Stream title"
243
#AudioBitRate 64
244
#AudioChannels 2
245
#AudioSampleRate 44100
246
#NoVideo
247
#</Stream>
248 4e33b83b Philip Gladstone
249
250 34d7008d Philip Gladstone
# 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
273 4e33b83b Philip Gladstone
274 85f07f22 Fabrice Bellard
##################################################################
275 2adf8482 Diego Biurrun
# A stream coming from a file: you only need to set the input
276 ed815ddb Diego Biurrun
# filename and optionally a new format. Supported conversions:
277
#    AVI -> ASF
278 bc4a1ffe Fabrice Bellard
279 34d7008d Philip Gladstone
#<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
296 bc4a1ffe Fabrice Bellard
#
297 ed815ddb Diego Biurrun
# You can access this stream with the RTSP URL:
298 34d7008d Philip Gladstone
#   rtsp://localhost:5454/test1-rtsp.mpg
299 bc4a1ffe Fabrice Bellard
#
300 ed815ddb Diego Biurrun
# A non-standard RTSP redirector is also created. Its URL is:
301 34d7008d Philip Gladstone
#   http://localhost:8090/test1-rtsp.rtsp
302
303 bc4a1ffe Fabrice Bellard
#<Stream test1-rtsp.mpg>
304
#Format rtp
305
#File "/usr/local/httpd/htdocs/test1.mpg"
306
#</Stream>
307
308 34d7008d Philip Gladstone
309 bc4a1ffe Fabrice Bellard
##################################################################
310 6891b9d4 Fabrice Bellard
# SDP/multicast examples
311 34d7008d Philip Gladstone
#
312 6891b9d4 Fabrice Bellard
# 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.
320 115329f1 Diego Biurrun
#
321 6891b9d4 Fabrice Bellard
# The 'NoLoop' option can be used to avoid looping when the stream is
322
# terminated.
323 34d7008d Philip Gladstone
324 6891b9d4 Fabrice Bellard
#<Stream test1-sdp.mpg>
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
331
#</Stream>
332
333 34d7008d Philip Gladstone
334 6891b9d4 Fabrice Bellard
##################################################################
335 34d7008d Philip Gladstone
# Special streams
336 85f07f22 Fabrice Bellard
337 34d7008d Philip Gladstone
# Server status
338 85f07f22 Fabrice Bellard
339 34d7008d Philip Gladstone
<Stream stat.html>
340 85f07f22 Fabrice Bellard
Format status
341
342 ed815ddb Diego Biurrun
# Only allow local people to get the status
343 a28d4f86 Philip Gladstone
ACL allow localhost
344
ACL allow 192.168.0.0 192.168.255.255
345
346 34d7008d Philip Gladstone
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
347 85f07f22 Fabrice Bellard
</Stream>
348 4e33b83b Philip Gladstone
349
350 34d7008d Philip Gladstone
# Redirect index.html to the appropriate site
351
352 4e33b83b Philip Gladstone
<Redirect index.html>
353 67c311fa Alex Beregszaszi
URL http://www.ffmpeg.org/
354 4e33b83b Philip Gladstone
</Redirect>
355 34d7008d Philip Gladstone