Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ da9c9637

History | View | Annotate | Download (7.96 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
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
# consume when streaming to clients
17
MaxBandwidth 1000
18
19 85f07f22 Fabrice Bellard
# Access Log file (uses standard Apache log file format)
20
# '-' is the standard output
21
CustomLog -
22
23 bc4a1ffe Fabrice Bellard
# Suppress that if you want to launch ffserver as a daemon
24
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
# 
38
# 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
# maximum size of the feed (100M bytes here). Default:
45
# 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
# This marks the file as readonly and it will not be deleted or updated
52
53 4e33b83b Philip Gladstone
# Specify launch in order to start ffmpeg automatically
54 34d7008d Philip Gladstone
#Launch
55 85f07f22 Fabrice Bellard
56 a28d4f86 Philip Gladstone
# Only allow connections from localhost to the feed
57
ACL allow 127.0.0.1
58
59 85f07f22 Fabrice Bellard
</Feed>
60
61 34d7008d Philip Gladstone
62 85f07f22 Fabrice Bellard
##################################################################
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 34d7008d Philip Gladstone
# 'test1.mpg'). FFServer will send this stream when answering a
66 85f07f22 Fabrice Bellard
# 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 34d7008d Philip Gladstone
# mp2        : MPEG2 audio (use AudioCodec to select layer 2 and 3 codec)
77
# ogg        : Ogg format (Vorbis audio codec)
78 85f07f22 Fabrice Bellard
# 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 6a6362f0 Fabrice Bellard
# asf        : ASF compatible streaming (Windows Media Player format).
83 85f07f22 Fabrice Bellard
# 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
Format mpeg
87
88 34d7008d Philip Gladstone
# Bitrate for the audio stream. Codecs usually support only a few
89
# different bitrates. 
90 85f07f22 Fabrice Bellard
AudioBitRate 32
91
92
# Number of audio channels : 1 = mono, 2 = stereo
93
AudioChannels 1
94
95
# Sampling frequency for audio. When using low bitrates, you should
96
# lower this frequency to 22050 or 11025. The supported frequencies
97
# depend on the selected audio codec.
98
AudioSampleRate 44100
99
100
# Bitrate for the video stream.
101
VideoBitRate 64
102
103
# Number of frames per second
104
VideoFrameRate 3
105
106
# Size of the video frame : WxH (default: 160x128)
107
# The following abbreviation are defined : sqcif, qcif, cif, 4cif
108 34d7008d Philip Gladstone
VideoSize 160x128
109 85f07f22 Fabrice Bellard
110 f359a5be Philip Gladstone
# transmit only intra frames (useful for low bitrates, but kills frame rate) 
111
#VideoIntraOnly
112 85f07f22 Fabrice Bellard
113
# If non intra only, an intra frame is transmitted every VideoGopSize
114
# frames Video synchronization can only begin at an I frames.
115 f359a5be Philip Gladstone
VideoGopSize 12
116
117 e322ea48 Philip Gladstone
# More MPEG4 parameters
118
# VideoHighQuality
119
# Video4MotionVector
120
121 f359a5be Philip Gladstone
# Choose your codecs: 
122
#AudioCodec mp2
123
#VideoCodec mpeg1video
124 85f07f22 Fabrice Bellard
125
# Suppress audio
126
#NoAudio
127
128
# Suppress video
129
#NoVideo
130
131 9cfe269e Philip Gladstone
#VideoQMin 3
132
#VideoQMax 31
133
134
# Set this to the number of seconds backwards in time to start. Note that
135
# most players will buffer 5-10 seconds of video, and also you need to allow
136
# for a key frame to appear in the data stream.
137
#PreRoll 15
138
139 a28d4f86 Philip Gladstone
# ACL:
140
141
# You can allow ranges of addresses (or single addresses)
142 34d7008d Philip Gladstone
#ACL ALLOW <first address> <last address>
143 a28d4f86 Philip Gladstone
144
# You can deny ranges of addresses (or single addresses)
145 34d7008d Philip Gladstone
#ACL DENY <first address> <last address>
146 a28d4f86 Philip Gladstone
147 34d7008d Philip Gladstone
# You can repeat the ACL allow/deny as often as you like. It is on a per
148
# stream basis. The first match defines the action. If there are no matches,
149
# then the default is the inverse of the last ACL statement.
150 85f07f22 Fabrice Bellard
#
151 34d7008d Philip Gladstone
# Thus 'ACL allow localhost' only allows access from localhost. 
152
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
153
# allow everybody else.
154 85f07f22 Fabrice Bellard
155
</Stream>
156
157
158
##################################################################
159 34d7008d Philip Gladstone
# Example streams
160 85f07f22 Fabrice Bellard
161
162 34d7008d Philip Gladstone
# Multipart JPEG
163 85f07f22 Fabrice Bellard
164 f359a5be Philip Gladstone
#<Stream test.mjpg>
165
#Feed feed1.ffm
166
#Format mpjpeg
167
#VideoFrameRate 2
168
#VideoIntraOnly
169
#NoAudio
170
#</Stream>
171 85f07f22 Fabrice Bellard
172 34d7008d Philip Gladstone
173
# Single JPEG
174 85f07f22 Fabrice Bellard
175 f359a5be Philip Gladstone
#<Stream test.jpg>
176
#Feed feed1.ffm
177
#Format jpeg
178
#VideoFrameRate 2 
179
#VideoIntraOnly
180
##VideoSize 352x240
181
#NoAudio
182
#</Stream>
183 85f07f22 Fabrice Bellard
184
185 34d7008d Philip Gladstone
# Flash
186 85f07f22 Fabrice Bellard
187 34d7008d Philip Gladstone
#<Stream test.swf>
188 f359a5be Philip Gladstone
#Feed feed1.ffm
189
#Format swf
190
#VideoFrameRate 2
191
#VideoIntraOnly
192
#NoAudio
193
#</Stream>
194 85f07f22 Fabrice Bellard
195
196 34d7008d Philip Gladstone
# ASF compatible
197 85f07f22 Fabrice Bellard
198 41fc0dd5 Philip Gladstone
<Stream test.asf>
199
Feed feed1.ffm
200
Format asf
201
VideoFrameRate 15
202
VideoSize 352x240
203
VideoBitRate 256
204
VideoGopSize 30
205
AudioBitRate 64
206
StartSendOnKey
207
</Stream>
208 85f07f22 Fabrice Bellard
209
210 34d7008d Philip Gladstone
# MP3 audio 
211 85f07f22 Fabrice Bellard
212 34d7008d Philip Gladstone
#<Stream test.mp3>
213
#Feed feed1.ffm
214
#Format mp2
215
#AudioCodec mp3
216
#AudioBitRate 64
217
#AudioChannels 1
218
#AudioSampleRate 44100
219
#NoVideo
220
#</Stream>
221 4e33b83b Philip Gladstone
222
223 34d7008d Philip Gladstone
# Ogg Vorbis audio
224 4e33b83b Philip Gladstone
225 34d7008d Philip Gladstone
#<Stream test.ogg>
226
#Feed feed1.ffm
227
#Title "Stream title"
228
#AudioBitRate 64
229
#AudioChannels 2
230
#AudioSampleRate 44100
231
#NoVideo
232
#</Stream>
233 4e33b83b Philip Gladstone
234
235 34d7008d Philip Gladstone
# Real with audio only at 32 kbits
236
237
#<Stream test.ra>
238
#Feed feed1.ffm
239
#Format rm
240
#AudioBitRate 32
241
#NoVideo
242
#NoAudio
243
#</Stream>
244
245
246
# Real with audio and video at 64 kbits
247
248
#<Stream test.rm>
249
#Feed feed1.ffm
250
#Format rm
251
#AudioBitRate 32
252
#VideoBitRate 128
253
#VideoFrameRate 25
254
#VideoGopSize 25
255
#NoAudio
256
#</Stream>
257
258 4e33b83b Philip Gladstone
259 85f07f22 Fabrice Bellard
##################################################################
260 34d7008d Philip Gladstone
# A stream coming from a file : you only need to set the input
261
# filename and optionnally a new format. Supported conversions:
262
#    avi -> asf
263 bc4a1ffe Fabrice Bellard
264 34d7008d Philip Gladstone
#<Stream file.rm>
265
#File "/usr/local/httpd/htdocs/tlive.rm"
266
#NoAudio
267
#</Stream>
268
269
#<Stream file.asf>
270
#File "/usr/local/httpd/htdocs/test.asf"
271
#NoAudio
272
#Author "Me"
273
#Copyright "Super MegaCorp"
274
#Title "Test stream from disk"
275
#Comment "Test comment"
276
#</Stream>
277
278
279
##################################################################
280
# RTSP examples
281 bc4a1ffe Fabrice Bellard
#
282 34d7008d Philip Gladstone
# You can access to this stream with the RTSP URL:
283
#   rtsp://localhost:5454/test1-rtsp.mpg
284 bc4a1ffe Fabrice Bellard
#
285 6891b9d4 Fabrice Bellard
# A non standard RTSP redirector is also created. Its URL is:
286 34d7008d Philip Gladstone
#   http://localhost:8090/test1-rtsp.rtsp
287
288 bc4a1ffe Fabrice Bellard
#<Stream test1-rtsp.mpg>
289
#Format rtp
290
#File "/usr/local/httpd/htdocs/test1.mpg"
291
#</Stream>
292
293 34d7008d Philip Gladstone
294 bc4a1ffe Fabrice Bellard
##################################################################
295 6891b9d4 Fabrice Bellard
# SDP/multicast examples
296 34d7008d Philip Gladstone
#
297 6891b9d4 Fabrice Bellard
# If you want to send your stream in multicast, you must set the
298
# multicast address with MulticastAddress. The port and the TTL can
299
# also be set.
300
#
301
# An SDP file is automatically generated by ffserver by adding the
302
# 'sdp' extension to the stream name (here
303
# http://localhost:8090/test1-sdp.sdp). You should usually give this
304
# file to your player to play the stream.
305
# 
306
# The 'NoLoop' option can be used to avoid looping when the stream is
307
# terminated.
308 34d7008d Philip Gladstone
309 6891b9d4 Fabrice Bellard
#<Stream test1-sdp.mpg>
310
#Format rtp
311
#File "/usr/local/httpd/htdocs/test1.mpg"
312
#MulticastAddress 224.124.0.1
313
#MulticastPort 5000
314
#MulticastTTL 16
315
#NoLoop
316
#</Stream>
317
318 34d7008d Philip Gladstone
319 6891b9d4 Fabrice Bellard
##################################################################
320 34d7008d Philip Gladstone
# Special streams
321 85f07f22 Fabrice Bellard
322 34d7008d Philip Gladstone
# Server status
323 85f07f22 Fabrice Bellard
324 34d7008d Philip Gladstone
<Stream stat.html>
325 85f07f22 Fabrice Bellard
Format status
326
327 a28d4f86 Philip Gladstone
# Only allow local people to get to the status
328
ACL allow localhost
329
ACL allow 192.168.0.0 192.168.255.255
330
331 34d7008d Philip Gladstone
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
332 85f07f22 Fabrice Bellard
</Stream>
333 4e33b83b Philip Gladstone
334
335 34d7008d Philip Gladstone
# Redirect index.html to the appropriate site
336
337 4e33b83b Philip Gladstone
<Redirect index.html>
338
URL http://ffmpeg.sourceforge.net/
339
</Redirect>
340 34d7008d Philip Gladstone