talira

Ultimate camera streaming application with support for dozens formats and protocols

open sourceMITself-hostablefree

go2rtc is a small, zero-dependency camera streaming app written in Go that takes video and audio from IP cameras and other sources and serves it again with the lowest possible latency in whatever format a client needs: WebRTC, MSE/MP4, HLS, MJPEG, RTSP, RTMP, HomeKit, ONVIF and more. Besides RTSP, RTMP, ONVIF, WebRTC and HTTP streams, it reads cameras through their own protocols (TP-Link Tapo and Kasa, Xiaomi, Wyze, Tuya, Ring, Nest, DoorBird, Hikvision ISAPI, GoPro, Roborock), Linux video and audio devices, and anything FFmpeg or a script can produce. It negotiates codecs between all of a stream's sources and each browser, supports two-way audio to camera speakers, publishes streams to services such as YouTube and Telegram, and only transcodes, through FFmpeg with hardware acceleration, when a client needs it. It has a web UI with a config editor and connection stats, an HTTP and WebSocket API, and runs as a binary, a Docker image or a Home Assistant add-on; Home Assistant (2024.11 and later) and Frigate (0.12 and later) build on it. It is MIT licensed and made by AlexxIT.

Ways to install

Problems it solves

  • my security cameras lag by 10 seconds in Home Assistant and I want a near-instant live view
  • my cheap camera allows only one RTSP connection but my NVR, Home Assistant and phone all need the stream
  • get a Tapo, Xiaomi or Wyze camera's video into my NVR when it doesn't offer a normal RTSP stream
  • add my IP cameras to Apple Home through HomeKit even though they don't support it
  • talk through my doorbell or camera speaker from a browser
  • watch H.265 camera footage in Chrome or Safari without transcoding it first
  • a self-hosted low-latency WebRTC camera viewer that doesn't need a vendor cloud account
  • get a JPEG snapshot URL from a camera stream for my notifications
  • my camera's G.711 audio won't play in the browser
  • stream my Ring or Nest cameras into other software on my own network
  • share a USB webcam on a Raspberry Pi with the rest of my network as an RTSP stream
  • make a camera that has no ONVIF show up as an ONVIF camera for my recorder
  • publish my camera's live stream to YouTube or a Telegram channel
  • play an announcement or an alarm sound through my camera's speaker
  • watch my home cameras on my phone outside the house with WebRTC

View all 19 problems

Features

  • inputs: RTSP, RTMP, ONVIF, WebRTC (including WHEP), MJPEG, HTTP files (FLV, H264, HEVC, HLS, MPEG-TS, ADTS, WAV)
  • camera protocols: TP-Link Tapo, Kasa and Vigi, Xiaomi, Wyze, Tuya, Ring, Nest, DoorBird, Hikvision ISAPI, DVR-IP, GoPro, Roborock
  • WebRTC camera sources: Creality printers, Amazon Kinesis, OpenIPC, SwitchBot
  • Linux devices through ALSA and V4L2, and FFmpeg, exec, echo and expr sources
  • outputs: WebRTC, MSE/MP4, HLS, MJPEG, JPEG snapshots, RTSP, RTMP, FLV, MPEG-TS, HomeKit, ONVIF, WebTorrent
  • streaming ingest over RTSP, RTMP, FLV, MJPEG, MPEG-TS and WebRTC
  • multi-source two-way codec negotiation that picks codecs each browser supports
  • codec filters in stream links (for example MP4-compatible codecs for recording in Home Assistant or Frigate)
  • two-way audio to camera speakers, and playing files or live audio on cameras
  • on-the-fly transcoding through FFmpeg with hardware acceleration, only when needed
View 8 more
  • automatic repackaging of PCMA, PCMU and PCM audio to FLAC for MSE, MP4 and HLS
  • publishing streams to YouTube, Telegram and other services over RTMP/RTMPS
  • preloading streams at startup for cameras that are slow to start
  • web UI with a config editor and stats for every connection
  • HTTP API described in OpenAPI, and a WebSocket API
  • basic auth, TLS, allowed module and API path lists, and exec allow lists
  • binaries for Windows, macOS, Linux (including ARM and MIPS) and FreeBSD, and multi-arch Docker images with FFmpeg
  • Home Assistant add-on, and use from Home Assistant's WebRTC Camera custom component

Limitations

  • No built-in video transcoding: go2rtc hands codec conversion to FFmpeg, apart from a few automatic audio conversions3

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what go2rtc does.

  1. Scrypted High performance home video integration platform and NVR with smart detections
  2. MediaMTX Ready-to-use, open source, live media router
  3. Strix Find an IP camera's stream URLs and generate a Frigate config

Compare go2rtc with the top 3