wok diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ffserver/stuff/ffserver.conf	Wed Aug 20 20:12:30 2014 +0200
     1.3 @@ -0,0 +1,377 @@
     1.4 +# /etc/ffserver.conf
     1.5 +#
     1.6 +# Port on which the server is listening. You must select a different
     1.7 +# port from your standard HTTP web server if it is running on the same
     1.8 +# computer.
     1.9 +Port 8090
    1.10 +
    1.11 +# Address on which the server is bound. Only useful if you have
    1.12 +# several network interfaces.
    1.13 +BindAddress 0.0.0.0
    1.14 +
    1.15 +# Number of simultaneous HTTP connections that can be handled. It has
    1.16 +# to be defined *before* the MaxClients parameter, since it defines the
    1.17 +# MaxClients maximum limit.
    1.18 +MaxHTTPConnections 2000
    1.19 +
    1.20 +# Number of simultaneous requests that can be handled. Since FFServer
    1.21 +# is very fast, it is more likely that you will want to leave this high
    1.22 +# and use MaxBandwidth, below.
    1.23 +MaxClients 1000
    1.24 +
    1.25 +# This the maximum amount of kbit/sec that you are prepared to
    1.26 +# consume when streaming to clients.
    1.27 +MaxBandwidth 1000
    1.28 +
    1.29 +# Access log file (uses standard Apache log file format)
    1.30 +# '-' is the standard output.
    1.31 +CustomLog -
    1.32 +
    1.33 +# Suppress that if you want to launch ffserver as a daemon.
    1.34 +NoDaemon
    1.35 +
    1.36 +
    1.37 +##################################################################
    1.38 +# Definition of the live feeds. Each live feed contains one video
    1.39 +# and/or audio sequence coming from an ffmpeg encoder or another
    1.40 +# ffserver. This sequence may be encoded simultaneously with several
    1.41 +# codecs at several resolutions.
    1.42 +
    1.43 +<Feed feed1.ffm>
    1.44 +
    1.45 +# You must use 'ffmpeg' to send a live feed to ffserver. In this
    1.46 +# example, you can type:
    1.47 +#
    1.48 +# ffmpeg http://localhost:8090/feed1.ffm
    1.49 +
    1.50 +# ffserver can also do time shifting. It means that it can stream any
    1.51 +# previously recorded live stream. The request should contain:
    1.52 +# "http://xxxx?date=[YYYY-MM-DDT][[HH:]MM:]SS[.m...]".You must specify
    1.53 +# a path where the feed is stored on disk. You also specify the
    1.54 +# maximum size of the feed, where zero means unlimited. Default:
    1.55 +# File=/tmp/feed_name.ffm FileMaxSize=5M
    1.56 +File /tmp/feed1.ffm
    1.57 +FileMaxSize 200K
    1.58 +
    1.59 +# You could specify
    1.60 +# ReadOnlyFile /saved/specialvideo.ffm
    1.61 +# This marks the file as readonly and it will not be deleted or updated.
    1.62 +
    1.63 +# Specify launch in order to start ffmpeg automatically.
    1.64 +# First ffmpeg must be defined with an appropriate path if needed,
    1.65 +# after that options can follow, but avoid adding the http:// field
    1.66 +#Launch ffmpeg
    1.67 +
    1.68 +# Only allow connections from localhost to the feed.
    1.69 +ACL allow 127.0.0.1
    1.70 +
    1.71 +</Feed>
    1.72 +
    1.73 +
    1.74 +##################################################################
    1.75 +# Now you can define each stream which will be generated from the
    1.76 +# original audio and video stream. Each format has a filename (here
    1.77 +# 'test1.mpg'). FFServer will send this stream when answering a
    1.78 +# request containing this filename.
    1.79 +
    1.80 +<Stream test1.mpg>
    1.81 +
    1.82 +# coming from live feed 'feed1'
    1.83 +Feed feed1.ffm
    1.84 +
    1.85 +# Format of the stream : you can choose among:
    1.86 +# mpeg       : MPEG-1 multiplexed video and audio
    1.87 +# mpegvideo  : only MPEG-1 video
    1.88 +# mp2        : MPEG-2 audio (use AudioCodec to select layer 2 and 3 codec)
    1.89 +# ogg        : Ogg format (Vorbis audio codec)
    1.90 +# rm         : RealNetworks-compatible stream. Multiplexed audio and video.
    1.91 +# ra         : RealNetworks-compatible stream. Audio only.
    1.92 +# mpjpeg     : Multipart JPEG (works with Netscape without any plugin)
    1.93 +# jpeg       : Generate a single JPEG image.
    1.94 +# asf        : ASF compatible streaming (Windows Media Player format).
    1.95 +# swf        : Macromedia Flash compatible stream
    1.96 +# avi        : AVI format (MPEG-4 video, MPEG audio sound)
    1.97 +Format mpeg
    1.98 +
    1.99 +# Bitrate for the audio stream. Codecs usually support only a few
   1.100 +# different bitrates.
   1.101 +AudioBitRate 32
   1.102 +
   1.103 +# Number of audio channels: 1 = mono, 2 = stereo
   1.104 +AudioChannels 1
   1.105 +
   1.106 +# Sampling frequency for audio. When using low bitrates, you should
   1.107 +# lower this frequency to 22050 or 11025. The supported frequencies
   1.108 +# depend on the selected audio codec.
   1.109 +AudioSampleRate 44100
   1.110 +
   1.111 +# Bitrate for the video stream
   1.112 +VideoBitRate 64
   1.113 +
   1.114 +# Ratecontrol buffer size
   1.115 +VideoBufferSize 40
   1.116 +
   1.117 +# Number of frames per second
   1.118 +VideoFrameRate 3
   1.119 +
   1.120 +# Size of the video frame: WxH (default: 160x128)
   1.121 +# The following abbreviations are defined: sqcif, qcif, cif, 4cif, qqvga,
   1.122 +# qvga, vga, svga, xga, uxga, qxga, sxga, qsxga, hsxga, wvga, wxga, wsxga,
   1.123 +# wuxga, woxga, wqsxga, wquxga, whsxga, whuxga, cga, ega, hd480, hd720,
   1.124 +# hd1080
   1.125 +VideoSize 160x128
   1.126 +
   1.127 +# Transmit only intra frames (useful for low bitrates, but kills frame rate).
   1.128 +#VideoIntraOnly
   1.129 +
   1.130 +# If non-intra only, an intra frame is transmitted every VideoGopSize
   1.131 +# frames. Video synchronization can only begin at an intra frame.
   1.132 +VideoGopSize 12
   1.133 +
   1.134 +# More MPEG-4 parameters
   1.135 +# VideoHighQuality
   1.136 +# Video4MotionVector
   1.137 +
   1.138 +# Choose your codecs:
   1.139 +#AudioCodec mp2
   1.140 +#VideoCodec mpeg1video
   1.141 +
   1.142 +# Suppress audio
   1.143 +#NoAudio
   1.144 +
   1.145 +# Suppress video
   1.146 +#NoVideo
   1.147 +
   1.148 +#VideoQMin 3
   1.149 +#VideoQMax 31
   1.150 +
   1.151 +# Set this to the number of seconds backwards in time to start. Note that
   1.152 +# most players will buffer 5-10 seconds of video, and also you need to allow
   1.153 +# for a keyframe to appear in the data stream.
   1.154 +#Preroll 15
   1.155 +
   1.156 +# ACL:
   1.157 +
   1.158 +# You can allow ranges of addresses (or single addresses)
   1.159 +#ACL ALLOW <first address> 
   1.160 +
   1.161 +# You can deny ranges of addresses (or single addresses)
   1.162 +#ACL DENY <first address> 
   1.163 +
   1.164 +# You can repeat the ACL allow/deny as often as you like. It is on a per
   1.165 +# stream basis. The first match defines the action. If there are no matches,
   1.166 +# then the default is the inverse of the last ACL statement.
   1.167 +#
   1.168 +# Thus 'ACL allow localhost' only allows access from localhost.
   1.169 +# 'ACL deny 1.0.0.0 1.255.255.255' would deny the whole of network 1 and
   1.170 +# allow everybody else.
   1.171 +
   1.172 +</Stream>
   1.173 +
   1.174 +
   1.175 +##################################################################
   1.176 +# Example streams
   1.177 +
   1.178 +
   1.179 +# Multipart JPEG
   1.180 +
   1.181 +#<Stream test.mjpg>
   1.182 +#Feed feed1.ffm
   1.183 +#Format mpjpeg
   1.184 +#VideoFrameRate 2
   1.185 +#VideoIntraOnly
   1.186 +#NoAudio
   1.187 +#Strict -1
   1.188 +#</Stream>
   1.189 +
   1.190 +
   1.191 +# Single JPEG
   1.192 +
   1.193 +#<Stream test.jpg>
   1.194 +#Feed feed1.ffm
   1.195 +#Format jpeg
   1.196 +#VideoFrameRate 2
   1.197 +#VideoIntraOnly
   1.198 +##VideoSize 352x240
   1.199 +#NoAudio
   1.200 +#Strict -1
   1.201 +#</Stream>
   1.202 +
   1.203 +
   1.204 +# Flash
   1.205 +
   1.206 +#<Stream test.swf>
   1.207 +#Feed feed1.ffm
   1.208 +#Format swf
   1.209 +#VideoFrameRate 2
   1.210 +#VideoIntraOnly
   1.211 +#NoAudio
   1.212 +#</Stream>
   1.213 +
   1.214 +
   1.215 +# ASF compatible
   1.216 +
   1.217 +<Stream test.asf>
   1.218 +Feed feed1.ffm
   1.219 +Format asf
   1.220 +VideoFrameRate 15
   1.221 +VideoSize 352x240
   1.222 +VideoBitRate 256
   1.223 +VideoBufferSize 40
   1.224 +VideoGopSize 30
   1.225 +AudioBitRate 64
   1.226 +StartSendOnKey
   1.227 +</Stream>
   1.228 +
   1.229 +
   1.230 +# MP3 audio
   1.231 +
   1.232 +#<Stream test.mp3>
   1.233 +#Feed feed1.ffm
   1.234 +#Format mp2
   1.235 +#AudioCodec mp3
   1.236 +#AudioBitRate 64
   1.237 +#AudioChannels 1
   1.238 +#AudioSampleRate 44100
   1.239 +#NoVideo
   1.240 +#</Stream>
   1.241 +
   1.242 +
   1.243 +# Ogg Vorbis audio
   1.244 +
   1.245 +#<Stream test.ogg>
   1.246 +#Feed feed1.ffm
   1.247 +#Title "Stream title"
   1.248 +#AudioBitRate 64
   1.249 +#AudioChannels 2
   1.250 +#AudioSampleRate 44100
   1.251 +#NoVideo
   1.252 +#</Stream>
   1.253 +
   1.254 +
   1.255 +# Real with audio only at 32 kbits
   1.256 +
   1.257 +#<Stream test.ra>
   1.258 +#Feed feed1.ffm
   1.259 +#Format rm
   1.260 +#AudioBitRate 32
   1.261 +#NoVideo
   1.262 +#NoAudio
   1.263 +#</Stream>
   1.264 +
   1.265 +
   1.266 +# Real with audio and video at 64 kbits
   1.267 +
   1.268 +#<Stream test.rm>
   1.269 +#Feed feed1.ffm
   1.270 +#Format rm
   1.271 +#AudioBitRate 32
   1.272 +#VideoBitRate 128
   1.273 +#VideoFrameRate 25
   1.274 +#VideoGopSize 25
   1.275 +#NoAudio
   1.276 +#</Stream>
   1.277 +
   1.278 +
   1.279 +##################################################################
   1.280 +# A stream coming from a file: you only need to set the input
   1.281 +# filename and optionally a new format. Supported conversions:
   1.282 +#    AVI -> ASF
   1.283 +
   1.284 +#<Stream file.rm>
   1.285 +#File "/usr/local/httpd/htdocs/tlive.rm"
   1.286 +#NoAudio
   1.287 +#</Stream>
   1.288 +
   1.289 +#<Stream file.asf>
   1.290 +#File "/usr/local/httpd/htdocs/test.asf"
   1.291 +#NoAudio
   1.292 +#Author "Me"
   1.293 +#Copyright "Super MegaCorp"
   1.294 +#Title "Test stream from disk"
   1.295 +#Comment "Test comment"
   1.296 +#</Stream>
   1.297 +
   1.298 +
   1.299 +##################################################################
   1.300 +# RTSP examples
   1.301 +#
   1.302 +# You can access this stream with the RTSP URL:
   1.303 +#   rtsp://localhost:5454/test1-rtsp.mpg
   1.304 +#
   1.305 +# A non-standard RTSP redirector is also created. Its URL is:
   1.306 +#   http://localhost:8090/test1-rtsp.rtsp
   1.307 +
   1.308 +#<Stream test1-rtsp.mpg>
   1.309 +#Format rtp
   1.310 +#File "/usr/local/httpd/htdocs/test1.mpg"
   1.311 +#</Stream>
   1.312 +
   1.313 +
   1.314 +# Transcode an incoming live feed to another live feed,
   1.315 +# using libx264 and video presets
   1.316 +
   1.317 +#<Stream live.h264>
   1.318 +#Format rtp
   1.319 +#Feed feed1.ffm
   1.320 +#VideoCodec libx264
   1.321 +#VideoFrameRate 24
   1.322 +#VideoBitRate 100
   1.323 +#VideoSize 480x272
   1.324 +#AVPresetVideo default
   1.325 +#AVPresetVideo baseline
   1.326 +#AVOptionVideo flags +global_header
   1.327 +#
   1.328 +#AudioCodec libfaac
   1.329 +#AudioBitRate 32
   1.330 +#AudioChannels 2
   1.331 +#AudioSampleRate 22050
   1.332 +#AVOptionAudio flags +global_header
   1.333 +#</Stream>
   1.334 +
   1.335 +##################################################################
   1.336 +# SDP/multicast examples
   1.337 +#
   1.338 +# If you want to send your stream in multicast, you must set the
   1.339 +# multicast address with MulticastAddress. The port and the TTL can
   1.340 +# also be set.
   1.341 +#
   1.342 +# An SDP file is automatically generated by ffserver by adding the
   1.343 +# 'sdp' extension to the stream name (here
   1.344 +# http://localhost:8090/test1-sdp.sdp). You should usually give this
   1.345 +# file to your player to play the stream.
   1.346 +#
   1.347 +# The 'NoLoop' option can be used to avoid looping when the stream is
   1.348 +# terminated.
   1.349 +
   1.350 +#<Stream test1-sdp.mpg>
   1.351 +#Format rtp
   1.352 +#File "/usr/local/httpd/htdocs/test1.mpg"
   1.353 +#MulticastAddress 224.124.0.1
   1.354 +#MulticastPort 5000
   1.355 +#MulticastTTL 16
   1.356 +#NoLoop
   1.357 +#</Stream>
   1.358 +
   1.359 +
   1.360 +##################################################################
   1.361 +# Special streams
   1.362 +
   1.363 +# Server status
   1.364 +
   1.365 +<Stream stat.html>
   1.366 +Format status
   1.367 +
   1.368 +# Only allow local people to get the status
   1.369 +ACL allow localhost
   1.370 +ACL allow 192.168.0.0 192.168.255.255
   1.371 +
   1.372 +#FaviconURL http://pond1.gladstonefamily.net:8080/favicon.ico
   1.373 +</Stream>
   1.374 +
   1.375 +
   1.376 +# Redirect index.html to the appropriate site
   1.377 +
   1.378 +<Redirect index.html>
   1.379 +URL http://www.ffmpeg.org/
   1.380 +</Redirect>