Merge pull request #1992 from FIGIO55/rtsp_onvif_params

Allow rtsp params (like #backchannel=0) from onvif sources
This commit is contained in:
Alex X
2025-12-26 23:06:30 +03:00
committed by GitHub
+6
View File
@@ -7,6 +7,7 @@ import (
"net/url"
"os"
"strconv"
"strings"
"time"
"github.com/AlexxIT/go2rtc/internal/api"
@@ -43,6 +44,11 @@ func streamOnvif(rawURL string) (core.Producer, error) {
return nil, err
}
// Append hash-based arguments to the retrieved URI
if i := strings.IndexByte(rawURL, '#'); i > 0 {
uri += rawURL[i:]
}
log.Debug().Msgf("[onvif] new uri=%s", uri)
if err = streams.Validate(uri); err != nil {