Repository navigation
Expand file tree
/
Copy pathreference.conf
More file actions
193 lines (184 loc) · 7.66 KB
/
Copy pathreference.conf
File metadata and controls
193 lines (184 loc) · 7.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
jibri {
// A unique identifier for this Jibri
// TODO: eventually this will be required with no default
id = ""
// Whether or not Jibri should return to idle state after handling
// (successfully or unsuccessfully) a request. A value of 'true'
// here means that a Jibri will NOT return back to the IDLE state
// and will need to be restarted in order to be used again.
single-use-mode = false
api {
http {
external-api-port = 2222
internal-api-port = 3333
}
xmpp {
// See example_xmpp_envs.conf for an example of what is expected here
environments = []
}
}
recording {
recordings-directory = "/tmp/recordings"
# TODO: make this an optional param and remove the default
finalize-script = "/path/to/finalize"
}
streaming {
// A list of regex patterns for allowed RTMP URLs. The RTMP URL used
// when starting a stream must match at least one of the patterns in
// this list.
rtmp-allow-list = [
// By default, all services are allowed
".*"
]
}
sip {
// The routing rule for the outbound scenario in VoxImplant is based on this prefix
outbound-prefix = "out_"
}
// These options control how Jibri generates the ffmpeg command for recording or streaming. Most options are internal
// to this config file, meaning that they are not used directly by the jibri code, which just uses the 4
// "command-os-type" options defined at the bottom. It also uses "recording-format" to determine the filename.
ffmpeg {
resolution = "1920x1080"
framerate = 30
gop-size = 60
// Encoding speed to compression ratio (slower preset -> better compression)
// Available presets: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
video-encode-preset-streaming = "veryfast"
// Use the legacy property if it's defined.
video-encode-preset-streaming = ${?jibri.ffmpeg.video-encode-preset}
// Prefer larger size at lower CPU cost for file recording.
video-encode-preset-recording = "ultrafast"
// Use the legacy property if it's defined.
video-encode-preset-recording = ${?jibri.ffmpeg.video-encode-preset}
queue-size = 4096
streaming-max-bitrate = "2976k"
streaming-buf-size = "5952k"
streaming-format = "flv"
recording-format = "mp4"
recording-extension = ${jibri.ffmpeg.recording-format}
// The range of the CRF scale is 0-51, where 0 is lossless,
// 23 is the default, and 51 is worst quality possible. A lower value
// generally leads to higher quality, and a subjectively sane range is
// 17-28. Consider 17 or 18 to be visually lossless or nearly so;
// it should look the same or nearly the same as the input but it
// isn't technically lossless.
// https://trac.ffmpeg.org/wiki/Encode/H.264#crf
h264-constant-rate-factor = 25
// The audio source that will be used to capture audio on Linux
audio-source = "alsa"
// The audio device that will be used to capture audio on Linux
audio-device = "plug:bsnoop"
// The path to the ffmpeg binary.
ffmpeg-binary = "ffmpeg"
ffmpeg = [ ${jibri.ffmpeg.ffmpeg-binary}, "-y", "-v", "info" ]
// Input parameters specific to linux
input-linux = [
"-f", "x11grab"
"-draw_mouse", "0"
"-r", ${jibri.ffmpeg.framerate}
"-s", ${jibri.ffmpeg.resolution}
"-thread_queue_size", ${jibri.ffmpeg.queue-size}
"-i", ":0.0+0,0"
"-f", ${jibri.ffmpeg.audio-source}
"-thread_queue_size", ${jibri.ffmpeg.queue-size}
"-i", ${jibri.ffmpeg.audio-device}
]
// Input parameters specific to macOS
input-mac = [
"-thread_queue_size", ${jibri.ffmpeg.queue-size}
"-f", "avfoundation"
"-framerate", ${jibri.ffmpeg.framerate}
"-video_size" ${jibri.ffmpeg.resolution}
// Note the values passed here will need to be changed based on the output of
// ffmpeg -f avfoundation -list_devices true -i ""
"-i", "0:0"
"-vsync", "2"
]
// Audio encoding parameters
audio-params = [ "-acodec", "aac", "-strict", "-2", "-ar", "44100", "-b:a", "128k", "-af", "aresample=async=1" ]
// Video encoding parameters
video-params = [
"-c:v", "libx264"
"-pix_fmt", "yuv420p",
"-r", ${jibri.ffmpeg.framerate}
"-crf", ${jibri.ffmpeg.h264-constant-rate-factor}
]
// Video encoding parameters specific to file recording
video-params-recording = ${jibri.ffmpeg.video-params} [
"-preset", ${jibri.ffmpeg.video-encode-preset-recording}
"-profile:v", "main"
"-level", "3.1"
// TODO: this ffmpeg option is deprecated
"-timestamp", "now"
"-f", ${jibri.ffmpeg.recording-format}
]
// Video encoding parameters specific to streaming
video-params-streaming = ${jibri.ffmpeg.video-params} [
"-preset", ${jibri.ffmpeg.video-encode-preset-streaming}
"-tune", "zerolatency"
"-g", ${jibri.ffmpeg.gop-size}
"-maxrate", ${jibri.ffmpeg.streaming-max-bitrate}
"-bufsize", ${jibri.ffmpeg.streaming-buf-size}
// TODO: this ffmpeg option is deprecated (and probably not needed for streaming?)
"-timestamp", "now"
"-f", ${jibri.ffmpeg.streaming-format}
]
// These are the final commands that jibri uses.
command-linux-recording = ${jibri.ffmpeg.ffmpeg} ${jibri.ffmpeg.input-linux} ${jibri.ffmpeg.audio-params} ${jibri.ffmpeg.video-params-recording}
command-linux-streaming = ${jibri.ffmpeg.ffmpeg} ${jibri.ffmpeg.input-linux} ${jibri.ffmpeg.audio-params} ${jibri.ffmpeg.video-params-streaming}
command-mac-recording = ${jibri.ffmpeg.ffmpeg} ${jibri.ffmpeg.input-mac} ${jibri.ffmpeg.audio-params} ${jibri.ffmpeg.video-params-recording}
command-mac-streaming = ${jibri.ffmpeg.ffmpeg} ${jibri.ffmpeg.input-mac} ${jibri.ffmpeg.audio-params} ${jibri.ffmpeg.video-params-streaming}
}
chrome {
// The flags which will be passed to chromium when launching
flags = [
"--use-fake-ui-for-media-stream",
"--start-maximized",
"--kiosk",
"--enabled",
"--autoplay-policy=no-user-gesture-required"
]
}
stats {
enable-stats-d = true
host = "localhost"
port = 8125
prometheus {
// Enable a prometheus interface at /metrics
enabled = false
}
}
webhook {
// A list of subscribers interested in receiving webhook events
subscribers = []
}
jwt-info {
// The path to a .pem file which will be used to sign JWT tokens used in webhook
// requests. If not set, no JWT will be added to webhook requests.
# signing-key-path = "/path/to/key.pem"
// The kid to use as part of the JWT
# kid = "key-id"
// The issuer of the JWT
# issuer = "issuer"
// The audience of the JWT
# audience = "audience"
// The TTL of each generated JWT. Can't be less than 10 minutes.
# ttl = 1 hour
}
call-status-checks {
// If not all clients have their audio and video muted, but Jibri does not
// detect any data stream (audio or video) comming in, it will stop
// recording after NO_MEDIA_TIMEOUT expires.
no-media-timeout = 3 minutes
// If all clients have their audio and video muted, Jibri consideres this
// as an empty call and stops the recording after ALL_MUTED_TIMEOUT expires.
all-muted-timeout = 10 minutes
// When detecting if a call is empty, Jibri takes into consideration for how
// long the call has been empty already. If it has been empty for more than
// DEFAULT_CALL_EMPTY_TIMEOUT, it will consider it empty and stop the recording.
default-call-empty-timeout = 30 seconds
// If ICE hasn't completed, or stays in a state other than "connected" for this amount of time, Jibri will stop.
ice-connection-timeout = 30 seconds
}
}