Statistics
| Branch: | Revision:

ffmpeg / doc / ffserver.conf @ 34d7008d

History | View | Annotate | Download (7.77 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
# Specify launch in order to start ffmpeg automatically
50
#Launch
51

    
52
# Only allow connections from localhost to the feed
53
ACL allow 127.0.0.1
54

    
55
</Feed>
56

    
57

    
58
##################################################################
59
# Now you can define each stream which will be generated from the
60
# original audio and video stream. Each format has a filename (here
61
# 'test1.mpg'). FFServer will send this stream when answering a
62
# request containing this filename.
63

    
64
<Stream test1.mpg>
65

    
66
# coming from live feed 'feed1'
67
Feed feed1.ffm
68

    
69
# Format of the stream : you can choose among:
70
# mpeg       : MPEG1 multiplexed video and audio
71
# mpegvideo  : only MPEG1 video
72
# mp2        : MPEG2 audio (use AudioCodec to select layer 2 and 3 codec)
73
# ogg        : Ogg format (Vorbis audio codec)
74
# rm         : Real Networks compatible stream. Multiplexed audio and video.
75
# ra         : Real Networks compatible stream. Audio only.
76
# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
77
# jpeg       : Generate a single JPEG image.
78
# asf        : ASF compatible stream (Windows Media Player format).
79
# swf        : Macromedia flash(tm) compatible stream
80
# avi        : AVI format (open divx video, mpeg audio sound)
81
# master     : special ffmpeg stream used to duplicate a server
82
Format mpeg
83

    
84
# Bitrate for the audio stream. Codecs usually support only a few
85
# different bitrates. 
86
AudioBitRate 32
87

    
88
# Number of audio channels : 1 = mono, 2 = stereo
89
AudioChannels 1
90

    
91
# Sampling frequency for audio. When using low bitrates, you should
92
# lower this frequency to 22050 or 11025. The supported frequencies
93
# depend on the selected audio codec.
94
AudioSampleRate 44100
95

    
96
# Bitrate for the video stream.
97
VideoBitRate 64
98

    
99
# Number of frames per second
100
VideoFrameRate 3
101

    
102
# Size of the video frame : WxH (default: 160x128)
103
# The following abbreviation are defined : sqcif, qcif, cif, 4cif
104
VideoSize 160x128
105

    
106
# transmit only intra frames (useful for low bitrates, but kills frame rate) 
107
#VideoIntraOnly
108

    
109
# If non intra only, an intra frame is transmitted every VideoGopSize
110
# frames Video synchronization can only begin at an I frames.
111
VideoGopSize 12
112

    
113
# Choose your codecs: 
114
#AudioCodec mp2
115
#VideoCodec mpeg1video
116

    
117
# Suppress audio
118
#NoAudio
119

    
120
# Suppress video
121
#NoVideo
122

    
123
#VideoQMin 3
124
#VideoQMax 31
125

    
126
# Set this to the number of seconds backwards in time to start. Note that
127
# most players will buffer 5-10 seconds of video, and also you need to allow
128
# for a key frame to appear in the data stream.
129
#PreRoll 15
130

    
131
# ACL:
132

    
133
# You can allow ranges of addresses (or single addresses)
134
#ACL ALLOW <first address> <last address>
135

    
136
# You can deny ranges of addresses (or single addresses)
137
#ACL DENY <first address> <last address>
138

    
139
# You can repeat the ACL allow/deny as often as you like. It is on a per
140
# stream basis. The first match defines the action. If there are no matches,
141
# then the default is the inverse of the last ACL statement.
142
#
143
# Thus 'ACL allow localhost' only allows access from localhost. 
144
# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
145
# allow everybody else.
146

    
147
</Stream>
148

    
149

    
150
##################################################################
151
# Example streams
152

    
153

    
154
# Multipart JPEG
155

    
156
#<Stream test.mjpg>
157
#Feed feed1.ffm
158
#Format mpjpeg
159
#VideoFrameRate 2
160
#VideoIntraOnly
161
#NoAudio
162
#</Stream>
163

    
164

    
165
# Single JPEG
166

    
167
#<Stream test.jpg>
168
#Feed feed1.ffm
169
#Format jpeg
170
#VideoFrameRate 2 
171
#VideoIntraOnly
172
##VideoSize 352x240
173
#NoAudio
174
#</Stream>
175

    
176

    
177
# Flash
178

    
179
#<Stream test.swf>
180
#Feed feed1.ffm
181
#Format swf
182
#VideoFrameRate 2
183
#VideoIntraOnly
184
#NoAudio
185
#</Stream>
186

    
187

    
188
# ASF compatible
189

    
190
#<Stream test.asf>
191
#Feed feed1.ffm
192
#Format asf
193
#VideoFrameRate 15
194
#VideoSize 352x240
195
#VideoBitRate 256
196
#VideoGopSize 30
197
#AudioBitRate 64
198
#StartSendOnKey
199
#</Stream>
200

    
201

    
202
# MP3 audio 
203

    
204
#<Stream test.mp3>
205
#Feed feed1.ffm
206
#Format mp2
207
#AudioCodec mp3
208
#AudioBitRate 64
209
#AudioChannels 1
210
#AudioSampleRate 44100
211
#NoVideo
212
#</Stream>
213

    
214

    
215
# Ogg Vorbis audio
216

    
217
#<Stream test.ogg>
218
#Feed feed1.ffm
219
#Title "Stream title"
220
#AudioBitRate 64
221
#AudioChannels 2
222
#AudioSampleRate 44100
223
#NoVideo
224
#</Stream>
225

    
226

    
227
# Real with audio only at 32 kbits
228

    
229
#<Stream test.ra>
230
#Feed feed1.ffm
231
#Format rm
232
#AudioBitRate 32
233
#NoVideo
234
#NoAudio
235
#</Stream>
236

    
237

    
238
# Real with audio and video at 64 kbits
239

    
240
#<Stream test.rm>
241
#Feed feed1.ffm
242
#Format rm
243
#AudioBitRate 32
244
#VideoBitRate 128
245
#VideoFrameRate 25
246
#VideoGopSize 25
247
#NoAudio
248
#</Stream>
249

    
250

    
251
##################################################################
252
# A stream coming from a file : you only need to set the input
253
# filename and optionnally a new format. Supported conversions:
254
#    avi -> asf
255

    
256
#<Stream file.rm>
257
#File "/usr/local/httpd/htdocs/tlive.rm"
258
#NoAudio
259
#</Stream>
260

    
261
#<Stream file.asf>
262
#File "/usr/local/httpd/htdocs/test.asf"
263
#NoAudio
264
#Author "Me"
265
#Copyright "Super MegaCorp"
266
#Title "Test stream from disk"
267
#Comment "Test comment"
268
#</Stream>
269

    
270

    
271
##################################################################
272
# RTSP examples
273
#
274
# You can access to this stream with the RTSP URL:
275
#   rtsp://localhost:5454/test1-rtsp.mpg
276
#
277
# A non standard RTSP redirector is also created. Its URL is:
278
#   http://localhost:8090/test1-rtsp.rtsp
279

    
280
#<Stream test1-rtsp.mpg>
281
#Format rtp
282
#File "/usr/local/httpd/htdocs/test1.mpg"
283
#</Stream>
284

    
285

    
286
##################################################################
287
# SDP/multicast examples
288
#
289
# If you want to send your stream in multicast, you must set the
290
# multicast address with MulticastAddress. The port and the TTL can
291
# also be set.
292
#
293
# An SDP file is automatically generated by ffserver by adding the
294
# 'sdp' extension to the stream name (here
295
# http://localhost:8090/test1-sdp.sdp). You should usually give this
296
# file to your player to play the stream.
297
# 
298
# The 'NoLoop' option can be used to avoid looping when the stream is
299
# terminated.
300

    
301
#<Stream test1-sdp.mpg>
302
#Format rtp
303
#File "/usr/local/httpd/htdocs/test1.mpg"
304
#MulticastAddress 224.124.0.1
305
#MulticastPort 5000
306
#MulticastTTL 16
307
#NoLoop
308
#</Stream>
309

    
310

    
311
##################################################################
312
# Special streams
313

    
314
# Server status
315

    
316
<Stream stat.html>
317
Format status
318

    
319
# Only allow local people to get to the status
320
ACL allow localhost
321
ACL allow 192.168.0.0 192.168.255.255
322

    
323
#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
324
</Stream>
325

    
326

    
327
# Redirect index.html to the appropriate site
328

    
329
<Redirect index.html>
330
URL http://ffmpeg.sourceforge.net/
331
</Redirect>
332

    
333