Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ 67c311fa

History | View | Annotate | Download (8.01 KB)

1
# 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
# is very fast, it is more likely that you will want to leave this high
12
# and use MaxBandwidth, below.
13
MaxClients 1000
14

    
15
# This the maximum amount of kbit/sec that you are prepared to
16
# consume when streaming to clients
17
MaxBandwidth 1000
18

    
19
# Access Log file (uses standard Apache log file format)
20
# '-' is the standard output
21
CustomLog -
22

    
23
# Suppress that if you want to launch ffserver as a daemon
24
NoDaemon
25

    
26

    
27
##################################################################
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
FileMaxSize 200K
48

    
49
# 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
# Specify launch in order to start ffmpeg automatically
54
#Launch
55

    
56
# Only allow connections from localhost to the feed
57
ACL allow 127.0.0.1
58

    
59
</Feed>
60

    
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
# 'test1.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        : MPEG2 audio (use AudioCodec to select layer 2 and 3 codec)
77
# ogg        : Ogg format (Vorbis audio codec)
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 streaming (Windows Media Player format).
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
Format mpeg
87

    
88
# Bitrate for the audio stream. Codecs usually support only a few
89
# different bitrates. 
90
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
# Ratecontrol buffer size
104
VideoBufferSize 40
105

    
106
# Number of frames per second
107
VideoFrameRate 3
108

    
109
# Size of the video frame : WxH (default: 160x128)
110
# The following abbreviation are defined : sqcif, qcif, cif, 4cif
111
VideoSize 160x128
112

    
113
# transmit only intra frames (useful for low bitrates, but kills frame rate) 
114
#VideoIntraOnly
115

    
116
# If non intra only, an intra frame is transmitted every VideoGopSize
117
# frames Video synchronization can only begin at an I frames.
118
VideoGopSize 12
119

    
120
# More MPEG4 parameters
121
# VideoHighQuality
122
# Video4MotionVector
123

    
124
# Choose your codecs: 
125
#AudioCodec mp2
126
#VideoCodec mpeg1video
127

    
128
# Suppress audio
129
#NoAudio
130

    
131
# Suppress video
132
#NoVideo
133

    
134
#VideoQMin 3
135
#VideoQMax 31
136

    
137
# Set this to the number of seconds backwards in time to start. Note that
138
# most players will buffer 5-10 seconds of video, and also you need to allow
139
# for a key frame to appear in the data stream.
140
#PreRoll 15
141

    
142
# ACL:
143

    
144
# You can allow ranges of addresses (or single addresses)
145
#ACL ALLOW <first address> <last address>
146

    
147
# You can deny ranges of addresses (or single addresses)
148
#ACL DENY <first address> <last address>
149

    
150
# You can repeat the ACL allow/deny as often as you like. It is on a per
151
# stream basis. The first match defines the action. If there are no matches,
152
# then the default is the inverse of the last ACL statement.
153
#
154
# Thus 'ACL allow localhost' only allows access from localhost. 
155
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
156
# allow everybody else.
157

    
158
</Stream>
159

    
160

    
161
##################################################################
162
# Example streams
163

    
164

    
165
# Multipart JPEG
166

    
167
#<Stream test.mjpg>
168
#Feed feed1.ffm
169
#Format mpjpeg
170
#VideoFrameRate 2
171
#VideoIntraOnly
172
#NoAudio
173
#</Stream>
174

    
175

    
176
# Single JPEG
177

    
178
#<Stream test.jpg>
179
#Feed feed1.ffm
180
#Format jpeg
181
#VideoFrameRate 2 
182
#VideoIntraOnly
183
##VideoSize 352x240
184
#NoAudio
185
#</Stream>
186

    
187

    
188
# Flash
189

    
190
#<Stream test.swf>
191
#Feed feed1.ffm
192
#Format swf
193
#VideoFrameRate 2
194
#VideoIntraOnly
195
#NoAudio
196
#</Stream>
197

    
198

    
199
# ASF compatible
200

    
201
<Stream test.asf>
202
Feed feed1.ffm
203
Format asf
204
VideoFrameRate 15
205
VideoSize 352x240
206
VideoBitRate 256
207
VideoBufferSize 40
208
VideoGopSize 30
209
AudioBitRate 64
210
StartSendOnKey
211
</Stream>
212

    
213

    
214
# MP3 audio 
215

    
216
#<Stream test.mp3>
217
#Feed feed1.ffm
218
#Format mp2
219
#AudioCodec mp3
220
#AudioBitRate 64
221
#AudioChannels 1
222
#AudioSampleRate 44100
223
#NoVideo
224
#</Stream>
225

    
226

    
227
# Ogg Vorbis audio
228

    
229
#<Stream test.ogg>
230
#Feed feed1.ffm
231
#Title "Stream title"
232
#AudioBitRate 64
233
#AudioChannels 2
234
#AudioSampleRate 44100
235
#NoVideo
236
#</Stream>
237

    
238

    
239
# Real with audio only at 32 kbits
240

    
241
#<Stream test.ra>
242
#Feed feed1.ffm
243
#Format rm
244
#AudioBitRate 32
245
#NoVideo
246
#NoAudio
247
#</Stream>
248

    
249

    
250
# Real with audio and video at 64 kbits
251

    
252
#<Stream test.rm>
253
#Feed feed1.ffm
254
#Format rm
255
#AudioBitRate 32
256
#VideoBitRate 128
257
#VideoFrameRate 25
258
#VideoGopSize 25
259
#NoAudio
260
#</Stream>
261

    
262

    
263
##################################################################
264
# A stream coming from a file : you only need to set the input
265
# filename and optionnally a new format. Supported conversions:
266
#    avi -> asf
267

    
268
#<Stream file.rm>
269
#File "/usr/local/httpd/htdocs/tlive.rm"
270
#NoAudio
271
#</Stream>
272

    
273
#<Stream file.asf>
274
#File "/usr/local/httpd/htdocs/test.asf"
275
#NoAudio
276
#Author "Me"
277
#Copyright "Super MegaCorp"
278
#Title "Test stream from disk"
279
#Comment "Test comment"
280
#</Stream>
281

    
282

    
283
##################################################################
284
# RTSP examples
285
#
286
# You can access to this stream with the RTSP URL:
287
#   rtsp://localhost:5454/test1-rtsp.mpg
288
#
289
# A non standard RTSP redirector is also created. Its URL is:
290
#   http://localhost:8090/test1-rtsp.rtsp
291

    
292
#<Stream test1-rtsp.mpg>
293
#Format rtp
294
#File "/usr/local/httpd/htdocs/test1.mpg"
295
#</Stream>
296

    
297

    
298
##################################################################
299
# SDP/multicast examples
300
#
301
# If you want to send your stream in multicast, you must set the
302
# multicast address with MulticastAddress. The port and the TTL can
303
# also be set.
304
#
305
# An SDP file is automatically generated by ffserver by adding the
306
# 'sdp' extension to the stream name (here
307
# http://localhost:8090/test1-sdp.sdp). You should usually give this
308
# file to your player to play the stream.
309
# 
310
# The 'NoLoop' option can be used to avoid looping when the stream is
311
# terminated.
312

    
313
#<Stream test1-sdp.mpg>
314
#Format rtp
315
#File "/usr/local/httpd/htdocs/test1.mpg"
316
#MulticastAddress 224.124.0.1
317
#MulticastPort 5000
318
#MulticastTTL 16
319
#NoLoop
320
#</Stream>
321

    
322

    
323
##################################################################
324
# Special streams
325

    
326
# Server status
327

    
328
<Stream stat.html>
329
Format status
330

    
331
# Only allow local people to get to the status
332
ACL allow localhost
333
ACL allow 192.168.0.0 192.168.255.255
334

    
335
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
336
</Stream>
337

    
338

    
339
# Redirect index.html to the appropriate site
340

    
341
<Redirect index.html>
342
URL http://www.ffmpeg.org/
343
</Redirect>
344

    
345