explaingit

alexxit/go2rtc

12,978GoAudience · ops devopsComplexity · 2/5Setup · easy

TLDR

go2rtc is a camera streaming hub that connects nearly any video source to any viewer with minimal delay, a single small program that runs on Windows, Mac, Linux, and Raspberry Pi with no complex setup.

Mindmap

mindmap
  root((go2rtc))
    What it does
      Stream any camera
      Format conversion
      Low latency
    Inputs
      RTSP RTMP
      HTTP streams
      WebRTC
    Outputs
      HLS
      WebRTC browser
      YouTube Telegram
    Runs on
      Windows Mac Linux
      Raspberry Pi
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Connect IP cameras or RTSP streams to a browser-based viewer over WebRTC with no plugin and no server-side transcoding needed.

USE CASE 2

Integrate camera streams into Home Assistant as the streaming backend, enabling low-latency viewing in the home automation dashboard.

USE CASE 3

Push a local camera feed to YouTube Live or Telegram by adding an outbound stream destination in the go2rtc config.

Tech stack

GoFFmpegWebRTCRTSPRTMPHLS

Getting it running

Difficulty · easy Time to first run · 5min

Ships as a single binary with no runtime dependencies, FFmpeg is only needed if codec conversion between formats is required.

In plain English

go2rtc is a camera streaming tool that lets you connect almost any video source to almost any viewer, without delay. It runs as a single small program on Windows, macOS, Linux, FreeBSD, and ARM devices such as a Raspberry Pi, so there is nothing complicated to install or maintain. The way it works: you give it one or more camera sources, and it makes those streams available in whatever format a viewer requests. It supports a wide range of input protocols (RTSP, RTMP, HTTP streams, WebRTC, and more) and can output in formats like HLS for web players, WebRTC for browser-based viewing, and others. If the camera codec does not match what a viewer can handle, it will use FFmpeg to convert on the fly, but only when needed, which keeps latency low. A few notable capabilities stand out: two-way audio (so you can speak through cameras that support it), the ability to push streams out to services like YouTube or Telegram, mixing tracks from different camera sources into one combined stream, and a built-in web interface at localhost:1984 for managing everything. It integrates particularly well with Home Assistant, the home automation platform. There is a dedicated add-on for Home Assistant users, and the project is listed as a dependency of Home Assistant own camera streaming features. The project is written in Go and has no external dependencies at runtime. It is available as a standalone binary for all major platforms, with versions for 32-bit and 64-bit Windows, Intel and ARM Mac, standard and ARM Linux, and FreeBSD. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
I have an IP camera with an RTSP stream and I want to view it in a browser tab. Help me write a go2rtc config to expose it over WebRTC.
Prompt 2
I want go2rtc to push my camera stream to YouTube Live automatically on startup. Walk me through the config needed to set that up.
Prompt 3
My go2rtc instance is running on a Raspberry Pi but the stream has noticeable latency. Help me figure out what is causing the delay and how to reduce it.
Prompt 4
I want to combine video from two separate cameras into one merged stream using go2rtc. How do I configure that?
Prompt 5
Help me write a go2rtc config for a Home Assistant setup with three RTSP cameras, enabling WebRTC viewing directly in the dashboard.
Open on GitHub → Explain another repo

← alexxit on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.