@warren-bank/rtsp-relay

1.0.2 • Public • Published

rtsp-relay

Node.js server to relay RTSP video stream from 'producer' to 'consumer' client endpoint.

The Problem:

  • I was looking at Android apps that stream video
    • of the display screen
    • from the camera/microphone
  • surprisingly, there are very few good options
  • the only stream protocol they support is RTSP
    • I'm no expert, but apparently:
      • this protocol requires the app to connect (as a client) to an external media server
      • the video stream is published to the server
      • clients must then connect to this server, in order to subscribe to (and view) the video stream

Attempted Workarounds:

  • rtsp-simple-server
    • pros:
      • written in golang, so it cross-compiles statically linked binaries for several platforms
      • small size
      • no dependencies
      • portable
      • simple to use
        • both 'producer' and 'consumer' connect to the same URL: rtsp://[IP]:8554/[stream_id]
    • cons:

This Workaround:

Installation:

npm install --global @warren-bank/rtsp-relay

CLI Usage:

rtsp-relay <options>

options:
========
"--help"
    Print a help message describing all command-line options.

"-v"
"--version"
    Display the version.

"-pport" <integer>
"--producer-port" <integer>
    [optional] Port number for RTSP server to which the 'producer' connects.
    Default: 5554

"-pu" <username>
"--producer-username" <username>
    [optional] Authenticate connections to 'producer' port with secret 'username'.

"-pp" <password>
"--producer-password" <password>
    [optional] Authenticate connections to 'producer' port with secret 'password'.

"-cport" <integer>
"--client-port" <integer>
"--consumer-port" <integer>
    [optional] Port number for RTSP server to which the 'consumer' connects.
    Default: 6554

"-cu" <username>
"--client-username" <username>
"--consumer-username" <username>
    [optional] Authenticate connections to 'consumer' port with secret 'username'.

"-cp" <password>
"--client-password" <password>
"--consumer-password" <password>
    [optional] Authenticate connections to 'consumer' port with secret 'password'.

"-rlp" <integer>
"--rtp-low-port" <integer>
    [optional] Low end of UDP port number range for RTP server.
    Default: 10000

"-rhp" <integer>
"--rtp-high-port" <integer>
    [optional] High end of UDP port number range for RTP server.
    Default: 20000

"-L" <integer>
"--log" <integer>
"--log-level" <integer>
    [optional] Enumeration value to specify log output filter.
    Values:
     -1:  custom: obey DEBUG environment variable
      0:  silent
      1:  quiet
      2:  debug quiet
      3:  debug verbose
      4+: verbose
    Default: 1

Legal:

Readme

Keywords

none

Package Sidebar

Install

npm i @warren-bank/rtsp-relay

Weekly Downloads

1

Version

1.0.2

License

GPL-2.0

Unpacked Size

61.3 kB

Total Files

16

Last publish

Collaborators

  • warren-r-bank