home-assistant.io/source/_integrations/rtsp_to_webrtc.markdown
Mark Breen 45eef213f1
Few changes from javascript to JavaScript (#24884)
* change javascript to JavaScript

* change javascript to JavaScript

* Change Javascript to JavaScript
2022-11-10 08:33:07 -08:00

2.9 KiB

title description ha_category ha_config_flow ha_release ha_iot_class ha_codeowners ha_domain ha_platforms ha_integration_type
RTSPtoWebRTC Instructions on how to integrate RTSPtoWebRTC server within Home Assistant.
Camera
true 2022.2 Local Push
@allenporter
rtsp_to_webrtc
diagnostics
integration

The RTSPtoWebRTC integration registers with camera integration to provide WebRTC live streams for any RTSP camera. The integration initiates a connection to a RTSPtoWeb or RTSPtoWebRTC proxy server that converts an RTSP stream to a WebRTC stream.

The integration configuration requires the URL to your server (e.g. http://example.com:8083) and will automatically discover which type of server you have.

{% include integrations/config_flow.md %}

Technical Details

RTSPtoWebRTC registers with the camera integration to override the camera attribute frontend_stream_type of STREAM_TYPE_WEBRTC to instruct the frontend to use WebRTC streams.

See WebRTC for more technical details on the open standard for real-time communication. Here is a short summary of how it works:

  • The Home Assistant Frontend is a WebRTC client. This just means there is some JavaScript for initiating a WebRTC stream which creates an offer.
  • The webrtc integration is responsible for signaling, passing the offer and an RTSP URL to the RTSPtoWebRTC server.
  • The RTSPtoWeb{RTC} server opens the RTSP URL, and returns back an answer.
  • The Frontend accepts the answer and then establishes a peer connection to the RTSPtoWebRTC server.
  • Establishing a peer connection may be a direct connection on the local network, or using a variety of techniques to communicate through a NAT (e.g. with a STUN server).
  • The Frontend then communicates directly with the RTSPtoWeb{RTC} proxy server to view the stream.

See Getting started with peer connections for more on the technical details.

Troubleshooting

The integration may not work for your particular setup, and Home Assistant cannot support and troubleshoot user problems that are unrelated to the actual integration in Home Assistant.

The WebRTC stream negotiation process and streaming can vary a lot depending on your network setup and camera setup. See the specific audio and video codecs supported at RTSPtoWeb Limitations and RTSPtoWebRTC Limitations.