Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ ed90d370

History | View | Annotate | Download (8.17 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
# Number of simultaneous requests that can be handled. Since FFServer
11 34d7008d Philip Gladstone
# is very fast, it is more likely that you will want to leave this high
12
# and use MaxBandwidth, below.
13 85f07f22 Fabrice Bellard
MaxClients 1000
14
15 9cfe269e Philip Gladstone
# This the maximum amount of kbit/sec that you are prepared to
16 ed815ddb Diego Biurrun
# consume when streaming to clients.
17 9cfe269e Philip Gladstone
MaxBandwidth 1000
18
19 ed815ddb Diego Biurrun
# Access log file (uses standard Apache log file format)
20
# '-' is the standard output.
21 85f07f22 Fabrice Bellard
CustomLog -
22
23 ed815ddb Diego Biurrun
# Suppress that if you want to launch ffserver as a daemon.
24 bc4a1ffe Fabrice Bellard
NoDaemon
25
26 34d7008d Philip Gladstone
27 85f07f22 Fabrice Bellard
##################################################################
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 115329f1 Diego Biurrun
#
38 85f07f22 Fabrice Bellard
# 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 6b0bdc75 Alex Beregszaszi
# maximum size of the feed, where zero means unlimited. Default:
45 85f07f22 Fabrice Bellard
# File=/tmp/feed_name.ffm FileMaxSize=5M
46
File /tmp/feed1.ffm
47 4e33b83b Philip Gladstone
FileMaxSize 200K
48
49 e322ea48 Philip Gladstone
# You could specify
50
# ReadOnlyFile /saved/specialvideo.ffm
51 ed815ddb Diego Biurrun
# This marks the file as readonly and it will not be deleted or updated.
52 e322ea48 Philip Gladstone
53 ed815ddb Diego Biurrun
# Specify launch in order to start ffmpeg automatically.
54 ac6a655b Alex Beregszaszi
# 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 85f07f22 Fabrice Bellard
58 ed815ddb Diego Biurrun
# Only allow connections from localhost to the feed.
59 a28d4f86 Philip Gladstone
ACL allow 127.0.0.1
60
61 85f07f22 Fabrice Bellard
</Feed>
62
63 34d7008d Philip Gladstone
64 85f07f22 Fabrice Bellard
##################################################################
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 34d7008d Philip Gladstone
# 'test1.mpg'). FFServer will send this stream when answering a
68 85f07f22 Fabrice Bellard
# 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 ed815ddb Diego Biurrun
# 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 34d7008d Philip Gladstone
# ogg        : Ogg format (Vorbis audio codec)
80 2adf8482 Diego Biurrun
# rm         : RealNetworks-compatible stream. Multiplexed audio and video.
81
# ra         : RealNetworks-compatible stream. Audio only.
82 85f07f22 Fabrice Bellard
# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
83
# jpeg       : Generate a single JPEG image.
84 6a6362f0 Fabrice Bellard
# asf        : ASF compatible streaming (Windows Media Player format).
85 2adf8482 Diego Biurrun
# swf        : Macromedia Flash compatible stream
86 f5f30f1b Diego Biurrun
# avi        : AVI format (MPEG-4 video, MPEG audio sound)
87 85f07f22 Fabrice Bellard
# master     : special ffmpeg stream used to duplicate a server
88
Format mpeg
89
90 34d7008d Philip Gladstone
# Bitrate for the audio stream. Codecs usually support only a few
91 115329f1 Diego Biurrun
# different bitrates.
92 85f07f22 Fabrice Bellard
AudioBitRate 32
93
94 2adf8482 Diego Biurrun
# Number of audio channels: 1 = mono, 2 = stereo
95 85f07f22 Fabrice Bellard
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 ed815ddb Diego Biurrun
# Bitrate for the video stream
103 85f07f22 Fabrice Bellard
VideoBitRate 64
104
105 d4d1de91 Panagiotis Issaris
# Ratecontrol buffer size
106
VideoBufferSize 40
107
108 85f07f22 Fabrice Bellard
# Number of frames per second
109
VideoFrameRate 3
110
111 2adf8482 Diego Biurrun
# Size of the video frame: WxH (default: 160x128)
112
# The following abbreviations are defined: sqcif, qcif, cif, 4cif
113 34d7008d Philip Gladstone
VideoSize 160x128
114 85f07f22 Fabrice Bellard
115 ed815ddb Diego Biurrun
# Transmit only intra frames (useful for low bitrates, but kills frame rate).
116 f359a5be Philip Gladstone
#VideoIntraOnly
117 85f07f22 Fabrice Bellard
118 ed815ddb Diego Biurrun
# If non-intra only, an intra frame is transmitted every VideoGopSize
119
# frames. Video synchronization can only begin at an intra frame.
120 f359a5be Philip Gladstone
VideoGopSize 12
121
122 ed815ddb Diego Biurrun
# More MPEG-4 parameters
123 e322ea48 Philip Gladstone
# VideoHighQuality
124
# Video4MotionVector
125
126 115329f1 Diego Biurrun
# Choose your codecs:
127 f359a5be Philip Gladstone
#AudioCodec mp2
128
#VideoCodec mpeg1video
129 85f07f22 Fabrice Bellard
130
# Suppress audio
131
#NoAudio
132
133
# Suppress video
134
#NoVideo
135
136 9cfe269e Philip Gladstone
#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 ed815ddb Diego Biurrun
# for a keyframe to appear in the data stream.
142 a2632fd2 Diego Biurrun
#Preroll 15
143 9cfe269e Philip Gladstone
144 a28d4f86 Philip Gladstone
# ACL:
145
146
# You can allow ranges of addresses (or single addresses)
147 34d7008d Philip Gladstone
#ACL ALLOW <first address> <last address>
148 a28d4f86 Philip Gladstone
149
# You can deny ranges of addresses (or single addresses)
150 34d7008d Philip Gladstone
#ACL DENY <first address> <last address>
151 a28d4f86 Philip Gladstone
152 34d7008d Philip Gladstone
# 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 85f07f22 Fabrice Bellard
#
156 115329f1 Diego Biurrun
# Thus 'ACL allow localhost' only allows access from localhost.
157 34d7008d Philip Gladstone
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
158
# allow everybody else.
159 85f07f22 Fabrice Bellard
160
</Stream>
161
162
163
##################################################################
164 34d7008d Philip Gladstone
# Example streams
165 85f07f22 Fabrice Bellard
166
167 34d7008d Philip Gladstone
# Multipart JPEG
168 85f07f22 Fabrice Bellard
169 f359a5be Philip Gladstone
#<Stream test.mjpg>
170
#Feed feed1.ffm
171
#Format mpjpeg
172
#VideoFrameRate 2
173
#VideoIntraOnly
174
#NoAudio
175 97246091 Alex Beregszaszi
#Strict -1
176 f359a5be Philip Gladstone
#</Stream>
177 85f07f22 Fabrice Bellard
178 34d7008d Philip Gladstone
179
# Single JPEG
180 85f07f22 Fabrice Bellard
181 f359a5be Philip Gladstone
#<Stream test.jpg>
182
#Feed feed1.ffm
183
#Format jpeg
184 115329f1 Diego Biurrun
#VideoFrameRate 2
185 f359a5be Philip Gladstone
#VideoIntraOnly
186
##VideoSize 352x240
187
#NoAudio
188 97246091 Alex Beregszaszi
#Strict -1
189 f359a5be Philip Gladstone
#</Stream>
190 85f07f22 Fabrice Bellard
191
192 34d7008d Philip Gladstone
# Flash
193 85f07f22 Fabrice Bellard
194 34d7008d Philip Gladstone
#<Stream test.swf>
195 f359a5be Philip Gladstone
#Feed feed1.ffm
196
#Format swf
197
#VideoFrameRate 2
198
#VideoIntraOnly
199
#NoAudio
200
#</Stream>
201 85f07f22 Fabrice Bellard
202
203 34d7008d Philip Gladstone
# ASF compatible
204 85f07f22 Fabrice Bellard
205 41fc0dd5 Philip Gladstone
<Stream test.asf>
206
Feed feed1.ffm
207
Format asf
208
VideoFrameRate 15
209
VideoSize 352x240
210
VideoBitRate 256
211 d4d1de91 Panagiotis Issaris
VideoBufferSize 40
212 41fc0dd5 Philip Gladstone
VideoGopSize 30
213
AudioBitRate 64
214
StartSendOnKey
215
</Stream>
216 85f07f22 Fabrice Bellard
217
218 115329f1 Diego Biurrun
# MP3 audio
219 85f07f22 Fabrice Bellard
220 34d7008d Philip Gladstone
#<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 4e33b83b Philip Gladstone
230
231 34d7008d Philip Gladstone
# Ogg Vorbis audio
232 4e33b83b Philip Gladstone
233 34d7008d Philip Gladstone
#<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 4e33b83b Philip Gladstone
242
243 34d7008d Philip Gladstone
# 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 4e33b83b Philip Gladstone
267 85f07f22 Fabrice Bellard
##################################################################
268 2adf8482 Diego Biurrun
# A stream coming from a file: you only need to set the input
269 ed815ddb Diego Biurrun
# filename and optionally a new format. Supported conversions:
270
#    AVI -> ASF
271 bc4a1ffe Fabrice Bellard
272 34d7008d Philip Gladstone
#<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 bc4a1ffe Fabrice Bellard
#
290 ed815ddb Diego Biurrun
# You can access this stream with the RTSP URL:
291 34d7008d Philip Gladstone
#   rtsp://localhost:5454/test1-rtsp.mpg
292 bc4a1ffe Fabrice Bellard
#
293 ed815ddb Diego Biurrun
# A non-standard RTSP redirector is also created. Its URL is:
294 34d7008d Philip Gladstone
#   http://localhost:8090/test1-rtsp.rtsp
295
296 bc4a1ffe Fabrice Bellard
#<Stream test1-rtsp.mpg>
297
#Format rtp
298
#File "/usr/local/httpd/htdocs/test1.mpg"
299
#</Stream>
300
301 34d7008d Philip Gladstone
302 bc4a1ffe Fabrice Bellard
##################################################################
303 6891b9d4 Fabrice Bellard
# SDP/multicast examples
304 34d7008d Philip Gladstone
#
305 6891b9d4 Fabrice Bellard
# 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 115329f1 Diego Biurrun
#
314 6891b9d4 Fabrice Bellard
# The 'NoLoop' option can be used to avoid looping when the stream is
315
# terminated.
316 34d7008d Philip Gladstone
317 6891b9d4 Fabrice Bellard
#<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 34d7008d Philip Gladstone
327 6891b9d4 Fabrice Bellard
##################################################################
328 34d7008d Philip Gladstone
# Special streams
329 85f07f22 Fabrice Bellard
330 34d7008d Philip Gladstone
# Server status
331 85f07f22 Fabrice Bellard
332 34d7008d Philip Gladstone
<Stream stat.html>
333 85f07f22 Fabrice Bellard
Format status
334
335 ed815ddb Diego Biurrun
# Only allow local people to get the status
336 a28d4f86 Philip Gladstone
ACL allow localhost
337
ACL allow 192.168.0.0 192.168.255.255
338
339 34d7008d Philip Gladstone
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
340 85f07f22 Fabrice Bellard
</Stream>
341 4e33b83b Philip Gladstone
342
343 34d7008d Philip Gladstone
# Redirect index.html to the appropriate site
344
345 4e33b83b Philip Gladstone
<Redirect index.html>
346 67c311fa Alex Beregszaszi
URL http://www.ffmpeg.org/
347 4e33b83b Philip Gladstone
</Redirect>
348 34d7008d Philip Gladstone