Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ da9c9637

History | View | Annotate | Download (7.96 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
# 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
VideoSize 160x128
109

    
110
# transmit only intra frames (useful for low bitrates, but kills frame rate) 
111
#VideoIntraOnly
112

    
113
# If non intra only, an intra frame is transmitted every VideoGopSize
114
# frames Video synchronization can only begin at an I frames.
115
VideoGopSize 12
116

    
117
# More MPEG4 parameters
118
# VideoHighQuality
119
# Video4MotionVector
120

    
121
# Choose your codecs: 
122
#AudioCodec mp2
123
#VideoCodec mpeg1video
124

    
125
# Suppress audio
126
#NoAudio
127

    
128
# Suppress video
129
#NoVideo
130

    
131
#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
# ACL:
140

    
141
# You can allow ranges of addresses (or single addresses)
142
#ACL ALLOW <first address> <last address>
143

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

    
147
# 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
#
151
# 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

    
155
</Stream>
156

    
157

    
158
##################################################################
159
# Example streams
160

    
161

    
162
# Multipart JPEG
163

    
164
#<Stream test.mjpg>
165
#Feed feed1.ffm
166
#Format mpjpeg
167
#VideoFrameRate 2
168
#VideoIntraOnly
169
#NoAudio
170
#</Stream>
171

    
172

    
173
# Single JPEG
174

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

    
184

    
185
# Flash
186

    
187
#<Stream test.swf>
188
#Feed feed1.ffm
189
#Format swf
190
#VideoFrameRate 2
191
#VideoIntraOnly
192
#NoAudio
193
#</Stream>
194

    
195

    
196
# ASF compatible
197

    
198
<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

    
209

    
210
# MP3 audio 
211

    
212
#<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

    
222

    
223
# Ogg Vorbis audio
224

    
225
#<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

    
234

    
235
# 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

    
259
##################################################################
260
# 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

    
264
#<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
#
282
# You can access to this stream with the RTSP URL:
283
#   rtsp://localhost:5454/test1-rtsp.mpg
284
#
285
# A non standard RTSP redirector is also created. Its URL is:
286
#   http://localhost:8090/test1-rtsp.rtsp
287

    
288
#<Stream test1-rtsp.mpg>
289
#Format rtp
290
#File "/usr/local/httpd/htdocs/test1.mpg"
291
#</Stream>
292

    
293

    
294
##################################################################
295
# SDP/multicast examples
296
#
297
# 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

    
309
#<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

    
319
##################################################################
320
# Special streams
321

    
322
# Server status
323

    
324
<Stream stat.html>
325
Format status
326

    
327
# 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
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
332
</Stream>
333

    
334

    
335
# Redirect index.html to the appropriate site
336

    
337
<Redirect index.html>
338
URL http://ffmpeg.sourceforge.net/
339
</Redirect>
340

    
341