AlexxIT/go2rtc · error
unsupported scheme
Error message
unsupported scheme: ${u.Scheme} What it means
tcp.Dial scheme guard: the URL scheme is not one of rtsp/rtsps/rtspx/rtmp/rtmps/rtmpx handled by this dialer (offending scheme appended). Only RTSP and RTMP families over TCP/TLS are supported here; anything else is refused before any connection attempt.
Solutions
- Fix the URL scheme typo (rstp->rtsp, rtsp+s variants)
- Use the proper dialer for other protocols (udp, srt, etc.)
- For secure variants use rtsps/rtmps; 'x' suffix forces InsecureSkipVerify
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/tcp/dial.go:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/834a76785681541b.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/tcp/dial.go:42
address = u.Host + ":1935"
case "rtmps", "rtmpx":
address = u.Host + ":443"
}
hostname = u.Host
}
var secure *tls.Config
switch u.Scheme {
case "rtsp", "rtmp":
case "rtsps", "rtspx", "rtmps", "rtmpx":
if u.Scheme[4] == 'x' || IsIP(hostname) {
secure = &tls.Config{InsecureSkipVerify: true}
} else {
secure = &tls.Config{ServerName: hostname}
}
default:
return nil, errors.New("unsupported scheme: " + u.Scheme)
}
conn, err := net.DialTimeout("tcp", address, timeout)
if err != nil {
return nil, err
}
if secure == nil {
return conn, nil
}
tlsConn := tls.Client(conn, secure)
if err = tlsConn.Handshake(); err != nil {
return nil, err
}
if u.Scheme[4] == 'x' {
u.Scheme = u.Scheme[:4] + "s"View on GitHub (pinned to c245815e75)