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

rtsp-base64img-nodejs

v1.0.4

Published

Node.js,socket.io,express

Readme

Node.js,socket.io,express

Please download ffmpeg on to your local machine and make it available in the path before using this module since it assumes ffmpeg is available from command line while spawning a child process

This module converts a rtsp video feed into a sequence of base64 images by spawning child process and passes data to clients via websockets.It can be used to spawn multiple streams and clients join streams which they are interested in.The module automatically kills the child process when the room is empty.

Using it is very very simple

Node.js :

npm i --save  rtsp-base64img-nodejs

var frameTransporter = require('rtsp-base64img-nodejs');

var streamer = new frameTransporter({port:9999})

The port option is optional by default it starts socket.io on port 9999.You can change it by passing the port value in the option.That's it your server is all set up

I used angular2 on client side but any language which supports socket.io should be good to go

Angular 2 :

Inside your html add this image tag where you want to show the sequence of images

<img id="img"  >
 

In angular2 install socket.io-client from npm Add this line at the top in your imports section inside your component

import * as io from 'socket.io-client';
ngOnInit() {
    this.socket = io('http://localhost:9999');
    this.socket.on('connect',()=>{
    
    this.socket.emit('join',{url:'rtsp://your_rtsp_stream_url',ip:'192.168.1.108'});
    })
    this.img = document.getElementById('img'),
    this.socket.on('data',  (data)=> {
        
    //     console.log("entered");
    this.img.src = 'data:image/jpeg;base64,' + data;
    });


  }
  1. First connect socket.io to your server with the mentioned port in the server.Default is 9999.
  2. Once connected emit a join event and pass the url of the stream and room name(ip).Here i have used ipaddress as the roomname because i was developing this for ipcameras.
  3. Then get the image element's reference and update it'source with the base64 image that is being passed from the server.That's it

I have plans to extend it further and make the ffmpeg to be passed while creating frameTransporter.If anyone's interested please fork and start developing.Thanks