{{- define "rtsp.config.zlm" -}}
[api]
apiDebug=1
defaultSnap=./www/logo.png
secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
snapRoot=./www/snap/

[ffmpeg]
bin=/usr/local/bin/ffmpeg
cmd=%s -i %s -vcodec copy -acodec copy -f flv %s
log=./ffmpeg/ffmpeg.log
snap=%s -i %s -y -f mjpeg -t 0.001 %s

[general]
addMuteAudio=1
enableVhost=0
enable_audio=1
flowThreshold=1024
fmp4_demand=1
hls_demand=0
maxStreamWaitMS=15000
mediaServerId=YAn4fBK6899l3zRG
mergeWriteMS=0
modifyStamp=1
publishToHls=0
publishToMP4=0
resetWhenRePlay=1
rtmp_demand=0
rtsp_demand=0
streamNoneReaderDelayMS=20000
ts_demand=1

[hls]
broadcastRecordTs=0
deleteDelaySec=0
fileBufSize=65536
filePath=./www
segDur=2
segNum=3
segRetain=5

[hook]
admin_params=secret=035c73f7-bb6b-4889-a715-d9eb2d1925cc
enable=1
on_flow_report=
on_http_access=
on_play=
on_publish=http://127.0.0.1:80/index/hook/on_publish
on_record_mp4=
on_record_ts=
on_rtsp_auth=
on_rtsp_realm=
on_server_started=
on_shell_login=
on_stream_changed=
on_stream_none_reader=
on_stream_not_found=
timeoutSec=10

[http]
charSet=utf-8
dirMenu=1
keepAliveSecond=15
maxReqSize=40960
notFound=<html><head><title>404 Not Found</title></head><body><h1>404 Not Found</h1></body></html>
port=80
rootPath=./www
sendBufSize=65536
sslport=443

[multicast]
addrMax=239.255.255.255
addrMin=239.0.0.0
udpTTL=64

[record]
appName=record
fastStart=0
fileBufSize=65536
filePath=./www
fileRepeat=0
fileSecond=3600
sampleMS=500

[rtmp]
handshakeSecond=15
keepAliveSecond=15
modifyStamp=1
port=1935
sslport=19350

[rtp]
audioMtuSize=600
videoMtuSize=1400

[rtp_proxy]
dumpDir=
port={{ .Values.apps.rtsp.ports.rtp }}
timeoutSec=15

[rtsp]
authBasic=0
directProxy=1
handshakeSecond=15
keepAliveSecond=15
port={{ .Values.apps.rtsp.ports.rtsp }}
sslport=332

[shell]
maxReqSize=1024
port=9000
{{- end -}}

{{- define "rtsp.config.op" -}}
zlm:
  zlm_ip: 'rtsp-zlm-expose'
  zlm_rtsp_port: {{ .Values.apps.rtsp.ports.rtsp }}
  zlm_http_port: 80
  zlm_secret: '035c73f7-bb6b-4889-a715-d9eb2d1925cc'
srs:
  srs_ip: '{{ .Values.deploy.name }}-op-svc'
  srs_port: 8080
  srs_protocal: 'http'
time_gap: 10
verbose: false
{{- end -}}
