Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ 25e4f8aa

History | View | Annotate | Download (8.33 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 7d88b5ca Benoit Fouet
# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
113
# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
114
# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
115
# hd1080
116 34d7008d Philip Gladstone
VideoSize 160x128
117 85f07f22 Fabrice Bellard
118 ed815ddb Diego Biurrun
# Transmit only intra frames (useful for low bitrates, but kills frame rate).
119 f359a5be Philip Gladstone
#VideoIntraOnly
120 85f07f22 Fabrice Bellard
121 ed815ddb Diego Biurrun
# If non-intra only, an intra frame is transmitted every VideoGopSize
122
# frames. Video synchronization can only begin at an intra frame.
123 f359a5be Philip Gladstone
VideoGopSize 12
124
125 ed815ddb Diego Biurrun
# More MPEG-4 parameters
126 e322ea48 Philip Gladstone
# VideoHighQuality
127
# Video4MotionVector
128
129 115329f1 Diego Biurrun
# Choose your codecs:
130 f359a5be Philip Gladstone
#AudioCodec mp2
131
#VideoCodec mpeg1video
132 85f07f22 Fabrice Bellard
133
# Suppress audio
134
#NoAudio
135
136
# Suppress video
137
#NoVideo
138
139 9cfe269e Philip Gladstone
#VideoQMin 3
140
#VideoQMax 31
141
142
# Set this to the number of seconds backwards in time to start. Note that
143
# most players will buffer 5-10 seconds of video, and also you need to allow
144 ed815ddb Diego Biurrun
# for a keyframe to appear in the data stream.
145 a2632fd2 Diego Biurrun
#Preroll 15
146 9cfe269e Philip Gladstone
147 a28d4f86 Philip Gladstone
# ACL:
148
149
# You can allow ranges of addresses (or single addresses)
150 34d7008d Philip Gladstone
#ACL ALLOW <first address> <last address>
151 a28d4f86 Philip Gladstone
152
# You can deny ranges of addresses (or single addresses)
153 34d7008d Philip Gladstone
#ACL DENY <first address> <last address>
154 a28d4f86 Philip Gladstone
155 34d7008d Philip Gladstone
# You can repeat the ACL allow/deny as often as you like. It is on a per
156
# stream basis. The first match defines the action. If there are no matches,
157
# then the default is the inverse of the last ACL statement.
158 85f07f22 Fabrice Bellard
#
159 115329f1 Diego Biurrun
# Thus 'ACL allow localhost' only allows access from localhost.
160 34d7008d Philip Gladstone
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
161
# allow everybody else.
162 85f07f22 Fabrice Bellard
163
</Stream>
164
165
166
##################################################################
167 34d7008d Philip Gladstone
# Example streams
168 85f07f22 Fabrice Bellard
169
170 34d7008d Philip Gladstone
# Multipart JPEG
171 85f07f22 Fabrice Bellard
172 f359a5be Philip Gladstone
#<Stream test.mjpg>
173
#Feed feed1.ffm
174
#Format mpjpeg
175
#VideoFrameRate 2
176
#VideoIntraOnly
177
#NoAudio
178 97246091 Alex Beregszaszi
#Strict -1
179 f359a5be Philip Gladstone
#</Stream>
180 85f07f22 Fabrice Bellard
181 34d7008d Philip Gladstone
182
# Single JPEG
183 85f07f22 Fabrice Bellard
184 f359a5be Philip Gladstone
#<Stream test.jpg>
185
#Feed feed1.ffm
186
#Format jpeg
187 115329f1 Diego Biurrun
#VideoFrameRate 2
188 f359a5be Philip Gladstone
#VideoIntraOnly
189
##VideoSize 352x240
190
#NoAudio
191 97246091 Alex Beregszaszi
#Strict -1
192 f359a5be Philip Gladstone
#</Stream>
193 85f07f22 Fabrice Bellard
194
195 34d7008d Philip Gladstone
# Flash
196 85f07f22 Fabrice Bellard
197 34d7008d Philip Gladstone
#<Stream test.swf>
198 f359a5be Philip Gladstone
#Feed feed1.ffm
199
#Format swf
200
#VideoFrameRate 2
201
#VideoIntraOnly
202
#NoAudio
203
#</Stream>
204 85f07f22 Fabrice Bellard
205
206 34d7008d Philip Gladstone
# ASF compatible
207 85f07f22 Fabrice Bellard
208 41fc0dd5 Philip Gladstone
<Stream test.asf>
209
Feed feed1.ffm
210
Format asf
211
VideoFrameRate 15
212
VideoSize 352x240
213
VideoBitRate 256
214 d4d1de91 Panagiotis Issaris
VideoBufferSize 40
215 41fc0dd5 Philip Gladstone
VideoGopSize 30
216
AudioBitRate 64
217
StartSendOnKey
218
</Stream>
219 85f07f22 Fabrice Bellard
220
221 115329f1 Diego Biurrun
# MP3 audio
222 85f07f22 Fabrice Bellard
223 34d7008d Philip Gladstone
#<Stream test.mp3>
224
#Feed feed1.ffm
225
#Format mp2
226
#AudioCodec mp3
227
#AudioBitRate 64
228
#AudioChannels 1
229
#AudioSampleRate 44100
230
#NoVideo
231
#</Stream>
232 4e33b83b Philip Gladstone
233
234 34d7008d Philip Gladstone
# Ogg Vorbis audio
235 4e33b83b Philip Gladstone
236 34d7008d Philip Gladstone
#<Stream test.ogg>
237
#Feed feed1.ffm
238
#Title "Stream title"
239
#AudioBitRate 64
240
#AudioChannels 2
241
#AudioSampleRate 44100
242
#NoVideo
243
#</Stream>
244 4e33b83b Philip Gladstone
245
246 34d7008d Philip Gladstone
# Real with audio only at 32 kbits
247
248
#<Stream test.ra>
249
#Feed feed1.ffm
250
#Format rm
251
#AudioBitRate 32
252
#NoVideo
253
#NoAudio
254
#</Stream>
255
256
257
# Real with audio and video at 64 kbits
258
259
#<Stream test.rm>
260
#Feed feed1.ffm
261
#Format rm
262
#AudioBitRate 32
263
#VideoBitRate 128
264
#VideoFrameRate 25
265
#VideoGopSize 25
266
#NoAudio
267
#</Stream>
268
269 4e33b83b Philip Gladstone
270 85f07f22 Fabrice Bellard
##################################################################
271 2adf8482 Diego Biurrun
# A stream coming from a file: you only need to set the input
272 ed815ddb Diego Biurrun
# filename and optionally a new format. Supported conversions:
273
#    AVI -> ASF
274 bc4a1ffe Fabrice Bellard
275 34d7008d Philip Gladstone
#<Stream file.rm>
276
#File "/usr/local/httpd/htdocs/tlive.rm"
277
#NoAudio
278
#</Stream>
279
280
#<Stream file.asf>
281
#File "/usr/local/httpd/htdocs/test.asf"
282
#NoAudio
283
#Author "Me"
284
#Copyright "Super MegaCorp"
285
#Title "Test stream from disk"
286
#Comment "Test comment"
287
#</Stream>
288
289
290
##################################################################
291
# RTSP examples
292 bc4a1ffe Fabrice Bellard
#
293 ed815ddb Diego Biurrun
# You can access this stream with the RTSP URL:
294 34d7008d Philip Gladstone
#   rtsp://localhost:5454/test1-rtsp.mpg
295 bc4a1ffe Fabrice Bellard
#
296 ed815ddb Diego Biurrun
# A non-standard RTSP redirector is also created. Its URL is:
297 34d7008d Philip Gladstone
#   http://localhost:8090/test1-rtsp.rtsp
298
299 bc4a1ffe Fabrice Bellard
#<Stream test1-rtsp.mpg>
300
#Format rtp
301
#File "/usr/local/httpd/htdocs/test1.mpg"
302
#</Stream>
303
304 34d7008d Philip Gladstone
305 bc4a1ffe Fabrice Bellard
##################################################################
306 6891b9d4 Fabrice Bellard
# SDP/multicast examples
307 34d7008d Philip Gladstone
#
308 6891b9d4 Fabrice Bellard
# If you want to send your stream in multicast, you must set the
309
# multicast address with MulticastAddress. The port and the TTL can
310
# also be set.
311
#
312
# An SDP file is automatically generated by ffserver by adding the
313
# 'sdp' extension to the stream name (here
314
# http://localhost:8090/test1-sdp.sdp). You should usually give this
315
# file to your player to play the stream.
316 115329f1 Diego Biurrun
#
317 6891b9d4 Fabrice Bellard
# The 'NoLoop' option can be used to avoid looping when the stream is
318
# terminated.
319 34d7008d Philip Gladstone
320 6891b9d4 Fabrice Bellard
#<Stream test1-sdp.mpg>
321
#Format rtp
322
#File "/usr/local/httpd/htdocs/test1.mpg"
323
#MulticastAddress 224.124.0.1
324
#MulticastPort 5000
325
#MulticastTTL 16
326
#NoLoop
327
#</Stream>
328
329 34d7008d Philip Gladstone
330 6891b9d4 Fabrice Bellard
##################################################################
331 34d7008d Philip Gladstone
# Special streams
332 85f07f22 Fabrice Bellard
333 34d7008d Philip Gladstone
# Server status
334 85f07f22 Fabrice Bellard
335 34d7008d Philip Gladstone
<Stream stat.html>
336 85f07f22 Fabrice Bellard
Format status
337
338 ed815ddb Diego Biurrun
# Only allow local people to get the status
339 a28d4f86 Philip Gladstone
ACL allow localhost
340
ACL allow 192.168.0.0 192.168.255.255
341
342 34d7008d Philip Gladstone
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
343 85f07f22 Fabrice Bellard
</Stream>
344 4e33b83b Philip Gladstone
345
346 34d7008d Philip Gladstone
# Redirect index.html to the appropriate site
347
348 4e33b83b Philip Gladstone
<Redirect index.html>
349 67c311fa Alex Beregszaszi
URL http://www.ffmpeg.org/
350 4e33b83b Philip Gladstone
</Redirect>
351 34d7008d Philip Gladstone