83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
# logLevel: info
|
|
|
|
logLevel: debug
|
|
|
|
# Enable Control API (useful for debugging; bound to localhost by default)
|
|
api: yes
|
|
apiAddress: :9997
|
|
|
|
# RTSP / RTMP / HLS
|
|
rtsp: yes
|
|
rtspAddress: :8554
|
|
rtmp: yes
|
|
rtmpAddress: :1935
|
|
hls: yes
|
|
hlsAddress: :8888
|
|
hlsVariant: lowLatency
|
|
|
|
# WebRTC (browser-friendly)
|
|
webrtc: yes
|
|
webrtcAddress: :8889
|
|
# whip: yes
|
|
webrtcLocalUDPAddress: :8189
|
|
webrtcIPsFromInterfaces: yes
|
|
webrtcIPsFromInterfacesList: []
|
|
webrtcAdditionalHosts:
|
|
- 192.168.205.130
|
|
# Optional: add a STUN server if behind NAT
|
|
# webrtcICEServers2:
|
|
# - url: stun:stun.l.google.com:19302
|
|
|
|
# SRT (for resilient ingest)
|
|
srt: yes
|
|
srtAddress: :8890
|
|
|
|
authMethod: http
|
|
authHTTPAddress: http://snoop-api:8080/mediamtx/auth
|
|
authHTTPExclude:
|
|
- action: api
|
|
- action: metrics
|
|
- action: pprof
|
|
|
|
# Recording (optional)
|
|
pathDefaults:
|
|
# record settings (per concurrent path/stream)
|
|
record: yes
|
|
recordFormat: fmp4
|
|
recordPath: /recordings/%path/%Y-%m-%d_%H-%M-%S-%f
|
|
recordSegmentDuration: 10m
|
|
recordDeleteAfter: 7d
|
|
|
|
# upload each completed segment to MinIO under:
|
|
# livestream/<device-guid>/<filename>
|
|
# runOnRecordSegmentComplete: >
|
|
# sh -c 'd="$(dirname "$MTX_SEGMENT_PATH")";
|
|
# f="$(basename "$MTX_SEGMENT_PATH")";
|
|
# curl -s -H "Content-Type: application/json"
|
|
# -X POST "http://rclone:5572/operations/copyfile?_async=true"
|
|
# -d "{\"srcFs\":\"$d\",\"srcRemote\":\"$f\",
|
|
# \"dstFs\":\"minio:livestream\",
|
|
# \"dstRemote\":\"$MTX_PATH/$f\"}"'
|
|
|
|
runOnRecordSegmentCreate: >
|
|
sh -c 'd="$(dirname "$MTX_SEGMENT_PATH")";
|
|
f="$(basename "$MTX_SEGMENT_PATH")";
|
|
curl -s -H "Content-Type: application/json"
|
|
-X POST "http://rclone:5572/operations/copyfile?_async=true"
|
|
-d "{\"srcFs\":\"$d\",\"srcRemote\":\"$f\",
|
|
\"dstFs\":\"minio:livestream\",
|
|
\"dstRemote\":\"$MTX_PATH/$f\"}"'
|
|
|
|
authInternalUsers:
|
|
- user: any
|
|
pass:
|
|
ips: ['127.0.0.1','::1']
|
|
permissions:
|
|
- action: api
|
|
- action: metrics
|
|
- action: pprof
|
|
|
|
# Allow all paths by default
|
|
paths:
|
|
all:
|
|
source: publisher |