MCPcopy
hub / github.com/AlexxIT/go2rtc

github.com/AlexxIT/go2rtc @v1.9.14 sqlite

repository ↗ · DeepWiki ↗ · release v1.9.14 ↗
2,621 symbols 9,115 edges 417 files 209 documented · 8%
README

![go2rtc](assets/logo.gif) [![stars](https://img.shields.io/github/stars/AlexxIT/go2rtc?style=flat-square&logo=github)](https://github.com/AlexxIT/go2rtc/stargazers) [![docker pulls](https://img.shields.io/docker/pulls/alexxit/go2rtc?style=flat-square&logo=docker&logoColor=white&label=pulls)](https://hub.docker.com/r/alexxit/go2rtc) [![releases](https://img.shields.io/github/downloads/AlexxIT/go2rtc/total?color=blue&style=flat-square&logo=github)](https://github.com/AlexxIT/go2rtc/releases) [![goreport](https://goreportcard.com/badge/github.com/AlexxIT/go2rtc)](https://goreportcard.com/report/github.com/AlexxIT/go2rtc)

Ultimate camera streaming application with support for RTSP, WebRTC, HomeKit, FFmpeg, RTMP, etc.

Supported Formats - describes the communication API: authorization, encryption, command set, structure of media packets

  • devices: alsa (Linux audio), v4l2 (Linux video)
  • files: adts, flv, h264, hevc, hls, mjpeg, mpegts, mp4, wav
  • network (public and well known): mpjpeg, onvif, rtmp, rtp, rtsp, webrtc, yuv4mpegpipe
  • network (private and exclusive): bubble, doorbird, dvrip, eseecloud, gopro, hass (Home Assistant), homekit (Apple), isapi (Hikvision), kasa (TP-Link), multitrans (TP-Link), nest (Google), ring, roborock, tapo and vigi (TP-Link), tuya, webtorrent, wyze, xiaomi (Mi Home)
  • webrtc related: creality, kinesis (Amazon), openipc, switchbot, whep, whip, wyze
  • other: ascii, echo, exec, expr, ffmpeg

Supported Protocols - describes the transport for data transmission

  • public: http, pipe, rtmp, rtsp, tcp, udp, webrtc, ws (WebSocket)
  • private: cs2 (PPPP), hap and hds (HomeKit), tutk (P2P)

Inspired by:

[!CAUTION] The official website of the project is this GitHub repository and go2rtc.org (hosted on GitHub Pages). The website go2rtc[.]com is in no way associated with the authors of this project.


Fast start

  1. Download binary or use Docker or Home Assistant Add-on or Integration
  2. Open web interface: http://localhost:1984/

Optionally:

Developers:

go2rtc: Binary

Download binary for your OS from latest release:

  • go2rtc_win64.zip - Windows 10+ 64-bit
  • go2rtc_win32.zip - Windows 10+ 32-bit
  • go2rtc_win_arm64.zip - Windows ARM 64-bit
  • go2rtc_linux_amd64 - Linux 64-bit
  • go2rtc_linux_i386 - Linux 32-bit
  • go2rtc_linux_arm64 - Linux ARM 64-bit (ex. Raspberry 64-bit OS)
  • go2rtc_linux_arm - Linux ARM 32-bit (ex. Raspberry 32-bit OS)
  • go2rtc_linux_armv6 - Linux ARMv6 (for old Raspberry 1 and Zero)
  • go2rtc_linux_mipsel - Linux MIPS (ex. Xiaomi Gateway 3, Wyze cameras)
  • go2rtc_mac_amd64.zip - macOS 11+ Intel 64-bit
  • go2rtc_mac_arm64.zip - macOS ARM 64-bit
  • go2rtc_freebsd_amd64.zip - FreeBSD 64-bit
  • go2rtc_freebsd_arm64.zip - FreeBSD ARM 64-bit

Don't forget to fix the rights chmod +x go2rtc_xxx_xxx on Linux and Mac.

PS. The application is compiled with the latest versions of the Go language for maximum speed and security. Therefore, the minimum OS versions depend on the Go language.

go2rtc: Docker

The Docker container alexxit/go2rtc supports multiple architectures including amd64, 386, arm64, and arm. This container offers the same functionality as the Home Assistant Add-on but is designed to operate independently of Home Assistant. It comes preinstalled with FFmpeg and Python.

go2rtc: Home Assistant Add-on

  1. Install Add-On:
    • Settings > Add-ons > Plus > Repositories > Add https://github.com/AlexxIT/hassio-addons
    • go2rtc > Install > Start
  2. Setup Integration

go2rtc: Home Assistant Integration

WebRTC Camera custom component can be used on any Home Assistant installation, including HassWP on Windows. It can automatically download and use the latest version of go2rtc. Or it can connect to an existing version of go2rtc. Addon installation in this case is optional.

go2rtc: Dev version

Latest, but maybe unstable version:

  • Binary: latest nightly release
  • Docker: alexxit/go2rtc:master or alexxit/go2rtc:master-hardware versions
  • Hass Add-on: go2rtc master or go2rtc master hardware versions

Configuration

  • by default go2rtc will search go2rtc.yaml in the current work directory
  • api server will start on default 1984 port (TCP)
  • rtsp server will start on default 8554 port (TCP)
  • webrtc will use port 8555 (TCP/UDP) for connections
  • ffmpeg will use default transcoding options

Configuration options and a complete list of settings can be found in the wiki.

Available modules:

  • streams
  • api - HTTP API (important for WebRTC support)
  • rtsp - RTSP Server (important for FFmpeg support)
  • webrtc - WebRTC Server
  • mp4 - MSE, MP4 stream and MP4 snapshot Server
  • hls - HLS TS or fMP4 stream Server
  • mjpeg - MJPEG Server
  • ffmpeg - FFmpeg integration
  • ngrok - ngrok integration (external access for private network)
  • hass - Home Assistant integration
  • log - logs config

Module: Streams

go2rtc supports different stream source types. You can config one or multiple links of any type as a stream source.

Available source types:

Read more about incoming sources

Two-way audio

Supported sources:

Two-way audio can be used in browser with WebRTC technology. The browser will give access to the microphone only for HTTPS sites (read more).

go2rtc also supports play audio files and live streams on this cameras.

Source: RTSP

```yaml streams: sonoff_camera: rtsp://rtsp:12345678@192.168.1.123/av_stream/ch0 dahua_camera: - rtsp://admin:password@192.168.1.123/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif - rtsp://admin:password@192.168.1.123/cam/realmonitor?channel=1&subtype=1#backchannel=0 amcrest_doorbell: - rtsp://username:password@192.168.1.1

Extension points exported contracts — how you extend this code

Producer (Interface)
(no doc) [11 implementers]
pkg/core/core.go
Redirect (FuncType)
Redirect can return: location URL or error or empty URL and error
internal/streams/handlers.go
ServerPair (Interface)
(no doc) [1 implementers]
pkg/homekit/server.go
Session (Interface)
(no doc) [1 implementers]
pkg/tutk/session16.go
Storage (Interface)
(no doc) [1 implementers]
pkg/creds/creds.go
Conn (Interface)
(no doc)
pkg/xiaomi/miss/client.go
TuyaAPI (Interface)
(no doc)
pkg/tuya/interface.go
Handler (FuncType)
(no doc)
internal/rtsp/rtsp.go

Core symbols most depended-on inside this repo

Error
called by 287
pkg/tutk/conn.go
Get
called by 251
pkg/yandex/session.go
Equal
called by 152
pkg/core/media.go
Close
called by 128
pkg/tutk/session16.go
Unmarshal
called by 102
internal/api/ws/ws.go
Skip
called by 101
pkg/iso/iso.go
Set
called by 88
pkg/hap/character.go
Set
called by 88
internal/app/config.go

Shape

Method 1,178
Function 984
Struct 422
Interface 14
TypeAlias 10
FuncType 9
Class 4

Languages

Go99%
TypeScript1%

Modules by API surface

pkg/tutk/dtls/conn_dtls.go39 symbols
pkg/tuya/smart_api.go36 symbols
pkg/wyze/client.go35 symbols
pkg/tuya/mqtt.go32 symbols
pkg/tuya/interface.go31 symbols
pkg/xiaomi/miss/cs2/conn.go28 symbols
pkg/tutk/session16.go27 symbols
pkg/ring/api.go27 symbols
pkg/xiaomi/miss/client.go26 symbols
pkg/tutk/frame.go26 symbols
pkg/xiaomi/cloud.go23 symbols
pkg/mpegts/demuxer.go23 symbols

Dependencies from manifests, versioned

github.com/Pinggy-io/pinggy-go/pinggyv0.6.9 · 1×
github.com/asticode/go-astikitv0.57.1 · 1×
github.com/asticode/go-astitsv1.14.0 · 1×
github.com/davecgh/go-spewv1.1.1 · 1×
github.com/eclipse/paho.mqtt.golangv1.5.1 · 1×
github.com/kr/prettyv0.3.1 · 1×
github.com/mattn/go-colorablev0.1.14 · 1×
github.com/mattn/go-isattyv0.0.20 · 1×
github.com/miekg/dnsv1.1.70 · 1×

For agents

$ claude mcp add go2rtc \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact