Project Icon

go2rtc

开源多协议摄像头流媒体传输应用

go2rtc是一个开源的摄像头流媒体应用,支持RTSP、WebRTC、HomeKit等多种协议。它具有低延迟、无依赖的特点,可从RTSP、RTMP、HTTP等多种源接收流媒体,并支持转码和双向音频。该应用兼容Windows、macOS、Linux等系统,可集成到智能家居平台,为视频流传输提供灵活解决方案。

go2rtc
stars docker pulls releases goreport

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

Inspired by:


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 64-bit
  • go2rtc_win32.zip - Windows 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 - Mac Intel 64-bit
  • go2rtc_mac_arm64.zip - Mac ARM 64-bit

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

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, ngrok, 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 shapshot 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 support different stream source types. You can config one or multiple links of any type as stream source.

Available source types:

  • rtsp - RTSP and RTSPS cameras with two way audio support
  • rtmp - RTMP streams
  • http - HTTP-FLV, MPEG-TS, JPEG (snapshots), MJPEG streams
  • onvif - get camera RTSP link and snapshot link using ONVIF protocol
  • ffmpeg - FFmpeg integration (HLS, files and many others)
  • ffmpeg:device - local USB Camera or Webcam
  • exec - get media from external app output
  • echo - get stream link from bash or python
  • expr - get stream link via built-in expression language
  • homekit - streaming from HomeKit Camera
  • bubble - streaming from ESeeCloud/dvr163 NVR
  • dvrip - streaming from DVR-IP NVR
  • tapo - TP-Link Tapo cameras with two way audio support
  • kasa - TP-Link Kasa cameras
  • gopro - GoPro cameras
  • ivideon - public cameras from Ivideon service
  • hass - Home Assistant integration
  • isapi - two way audio for Hikvision (ISAPI) cameras
  • roborock - Roborock vacuums with cameras
  • webrtc - WebRTC/WHEP sources
  • webtorrent - WebTorrent source from another go2rtc

Read more about incoming sources

Two way audio

Supported for 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 support play audio files and live streams on this cameras.

Source: RTSP

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
  amcrest_doorbell:
    - rtsp://username:password@192.168.1.123:554/cam/realmonitor?channel=1&subtype=0#backchannel=0
  unifi_camera: rtspx://192.168.1.123:7441/fD6ouM72bWoFijxK
  glichy_camera: ffmpeg:rtsp://username:password@192.168.1.123/live/ch00_1 

Recommendations

  • Amcrest Doorbell users may want to disable two way audio, because with an active stream you won't have a call button working. You need to add #backchannel=0 to the end of your RTSP link in YAML config file
  • Dahua Doorbell users may want to change backchannel audio codec
  • Reolink users may want NOT to use RTSP protocol at all, some camera models have a very awful unusable stream implementation
  • Ubiquiti UniFi users may want to disable HTTPS verification. Use rtspx:// prefix instead of rtsps://. And don't use ?enableSrtp suffix
  • TP-Link Tapo users may skip login and password, because go2rtc support login without them
  • If your camera has two RTSP links - you can add both of them as sources. This is useful when streams has different codecs, as example AAC audio with main stream and PCMU/PCMA audio with second stream
  • If the stream from your camera is glitchy, try using ffmpeg source. It will not add CPU load if you won't use transcoding
  • If the stream from your camera is very
项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

问小白

问小白是一个基于 DeepSeek R1 模型的智能对话平台,专为用户提供高效、贴心的对话体验。实时在线,支持深度思考和联网搜索。免费不限次数,帮用户写作、创作、分析和规划,各种任务随时完成!

Project Cover

白日梦AI

白日梦AI提供专注于AI视频生成的多样化功能,包括文生视频、动态画面和形象生成等,帮助用户快速上手,创造专业级内容。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

讯飞绘镜

讯飞绘镜是一个支持从创意到完整视频创作的智能平台,用户可以快速生成视频素材并创作独特的音乐视频和故事。平台提供多样化的主题和精选作品,帮助用户探索创意灵感。

Project Cover

讯飞文书

讯飞文书依托讯飞星火大模型,为文书写作者提供从素材筹备到稿件撰写及审稿的全程支持。通过录音智记和以稿写稿等功能,满足事务性工作的高频需求,帮助撰稿人节省精力,提高效率,优化工作与生活。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

Trae

Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号