AlexxIT/go2rtc · error

streams: source not supported

Error message

streams: source not supported

What it means

Stream construction (New) rejects a source when HasProducer reports no producer available for its scheme — no handler is registered for that URL type. Unlike the handlers.go error, this is the streams-level gate: New validates every source up front and refuses to create the stream if any source cannot be produced.

Solutions

  1. Verify each source URL scheme is spelled correctly and is supported
  2. Import/register the producer module for that scheme
  3. Remove the unsupported source from the New(...) arguments
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at internal/streams/streams.go:56 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/214bfd4a432b1312. Report an issue: GitHub.

Appendix: source

Thrown at internal/streams/streams.go:56

	time.AfterFunc(time.Second, func() {
		// range for nil map is OK
		for name, dst := range cfg.Publish {
			if stream := Get(name); stream != nil {
				Publish(stream, dst)
			}
		}
		for name, rawQuery := range cfg.Preload {
			if err := AddPreload(name, rawQuery); err != nil {
				log.Error().Err(err).Caller().Send()
			}
		}
	})
}

func New(name string, sources ...string) (*Stream, error) {
	for _, source := range sources {
		if !HasProducer(source) {
			return nil, errors.New("streams: source not supported")
		}

		if err := Validate(source); err != nil {
			return nil, err
		}
	}

	stream := NewStream(sources)

	streamsMu.Lock()
	streams[name] = stream
	streamsMu.Unlock()

	return stream, nil
}

func Patch(name string, source string) (*Stream, error) {
	streamsMu.Lock()

View on GitHub (pinned to c245815e75)