Scripts2026年7月21日·1 分钟阅读

go2rtc — Ultimate Streaming Engine for Cameras and WebRTC

go2rtc is a high-performance streaming server written in Go that bridges IP cameras, RTSP, WebRTC, HomeKit, and dozens of other protocols into a unified low-latency pipeline for smart home and surveillance systems.

Agent 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
go2rtc
先审查命令
npx -y tokrepo@latest install b612ce81-849d-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

Introduction

go2rtc solves the fragmentation problem in video streaming by acting as a universal protocol bridge. It accepts streams from virtually any camera or source and re-streams them over WebRTC, MSE, HLS, RTSP, or HomeKit with minimal latency and zero transcoding when possible.

What go2rtc Does

  • Connects to IP cameras via RTSP, RTMP, HTTP-FLV, and proprietary protocols
  • Re-streams video over WebRTC, MSE, HLS, RTSP, and HomeKit without mandatory transcoding
  • Provides two-way audio support for intercom-capable cameras
  • Integrates with Home Assistant, Frigate, Scrypted, and other smart home platforms
  • Supports hardware-accelerated transcoding via FFmpeg when codec conversion is needed

Architecture Overview

go2rtc runs as a single Go binary with a built-in web UI on port 1984. It maintains persistent connections to configured camera streams and creates on-demand output sessions when clients connect. The core uses a codec negotiation layer that passes through compatible streams directly (zero-copy) and only invokes FFmpeg for transcoding when the source and client codecs differ. A WebRTC signaling server is embedded for browser-based low-latency viewing.

Self-Hosting & Configuration

  • Download a single binary or run via Docker with alexxit/go2rtc
  • Define camera streams in go2rtc.yaml with source URLs and optional credentials
  • Configure WebRTC candidates for external access through NAT or reverse proxy
  • Enable hardware transcoding by setting the ffmpeg binary path and codec options
  • Integrate with Home Assistant by adding go2rtc as a custom component or add-on

Key Features

  • Zero-latency codec passthrough avoids transcoding when source and viewer support the same codec
  • Multi-protocol output lets a single source feed WebRTC, HLS, RTSP, and HomeKit simultaneously
  • Two-way audio enables intercom functionality through the browser or HomeKit
  • Built-in web UI for monitoring streams, viewing live video, and testing configurations
  • Automatic stream reconnection with configurable retry logic for unreliable cameras

Comparison with Similar Tools

  • Frigate — focuses on NVR with object detection; go2rtc handles the streaming layer that Frigate itself uses internally
  • MediaMTX (rtsp-simple-server) — RTSP-focused proxy; go2rtc adds WebRTC, HomeKit, and two-way audio support
  • Shinobi — full NVR with recording and motion detection; go2rtc is a lightweight streaming proxy without storage
  • ZoneMinder — traditional NVR software; go2rtc focuses purely on low-latency streaming and protocol bridging

FAQ

Q: Does go2rtc record video? A: No. go2rtc is a streaming proxy. Use Frigate, Home Assistant, or another NVR for recording.

Q: Which cameras are supported? A: Any camera with RTSP, RTMP, or HTTP-FLV output. ONVIF discovery is also supported.

Q: Can I view streams in a browser without plugins? A: Yes. WebRTC and MSE provide sub-second latency playback directly in modern browsers.

Q: How does it integrate with Home Assistant? A: go2rtc runs as an add-on or standalone service, and Home Assistant uses it for camera stream proxying.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产