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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apocaliss92/scrypted-onvif-rebroadcast

v0.0.8

Published

Scrypted mixin plugin that exposes cameras as ONVIF devices using Scrypted Rebroadcast RTSP streams

Readme

Scrypted ONVIF Rebroadcast

Creates virtual ONVIF-compliant camera devices from Scrypted's RTSP rebroadcast streams, enabling third-party NVRs like UniFi Protect to adopt cameras that aren't natively supported.

Features

  • Wraps Scrypted RTSP rebroadcast streams in ONVIF Profile S endpoints
  • Unique IP & MAC per camera via Docker macvlan proxy containers (required for UniFi Protect)
  • Automatic Docker network and proxy container management
  • WS-Discovery for ONVIF auto-detection
  • PTZ, motion events, and object detection forwarded via ONVIF
  • WS-Security and HTTP Basic authentication
  • Persistent IP assignments across restarts

UniFi Protect Setup

UniFi Protect identifies third-party cameras by MAC address. To add multiple cameras, each needs a unique IP and MAC on the network. This plugin handles this automatically using Docker macvlan proxy containers.

Prerequisites

  • Scrypted running in Docker with the Rebroadcast plugin installed
  • Docker socket mounted in the Scrypted container (/var/run/docker.sock)
  • A network interface available for macvlan (e.g. br0)

Docker Socket

The plugin needs access to the Docker socket to create proxy containers. Add this path mapping to your Scrypted container:

| Container Path | Host Path | |---|---| | /var/run/docker.sock | /var/run/docker.sock |

Plugin Settings

| Setting | Description | Example | |---|---|---| | Username / Password | ONVIF authentication credentials | admin / password | | Auto-assign unique IPs | Enable automatic proxy container creation | true | | IP range start | First IP to assign to cameras | 192.168.1.240 | | Network interface | Parent interface for the macvlan Docker network | br0 | | Subnet prefix length | CIDR prefix for the macvlan network | 23 | | Gateway | Default gateway for the macvlan network | 192.168.1.1 |

IP Range Selection

Choose IPs outside your DHCP pool on the same subnet as your UniFi controller. For example, if your router assigns 192.168.1.2-200 via DHCP, use 192.168.1.240 as the start.

How It Works

UniFi Protect                    Docker macvlan proxy              Scrypted container
(192.168.1.x)                    (192.168.1.240, unique MAC)       (192.168.4.40)
     |                                  |                                |
     |--- ONVIF (port 8000) ---------->|--- TCP proxy (port 18000) --->|  ONVIF server
     |--- RTSP  (port 554)  ---------->|--- TCP proxy (port 42917) -->|  RTSP rebroadcast

Each camera gets its own proxy container with:

  • A unique IP address on your LAN
  • A unique MAC address (deterministic, based on device ID)
  • TCP proxies for both ONVIF (port 8000) and RTSP (port 554+) traffic

Adding Cameras in UniFi Protect

  1. Install and configure the plugin in Scrypted
  2. Enable "Auto-assign unique IPs" and configure the IP range
  3. The plugin automatically creates proxy containers (visible in Docker)
  4. In UniFi Protect: Settings > Cameras > Add Camera > ONVIF
  5. Enter each camera's assigned IP with port 8000
  6. Enter the ONVIF username/password you configured

Unraid Notes

  • If your Scrypted container uses Custom: br0.2 (ipvlan), create the macvlan network on br0 instead to get unique MACs
  • The plugin creates a Docker network called onvif_cameras for the proxy containers
  • Proxy containers are named onvif-proxy-{deviceId} and auto-restart
  • The alpine/socat image is pulled automatically on first use

Architecture

The plugin is a Scrypted MixinProvider that attaches to Camera and Doorbell devices:

  1. Stream Discovery - Finds RTSP rebroadcast URLs from the Rebroadcast plugin
  2. ONVIF Server - Creates an HTTP server per camera serving ONVIF SOAP endpoints
  3. Proxy Containers - Spawns Docker containers with macvlan networking for unique IPs/MACs
  4. Event Forwarding - Scrypted motion/detection events are forwarded via ONVIF pull-point subscriptions

Development

npm install
npm run build
npx scrypted login <scrypted-ip>
npm run scrypted-deploy <scrypted-ip>

Buy me a coffee!

For requests and bugs