Skip to content

rtsp: stabilize local consumer output and honor URL query#2153

Open
joeblack2k wants to merge 2 commits intoAlexxIT:masterfrom
joeblack2k:codex/upstream-rtsp-stability
Open

rtsp: stabilize local consumer output and honor URL query#2153
joeblack2k wants to merge 2 commits intoAlexxIT:masterfrom
joeblack2k:codex/upstream-rtsp-stability

Conversation

@joeblack2k
Copy link
Copy Markdown

@joeblack2k joeblack2k commented Mar 13, 2026

Summary

  • honor URL query parameters in the RTSP path and stop shell child processes cleanly
  • default loopback RTSP consumers to repack output when no explicit repack query is provided
  • keep explicit repack=on/off override behavior for callers that need to opt in or out
  • add tests for the new default and override behavior

Why

This branch now contains the prerequisite RTSP query/repack plumbing plus the local-consumer stability fix.

In production, local RTSP self-hops like thingino_voorkant_raw -> thingino_voorkant_main were exposing upstream RTP sequence and timestamp jumps to local consumers. In Frigate this showed up as repeated bad cseq, Could not find codec parameters, and Unable to read frames errors.

With ?repack=1 the same stream stayed stable, so the follow-up fix makes that behavior the default for loopback consumers while leaving remote clients unchanged unless they explicitly request repack.

Validation

  • /root/.local/go/bin/go -C /root/work/go2rtc test ./internal/rtsp ./pkg/rtsp
  • built and deployed a local binary on the Frigate LXC
  • verified ffmpeg on rtsp://127.0.0.1:8554/thingino_voorkant_raw no longer reports bad cseq
  • verified fresh Frigate voorkant startup no longer reproduced the old bad cseq / Could not find codec parameters / Unable to read frames failure pattern
  • observed a successful post-fix Scrypted/HomeKit Voorkant connection without Unable to find sync frame in rtsp prebuffer

@joeblack2k joeblack2k changed the title rtsp/shell: honor URL query and stop child processes rtsp: stabilize local consumer output and honor URL query Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant