From 5c30baa11e1599a1b65233dd3cc8e0fc58d595a6 Mon Sep 17 00:00:00 2001 From: Jake Daynes Date: Fri, 13 Mar 2026 02:01:45 -0700 Subject: [PATCH] update m3u RTSP URL formatter to handle scheme --- internal/output/m3u.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/output/m3u.go b/internal/output/m3u.go index cb4f616..7f7e881 100644 --- a/internal/output/m3u.go +++ b/internal/output/m3u.go @@ -119,5 +119,10 @@ func formatRTSPURL(stream cameradar.Stream) string { credentials = stream.Username + ":" + stream.Password + "@" } - return "rtsp://" + credentials + stream.Address.String() + ":" + strconv.FormatUint(uint64(stream.Port), 10) + path + scheme := "rtsp" + if stream.Secure { + scheme = "rtsps" + } + + return fmt.Sprintf("%s://%s%s:%s%s", scheme, credentials, stream.Address.String(), strconv.FormatUint(uint64(stream.Port), 10), path) }