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

streamify-video

v1.2.0

Published

Secure, zero-config HTTP video streaming utility for Node.js

Readme

streamify-video

Secure, zero-configuration HTTP video streaming utility for Node.js & Express.

streamify-video makes video streaming effortless by handling HTTP Range requests , secure access , and edge cases for you. Perfect for media servers , course platforms , self-hosted video apps , and internal tools .


Why streamify-video?

Most developers struggle with:

  • HTTP Range headers
  • Video seeking issues
  • Boilerplate Express code
  • Securing video endpoints

streamify-video solves all of this in minutes.


Features (v1.1.0)

  • HTTP Range support (206 Partial Content)
  • Smooth seeking in browsers & players
  • Secure streaming via token or password
  • Automatic MIME type detection
  • Edge-case safe range parsing
  • TypeScript support with typings
  • Zero configuration setup

Installation

npm install streamify-video

Quick Start

import express from "express";
import { streamVideo } from "streamify-video";

const app = express();

app.get(
  "/video/:filename",
  streamVideo({
    videoDir: "./videos"
  })
);

app.listen(3000, () => {
  console.log("Server running on http://localhost:3000");
});

Open in browser:

http://localhost:3000/video/sample.mp4

Secure Streaming (Token / Password)

Token-based access

app.get(
  "/video/:filename",
  streamVideo({
    videoDir: "./videos",
    token: "secret123"
  })
);

Request:

/video/movie.mp4?token=secret123

Or via header:

x-stream-token: secret123

Password-based access

app.get(
  "/video/:filename",
  streamVideo({
    videoDir: "./videos",
    password: "mypassword"
  })
);

Request:

/video/movie.mp4?password=mypassword

Configuration Options

streamVideo({
  videoDir: string;   // Required: directory containing videos
  token?: string;     // Optional: secure token
  password?: string;  // Optional: password protection
})

Supported Video Formats

  • MP4 (video/mp4)
  • WebM (video/webm)
  • MKV (video/x-matroska)
  • AVI (video/x-msvideo)
  • MOV (video/quicktime)

(Other formats fall back to application/octet-stream.)


How It Works

  • Automatically parses HTTP Range headers
  • Validates invalid or out-of-bound ranges
  • Streams only requested chunks
  • Sends correct response headers:
    • Content-Range
    • Accept-Ranges
    • Content-Length
    • Content-Type

This ensures fast loading , low memory usage , and perfect seeking .


Example Use Cases

  • 📚 Online course platforms
  • 🎞 Self-hosted video servers
  • 📡 Internal company media tools
  • 🧪 Prototyping video apps
  • 📱 Mobile + web video backends

Roadmap

Planned future upgrades:

  • HLS streaming support
  • Bandwidth throttling
  • Fastify plugin
  • FFmpeg thumbnail generation
  • Analytics & hooks

🧑‍💻 Author

Mihir Acharya Web Developer & Streaming Systems Enthusiast


📄 License

MIT License — free to use in personal and commercial projects.


⭐ If this package helps you, consider giving it a star on GitHub!