created mediamtx server for audio streams
This commit is contained in:
63
mediamtx/mediamtx.yml
Normal file
63
mediamtx/mediamtx.yml
Normal file
@@ -0,0 +1,63 @@
|
||||
logLevel: info
|
||||
|
||||
# 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
|
||||
webrtcLocalUDPAddress: :8189
|
||||
# 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
|
||||
|
||||
# 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\"}"'
|
||||
|
||||
# Allow all paths by default
|
||||
paths:
|
||||
all:
|
||||
source: publisher
|
||||
Reference in New Issue
Block a user