wok annotate ffserver/stuff/ffserver.conf @ rev 17052

slim: fix editing patch, login_cmd stored in other line
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Wed Aug 20 20:12:30 2014 +0200 (2014-08-20)
parents
children
rev   line source
pankso@16524 1 # /etc/ffserver.conf
pankso@16524 2 #
pankso@16524 3 # Port on which the server is listening. You must select a different
pankso@16524 4 # port from your standard HTTP web server if it is running on the same
pankso@16524 5 # computer.
pankso@16524 6 Port 8090
pankso@16524 7
pankso@16524 8 # Address on which the server is bound. Only useful if you have
pankso@16524 9 # several network interfaces.
pankso@16524 10 BindAddress 0.0.0.0
pankso@16524 11
pankso@16524 12 # Number of simultaneous HTTP connections that can be handled. It has
pankso@16524 13 # to be defined *before* the MaxClients parameter, since it defines the
pankso@16524 14 # MaxClients maximum limit.
pankso@16524 15 MaxHTTPConnections 2000
pankso@16524 16
pankso@16524 17 # Number of simultaneous requests that can be handled. Since FFServer
pankso@16524 18 # is very fast, it is more likely that you will want to leave this high
pankso@16524 19 # and use MaxBandwidth, below.
pankso@16524 20 MaxClients 1000
pankso@16524 21
pankso@16524 22 # This the maximum amount of kbit/sec that you are prepared to
pankso@16524 23 # consume when streaming to clients.
pankso@16524 24 MaxBandwidth 1000
pankso@16524 25
pankso@16524 26 # Access log file (uses standard Apache log file format)
pankso@16524 27 # '-' is the standard output.
pankso@16524 28 CustomLog -
pankso@16524 29
pankso@16524 30 # Suppress that if you want to launch ffserver as a daemon.
pankso@16524 31 NoDaemon
pankso@16524 32
pankso@16524 33
pankso@16524 34 ##################################################################
pankso@16524 35 # Definition of the live feeds. Each live feed contains one video
pankso@16524 36 # and/or audio sequence coming from an ffmpeg encoder or another
pankso@16524 37 # ffserver. This sequence may be encoded simultaneously with several
pankso@16524 38 # codecs at several resolutions.
pankso@16524 39
pankso@16524 40 <Feed feed1.ffm>
pankso@16524 41
pankso@16524 42 # You must use 'ffmpeg' to send a live feed to ffserver. In this
pankso@16524 43 # example, you can type:
pankso@16524 44 #
pankso@16524 45 # ffmpeg http://localhost:8090/feed1.ffm
pankso@16524 46
pankso@16524 47 # ffserver can also do time shifting. It means that it can stream any
pankso@16524 48 # previously recorded live stream. The request should contain:
pankso@16524 49 # "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
pankso@16524 50 # a path where the feed is stored on disk. You also specify the
pankso@16524 51 # maximum size of the feed, where zero means unlimited. Default:
pankso@16524 52 # File=/tmp/feed_name.ffm FileMaxSize=5M
pankso@16524 53 File /tmp/feed1.ffm
pankso@16524 54 FileMaxSize 200K
pankso@16524 55
pankso@16524 56 # You could specify
pankso@16524 57 # ReadOnlyFile /saved/specialvideo.ffm
pankso@16524 58 # This marks the file as readonly and it will not be deleted or updated.
pankso@16524 59
pankso@16524 60 # Specify launch in order to start ffmpeg automatically.
pankso@16524 61 # First ffmpeg must be defined with an appropriate path if needed,
pankso@16524 62 # after that options can follow, but avoid adding the http:// field
pankso@16524 63 #Launch ffmpeg
pankso@16524 64
pankso@16524 65 # Only allow connections from localhost to the feed.
pankso@16524 66 ACL allow 127.0.0.1
pankso@16524 67
pankso@16524 68 </Feed>
pankso@16524 69
pankso@16524 70
pankso@16524 71 ##################################################################
pankso@16524 72 # Now you can define each stream which will be generated from the
pankso@16524 73 # original audio and video stream. Each format has a filename (here
pankso@16524 74 # 'test1.mpg'). FFServer will send this stream when answering a
pankso@16524 75 # request containing this filename.
pankso@16524 76
pankso@16524 77 <Stream test1.mpg>
pankso@16524 78
pankso@16524 79 # coming from live feed 'feed1'
pankso@16524 80 Feed feed1.ffm
pankso@16524 81
pankso@16524 82 # Format of the stream : you can choose among:
pankso@16524 83 # mpeg : MPEG-1 multiplexed video and audio
pankso@16524 84 # mpegvideo : only MPEG-1 video
pankso@16524 85 # mp2 : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)
pankso@16524 86 # ogg : Ogg format (Vorbis audio codec)
pankso@16524 87 # rm : RealNetworks-compatible stream. Multiplexed audio and video.
pankso@16524 88 # ra : RealNetworks-compatible stream. Audio only.
pankso@16524 89 # mpjpeg : Multipart JPEG (works with Netscape without any plugin)
pankso@16524 90 # jpeg : Generate a single JPEG image.
pankso@16524 91 # asf : ASF compatible streaming (Windows Media Player format).
pankso@16524 92 # swf : Macromedia Flash compatible stream
pankso@16524 93 # avi : AVI format (MPEG-4 video, MPEG audio sound)
pankso@16524 94 Format mpeg
pankso@16524 95
pankso@16524 96 # Bitrate for the audio stream. Codecs usually support only a few
pankso@16524 97 # different bitrates.
pankso@16524 98 AudioBitRate 32
pankso@16524 99
pankso@16524 100 # Number of audio channels: 1 = mono, 2 = stereo
pankso@16524 101 AudioChannels 1
pankso@16524 102
pankso@16524 103 # Sampling frequency for audio. When using low bitrates, you should
pankso@16524 104 # lower this frequency to 22050 or 11025. The supported frequencies
pankso@16524 105 # depend on the selected audio codec.
pankso@16524 106 AudioSampleRate 44100
pankso@16524 107
pankso@16524 108 # Bitrate for the video stream
pankso@16524 109 VideoBitRate 64
pankso@16524 110
pankso@16524 111 # Ratecontrol buffer size
pankso@16524 112 VideoBufferSize 40
pankso@16524 113
pankso@16524 114 # Number of frames per second
pankso@16524 115 VideoFrameRate 3
pankso@16524 116
pankso@16524 117 # Size of the video frame: WxH (default: 160x128)
pankso@16524 118 # The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
pankso@16524 119 # qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
pankso@16524 120 # wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
pankso@16524 121 # hd1080
pankso@16524 122 VideoSize 160x128
pankso@16524 123
pankso@16524 124 # Transmit only intra frames (useful for low bitrates, but kills frame rate).
pankso@16524 125 #VideoIntraOnly
pankso@16524 126
pankso@16524 127 # If non-intra only, an intra frame is transmitted every VideoGopSize
pankso@16524 128 # frames. Video synchronization can only begin at an intra frame.
pankso@16524 129 VideoGopSize 12
pankso@16524 130
pankso@16524 131 # More MPEG-4 parameters
pankso@16524 132 # VideoHighQuality
pankso@16524 133 # Video4MotionVector
pankso@16524 134
pankso@16524 135 # Choose your codecs:
pankso@16524 136 #AudioCodec mp2
pankso@16524 137 #VideoCodec mpeg1video
pankso@16524 138
pankso@16524 139 # Suppress audio
pankso@16524 140 #NoAudio
pankso@16524 141
pankso@16524 142 # Suppress video
pankso@16524 143 #NoVideo
pankso@16524 144
pankso@16524 145 #VideoQMin 3
pankso@16524 146 #VideoQMax 31
pankso@16524 147
pankso@16524 148 # Set this to the number of seconds backwards in time to start. Note that
pankso@16524 149 # most players will buffer 5-10 seconds of video, and also you need to allow
pankso@16524 150 # for a keyframe to appear in the data stream.
pankso@16524 151 #Preroll 15
pankso@16524 152
pankso@16524 153 # ACL:
pankso@16524 154
pankso@16524 155 # You can allow ranges of addresses (or single addresses)
pankso@16524 156 #ACL ALLOW <first address>
pankso@16524 157
pankso@16524 158 # You can deny ranges of addresses (or single addresses)
pankso@16524 159 #ACL DENY <first address>
pankso@16524 160
pankso@16524 161 # You can repeat the ACL allow/deny as often as you like. It is on a per
pankso@16524 162 # stream basis. The first match defines the action. If there are no matches,
pankso@16524 163 # then the default is the inverse of the last ACL statement.
pankso@16524 164 #
pankso@16524 165 # Thus 'ACL allow localhost' only allows access from localhost.
pankso@16524 166 # 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
pankso@16524 167 # allow everybody else.
pankso@16524 168
pankso@16524 169 </Stream>
pankso@16524 170
pankso@16524 171
pankso@16524 172 ##################################################################
pankso@16524 173 # Example streams
pankso@16524 174
pankso@16524 175
pankso@16524 176 # Multipart JPEG
pankso@16524 177
pankso@16524 178 #<Stream test.mjpg>
pankso@16524 179 #Feed feed1.ffm
pankso@16524 180 #Format mpjpeg
pankso@16524 181 #VideoFrameRate 2
pankso@16524 182 #VideoIntraOnly
pankso@16524 183 #NoAudio
pankso@16524 184 #Strict -1
pankso@16524 185 #</Stream>
pankso@16524 186
pankso@16524 187
pankso@16524 188 # Single JPEG
pankso@16524 189
pankso@16524 190 #<Stream test.jpg>
pankso@16524 191 #Feed feed1.ffm
pankso@16524 192 #Format jpeg
pankso@16524 193 #VideoFrameRate 2
pankso@16524 194 #VideoIntraOnly
pankso@16524 195 ##VideoSize 352x240
pankso@16524 196 #NoAudio
pankso@16524 197 #Strict -1
pankso@16524 198 #</Stream>
pankso@16524 199
pankso@16524 200
pankso@16524 201 # Flash
pankso@16524 202
pankso@16524 203 #<Stream test.swf>
pankso@16524 204 #Feed feed1.ffm
pankso@16524 205 #Format swf
pankso@16524 206 #VideoFrameRate 2
pankso@16524 207 #VideoIntraOnly
pankso@16524 208 #NoAudio
pankso@16524 209 #</Stream>
pankso@16524 210
pankso@16524 211
pankso@16524 212 # ASF compatible
pankso@16524 213
pankso@16524 214 <Stream test.asf>
pankso@16524 215 Feed feed1.ffm
pankso@16524 216 Format asf
pankso@16524 217 VideoFrameRate 15
pankso@16524 218 VideoSize 352x240
pankso@16524 219 VideoBitRate 256
pankso@16524 220 VideoBufferSize 40
pankso@16524 221 VideoGopSize 30
pankso@16524 222 AudioBitRate 64
pankso@16524 223 StartSendOnKey
pankso@16524 224 </Stream>
pankso@16524 225
pankso@16524 226
pankso@16524 227 # MP3 audio
pankso@16524 228
pankso@16524 229 #<Stream test.mp3>
pankso@16524 230 #Feed feed1.ffm
pankso@16524 231 #Format mp2
pankso@16524 232 #AudioCodec mp3
pankso@16524 233 #AudioBitRate 64
pankso@16524 234 #AudioChannels 1
pankso@16524 235 #AudioSampleRate 44100
pankso@16524 236 #NoVideo
pankso@16524 237 #</Stream>
pankso@16524 238
pankso@16524 239
pankso@16524 240 # Ogg Vorbis audio
pankso@16524 241
pankso@16524 242 #<Stream test.ogg>
pankso@16524 243 #Feed feed1.ffm
pankso@16524 244 #Title "Stream title"
pankso@16524 245 #AudioBitRate 64
pankso@16524 246 #AudioChannels 2
pankso@16524 247 #AudioSampleRate 44100
pankso@16524 248 #NoVideo
pankso@16524 249 #</Stream>
pankso@16524 250
pankso@16524 251
pankso@16524 252 # Real with audio only at 32 kbits
pankso@16524 253
pankso@16524 254 #<Stream test.ra>
pankso@16524 255 #Feed feed1.ffm
pankso@16524 256 #Format rm
pankso@16524 257 #AudioBitRate 32
pankso@16524 258 #NoVideo
pankso@16524 259 #NoAudio
pankso@16524 260 #</Stream>
pankso@16524 261
pankso@16524 262
pankso@16524 263 # Real with audio and video at 64 kbits
pankso@16524 264
pankso@16524 265 #<Stream test.rm>
pankso@16524 266 #Feed feed1.ffm
pankso@16524 267 #Format rm
pankso@16524 268 #AudioBitRate 32
pankso@16524 269 #VideoBitRate 128
pankso@16524 270 #VideoFrameRate 25
pankso@16524 271 #VideoGopSize 25
pankso@16524 272 #NoAudio
pankso@16524 273 #</Stream>
pankso@16524 274
pankso@16524 275
pankso@16524 276 ##################################################################
pankso@16524 277 # A stream coming from a file: you only need to set the input
pankso@16524 278 # filename and optionally a new format. Supported conversions:
pankso@16524 279 # AVI -> ASF
pankso@16524 280
pankso@16524 281 #<Stream file.rm>
pankso@16524 282 #File "/usr/local/httpd/htdocs/tlive.rm"
pankso@16524 283 #NoAudio
pankso@16524 284 #</Stream>
pankso@16524 285
pankso@16524 286 #<Stream file.asf>
pankso@16524 287 #File "/usr/local/httpd/htdocs/test.asf"
pankso@16524 288 #NoAudio
pankso@16524 289 #Author "Me"
pankso@16524 290 #Copyright "Super MegaCorp"
pankso@16524 291 #Title "Test stream from disk"
pankso@16524 292 #Comment "Test comment"
pankso@16524 293 #</Stream>
pankso@16524 294
pankso@16524 295
pankso@16524 296 ##################################################################
pankso@16524 297 # RTSP examples
pankso@16524 298 #
pankso@16524 299 # You can access this stream with the RTSP URL:
pankso@16524 300 # rtsp://localhost:5454/test1-rtsp.mpg
pankso@16524 301 #
pankso@16524 302 # A non-standard RTSP redirector is also created. Its URL is:
pankso@16524 303 # http://localhost:8090/test1-rtsp.rtsp
pankso@16524 304
pankso@16524 305 #<Stream test1-rtsp.mpg>
pankso@16524 306 #Format rtp
pankso@16524 307 #File "/usr/local/httpd/htdocs/test1.mpg"
pankso@16524 308 #</Stream>
pankso@16524 309
pankso@16524 310
pankso@16524 311 # Transcode an incoming live feed to another live feed,
pankso@16524 312 # using libx264 and video presets
pankso@16524 313
pankso@16524 314 #<Stream live.h264>
pankso@16524 315 #Format rtp
pankso@16524 316 #Feed feed1.ffm
pankso@16524 317 #VideoCodec libx264
pankso@16524 318 #VideoFrameRate 24
pankso@16524 319 #VideoBitRate 100
pankso@16524 320 #VideoSize 480x272
pankso@16524 321 #AVPresetVideo default
pankso@16524 322 #AVPresetVideo baseline
pankso@16524 323 #AVOptionVideo flags +global_header
pankso@16524 324 #
pankso@16524 325 #AudioCodec libfaac
pankso@16524 326 #AudioBitRate 32
pankso@16524 327 #AudioChannels 2
pankso@16524 328 #AudioSampleRate 22050
pankso@16524 329 #AVOptionAudio flags +global_header
pankso@16524 330 #</Stream>
pankso@16524 331
pankso@16524 332 ##################################################################
pankso@16524 333 # SDP/multicast examples
pankso@16524 334 #
pankso@16524 335 # If you want to send your stream in multicast, you must set the
pankso@16524 336 # multicast address with MulticastAddress. The port and the TTL can
pankso@16524 337 # also be set.
pankso@16524 338 #
pankso@16524 339 # An SDP file is automatically generated by ffserver by adding the
pankso@16524 340 # 'sdp' extension to the stream name (here
pankso@16524 341 # http://localhost:8090/test1-sdp.sdp). You should usually give this
pankso@16524 342 # file to your player to play the stream.
pankso@16524 343 #
pankso@16524 344 # The 'NoLoop' option can be used to avoid looping when the stream is
pankso@16524 345 # terminated.
pankso@16524 346
pankso@16524 347 #<Stream test1-sdp.mpg>
pankso@16524 348 #Format rtp
pankso@16524 349 #File "/usr/local/httpd/htdocs/test1.mpg"
pankso@16524 350 #MulticastAddress 224.124.0.1
pankso@16524 351 #MulticastPort 5000
pankso@16524 352 #MulticastTTL 16
pankso@16524 353 #NoLoop
pankso@16524 354 #</Stream>
pankso@16524 355
pankso@16524 356
pankso@16524 357 ##################################################################
pankso@16524 358 # Special streams
pankso@16524 359
pankso@16524 360 # Server status
pankso@16524 361
pankso@16524 362 <Stream stat.html>
pankso@16524 363 Format status
pankso@16524 364
pankso@16524 365 # Only allow local people to get the status
pankso@16524 366 ACL allow localhost
pankso@16524 367 ACL allow 192.168.0.0 192.168.255.255
pankso@16524 368
pankso@16524 369 #FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
pankso@16524 370 </Stream>
pankso@16524 371
pankso@16524 372
pankso@16524 373 # Redirect index.html to the appropriate site
pankso@16524 374
pankso@16524 375 <Redirect index.html>
pankso@16524 376 URL http://www.ffmpeg.org/
pankso@16524 377 </Redirect>