Skip to content

Conversation

@matteius
Copy link
Contributor

  • Update Dockerfile to build go2rtc from source using opensensor/go2rtc fork instead of downloading pre-built AlexxIT/go2rtc releases
  • Uses fix/memory-leaks branch which includes:
    • HLS session limits (100 max) and buffer size limits (16MB)
    • WriteBuffer size limits (8MB) to prevent unbounded growth
    • sync.Pool for RTSP UDP buffers to reduce allocations
  • Update install_go2rtc.sh to default to opensensor/go2rtc releases with fallback to AlexxIT/go2rtc if no releases are available

These changes address go2rtc memory growth from ~150MB to 7GB+ over 2.5 days of continuous operation (96% memory reduction with the fixes).

- Update Dockerfile to build go2rtc from source using opensensor/go2rtc fork
  instead of downloading pre-built AlexxIT/go2rtc releases
- Uses fix/memory-leaks branch which includes:
  - HLS session limits (100 max) and buffer size limits (16MB)
  - WriteBuffer size limits (8MB) to prevent unbounded growth
  - sync.Pool for RTSP UDP buffers to reduce allocations
- Update install_go2rtc.sh to default to opensensor/go2rtc releases
  with fallback to AlexxIT/go2rtc if no releases are available

These changes address go2rtc memory growth from ~150MB to 7GB+ over 2.5 days
of continuous operation (96% memory reduction with the fixes).
@matteius matteius merged commit f5ebb99 into main Dec 13, 2025
2 of 3 checks passed
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.

2 participants