· 6 years ago · Nov 30, 2019, 09:48 PM
1# stream-name: {
2# type = rtp|live|ondemand|rtsp
3# rtp = stream originated by an external tool (e.g., gstreamer or
4# ffmpeg) and sent to the plugin via RTP
5# live = local file streamed live to multiple listeners
6# (multiple listeners = same streaming context)
7# ondemand = local file streamed on-demand to a single listener
8# (multiple listeners = different streaming contexts)
9# rtsp = stream originated by an external RTSP feed (only
10# available if libcurl support was compiled)
11# id = <unique numeric ID> (if missing, a random one will be generated)
12# description = This is my awesome stream
13# is_private = true|false (private streams don't appear when you do a 'list'
14# request)
15# secret = <optional password needed for manipulating (e.g., destroying
16# or enabling/disabling) the stream>
17# pin = <optional password needed for watching the stream>
18# filename = path to the local file to stream (only for live/ondemand)
19# audio = true|false (do/don't stream audio)
20# video = true|false (do/don't stream video)
21# The following options are only valid for the 'rtp' type:
22# data = true|false (do/don't stream text via datachannels)
23# audioport = local port for receiving audio frames
24# audiortcpport = local port, if any, for receiving and sending audio RTCP feedback
25# audiomcast = multicast group port for receiving audio frames, if any
26# audioiface = network interface or IP address to bind to, if any (binds to all otherwise)
27# audiopt = <audio RTP payload type> (e.g., 111)
28# audiortpmap = RTP map of the audio codec (e.g., opus/48000/2)
29# audioskew = true|false (whether the plugin should perform skew
30# analisys and compensation on incoming audio RTP stream, EXPERIMENTAL)
31# videoport = local port for receiving video frames
32# videortcpport = local port, if any, for receiving and sending video RTCP feedback
33# videomcast = multicast group port for receiving video frames, if any
34# videoiface = network interface or IP address to bind to, if any (binds to all otherwise)
35# videopt = <video RTP payload type> (e.g., 100)
36# videortpmap = RTP map of the video codec (e.g., VP8/90000)
37# videobufferkf = true|false (whether the plugin should store the latest
38# keyframe and send it immediately for new viewers, EXPERIMENTAL)
39# videosimulcast = true|false (do|don't enable video simulcasting)
40# videoport2 = second local port for receiving video frames (only for rtp, and simulcasting)
41# videoport3 = third local port for receiving video frames (only for rtp, and simulcasting)
42# videoskew = true|false (whether the plugin should perform skew
43# analisys and compensation on incoming video RTP stream, EXPERIMENTAL)
44# videosvc = true|false (whether the video will have SVC support; works only for VP9-SVC, default=false)
45# collision = in case of collision (more than one SSRC hitting the same port), the plugin
46# will discard incoming RTP packets with a new SSRC unless this many milliseconds
47# passed, which would then change the current SSRC (0=disabled)
48# dataport = local port for receiving data messages to relay
49# dataiface = network interface or IP address to bind to, if any (binds to all otherwise)
50# databuffermsg = true|false (whether the plugin should store the latest
51# message and send it immediately for new viewers)
52# threads = number of threads to assist with the relaying part, which can help
53# if you expect a lot of viewers that may cause the RTP receiving part
54# in the Streaming plugin to slow down and fail to catch up (default=0)
55#
56# In case you want to use SRTP for your RTP-based mountpoint, you'll need
57# to configure the SRTP-related properties as well, namely the suite to
58# use for hashing (32 or 80) and the crypto information for decrypting
59# the stream (as a base64 encoded string the way SDES does it). Notice
60# that with SRTP involved you'll have to pay extra attention to what you
61# feed the mountpoint, as you may risk getting SRTP decrypt errors:
62# srtpsuite = 32
63# srtpcrypto = WbTBosdVUZqEb6Htqhn+m3z7wUh4RJVR8nE15GbN
64#
65# The following options are only valid for the 'rstp' type:
66# url = RTSP stream URL (only for restreaming RTSP)
67# rtsp_user = RTSP authorization username (only if type=rtsp)
68# rtsp_pwd = RTSP authorization password (only if type=rtsp)
69# rtspiface = network interface or IP address to bind to, if any (binds to all otherwise), when receiving RTSP streams
70# rtsp_failcheck = whether an error should be returned if connecting to the RTSP server fails (default=true)
71#
72# Notice that, for 'rtsp' mountpoints, normally the plugin uses the exact
73# SDP rtpmap and fmtp attributes the remote camera or RTSP server sent.
74# In case the values set remotely are known to conflict with WebRTC viewers,
75# you can override both using the settings introduced above.
76#
77# To test the 'gstreamer-sample' example, check the test_gstreamer.sh
78# script in the plugins/streams folder. The live and on-demand audio
79# file streams, use a couple of files (radio.alaw, music.mulaw) that are
80# provided in the plugins/streams folder.
81#}
82
83general: {
84 #admin_key = "supersecret" # If set, mountpoints can be created via API
85 # only if this key is provided in the request
86 #rtp_port_range = "20000-40000" # Range of ports to use for RTP/RTCP when '0' is
87 # passed as port for a mountpoint (default=10000-60000)
88 #events = false # Whether events should be sent to event
89 # handlers (default=true)
90}
91
92gstreamer-sample: {
93 type = "rtp"
94 id = 1
95 description = "Opus/VP8 live stream coming from gstreamer"
96 audio = true
97 video = true
98 audioport = 5002
99 audiopt = 111
100 audiortpmap = "opus/48000/2"
101 videoport = 5004
102 videopt = 100
103 videortpmap = "VP8/90000"
104 secret = "adminpwd"
105}
106
107file-live-sample: {
108 type = "live"
109 id = 2
110 description = "a-law file source (radio broadcast)"
111 filename = "@streamdir@/radio.alaw"
112 audio = true
113 video = false
114 secret = "adminpwd"
115}
116
117file-ondemand-sample: {
118 type = "ondemand"
119 id = 3
120 description = "mu-law file source (music)"
121 filename = "@streamdir@/music.mulaw"
122 audio = true
123 video = false
124 secret = "adminpwd"
125}
126
127#
128# All browsers also support H.264, often through Cisco's OpenH264 plugin.
129# The only profile that is definitely supported is the baseline one, which
130# means that if you try a higher one it might or might not work. No matter
131# which profile you encode, though, you can put a custom one in the SDP if
132# you override the fmtp SDP attribute via 'videofmtp'. The following is an
133# example of how to create a simple H.264 mountpoint: you can feed it via
134# an x264enc+rtph264pay pipeline in gstreamer, an ffmpeg script or other.
135#
136#h264-sample: {
137 #type = "rtp"
138 #id = 10
139 #description = "H.264 live stream coming from gstreamer"
140 #audio = false
141 #video = true
142 #videoport = 8004
143 #videopt = 126
144 #videortpmap = "H264/90000"
145 #videofmtp = "profile-level-id=42e01f;packetization-mode=1"
146#}
147
148#
149# The Streaming plugin also supports the broadcasting of datachannel
150# messages, either by themselves or along other audio/video streams (e.g.,
151# to add a subtitle to a stream you're sending). The following is an
152# example of how you can create a datachannel-only mountpoint: you can
153# feed it with any tool that can send UDP datagrams, e.g., netcat.
154# Notice that the 'rtp' type just indicates this is a live mountpoint:
155# datachannel messages will be sent as usual, and not use RTP at all.
156#
157#data-example: {
158 #type = "rtp"
159 #id = 15
160 #description = "Datachannel stream from an UDP source"
161 #audio = false
162 #video = false
163 #data = true
164 #dataport = 5008
165#}
166
167#
168# This is a sample configuration for Opus/VP8 multicast streams. You
169# need an external script to feed data on those ports, of course.
170#
171#gstreamer-multicast: {
172 #type = "rtp"
173 #id = 20
174 #description = "Opus/VP8 live multicast stream sample"
175 #audio = true
176 #video = true
177 #audioport = 5002
178 #audiomcast = "232.3.4.5"
179 #audiopt = 111
180 #audiortpmap = "opus/48000/2"
181 #videoport = 5004
182 #videomcast = "232.3.4.5"
183 #videopt = 100
184 #videortpmap = "VP8/90000"
185#}
186
187#
188# This is a sample configuration for an RTSP stream: you can specify
189# the url to connect to and whether or not authentication is needed
190# using the url/rtsp_user/rtsp_pwd settings (but notice that digest
191# authentication will only work if you installed libcurl >= 7.45.0)
192# NOTE WELL: the plugin does NOT transcode, so the RTSP stream MUST be
193# in a format the browser can digest (e.g., VP8 or H.264 baseline for video)
194# Again, you can override payload type, rtpmap and/or fmtp, if needed
195#
196#rtsp-test: {
197 #type = "rtsp"
198 #id = 99
199 #description = "RTSP Test"
200 #audio = false
201 #video = true
202 #url = "rtsp://127.0.0.1:8554/unicast"
203 #rtsp_user = "username"
204 #rtsp_pwd = "password"
205#}