Skip to content

Aleckgt/rtsp-ws-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rtsp-ws-proxy

rtsp-ws-proxy allows to transfer rtsp-stream from ip-camera to a web browser via websockets. The output video stream is broadcast in the MPEG1 video-format (the audio decoding not implemented. You can add audio-decoding options if it needed). ffmeg is used to decode the input rtsp-stream (https://www.ffmpeg.org/).

Usage:

  1. copy streams.yml into /etc/rtsp-ws-proxy/
  2. fill streams.yml like this
server: 
  port: 8080
cameras:
- name: camera1
  stream: rtsp://91.191.213.49:554/live_mpeg4.sdp
  wsPort: 8081
  protocol: tcp               #optional. Default: tcp
  fps: 25                     #optional. Default: 25
  bitrate: 5000k              #optional. If does not set, parametr not usung.
- name: camera2
  stream: rtsp://195.46.114.132/live/ch00_0
  wsPort: 8082
  protocol: udp
  fps: 20
    ...
  1. start rtsp-ws-proxy.js via node.js or start rtsp-ws-proxy
  2. on web page you can use jsmpeg.js or similar.

Example with jsmpeg

  <script src="jsmpeg.min.js"></script>
  <div class="camera" data-url="ws://localhost:8081"></div> <!--stream from first camera-->
  <div class="camera" data-url="ws://localhost:8082"></div> <!--stream from second camera-->

About

Transfer rtsp stream through websockets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages