{"repo":"k-yle/rtsp-relay","free":true,"listed":false,"github":"https://github.com/k-yle/rtsp-relay","clone":"git clone https://github.com/k-yle/rtsp-relay.git","description":"📽 View an RTSP stream in your web browser using an express.js server","language":"JavaScript","stars":385,"topics":["rtsp","rtsp-stream","websocket","express","ffmpeg","jsmpeg"],"license":"MIT","category":"networking-infra","readme_excerpt":"📽 RTSP Relay This module allows you to view an RTSP stream in your web browser using an existing express.js server. Internally, this module uses websockets to create an endpoint in your web server (e.g. /api/stream ) which relays the RTSP stream using ffmpeg. On the client side, JS-MPEG is used to decode the websocket stream. The module handles all the complications that unreliable connections introduce: - if the connection between server RTSP stream is disconnected, it will automatically be reconnected when available - if the connection between client server is disconnected, the client will keep trying to reconnect - if multiple clients connect, only one instance of the RTSP stream is consumed to improve performance (one-to-many) Install You don't need to install ffmpeg! Example Open http://localhost:2000 in your web browser. Example using ES6 Imports (e.g. React, Vue) If you have babel/webpack set up, you can import the loadPlayer instead of using a tag. Example code is available for react and for angular. Usage with many cameras If you have hundreds of cameras and don't want to define a seperate route for each one, you can use a dynamic URL: Usage with many clients You may see a MaxListenersExceededWarning if the relay is re-transmitting 10+ streams at once, or if 10+ clients are watching. This is expected, and you can silence the warning by adding process.setMaxListeners(0); to your code. Improving the video quality Depending on your network configuration, you can try th","default_branch":null,"files":null,"tree":[],"storefront":"/r/k-yle","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/k-yle/rtsp-relay/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}