npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@warren-bank/rtsp-relay

v1.0.2

Published

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

Readme

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: