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

media-stream-util

v1.0.0

Published

A CLI utility for downloading media content from playlist.json URLs or webpages. For personal, educational, and archival use only.

Readme

Media Stream Utility

A CLI utility for downloading media content from playlist.json URLs or webpages containing embedded media players.

Platform Support

Currently supports: Vimeo content only

Note: Support for additional video platforms (YouTube, Dailymotion, etc.) will be added in future releases.

⚠️ LEGAL DISCLAIMER

This tool is provided for PERSONAL, EDUCATIONAL, and ARCHIVAL purposes only.

YOUR RESPONSIBILITIES:

  • ✅ Comply with all applicable copyright laws
  • ✅ Respect content creators' intellectual property rights
  • ✅ Follow the platform's Terms of Service
  • ✅ Ensure you have proper authorization to download content
  • ✅ Use only for personal, educational, or archival purposes

IMPORTANT LIMITATIONS:

  • 🚫 This software does NOT bypass DRM or access encrypted content
  • 🚫 Does NOT work with protected or premium content
  • 🚫 Only works with publicly accessible, unencrypted streams
  • ⚠️ Users must provide their own cookies for authenticated content

Use at your own risk and responsibility.

Installation & Usage

Via NPX (Recommended)

npx media-stream-util [options]

Options

| Flag | Description | Example | | --------------------- | ----------------------------------------- | --------------------------------------------- | | -p, --jsonPlaylist | Direct link to playlist.json file | -p "https://example.com/playlist.json" | | -w, --webPage | Link to webpage with embedded media | -w "https://example.com/page" | | -cp, --cookiePath | Path to cookies.json file | -cp "./cookies.json" | | -a, --audioOnly | Download audio only | -a | | -v, --videoOnly | Download video only (requires resolution) | -v -r 720 | | -c, --combine | Download and merge audio + video | -c | | -r, --resolution | Set video resolution | -r 1080 (options: 240, 360, 540, 720, 1080) | | -m, --maxResolution | Download maximum available resolution | -m | | -o, --output | Output filename | -o "my-video" | | --path | Output directory path | --path "./downloads" | | --help | Show help | --help | | --version | Show version | --version | | --disclaimer | Prints disclaimer | --disclaimer |

Examples

# Download audio only from direct playlist URL
npx media-stream-util -p "https://example.com/playlist.json" -a -o "audio-file"

# Download 720p video from webpage with cookies
npx media-stream-util -w "https://example.com/page" -cp "./cookies.json" -v -r 720 -o "video-file"

# Download and combine audio+video at max resolution
npx media-stream-util -p "https://example.com/playlist.json" -c -m -o "combined-file"

Cookie Format

If accessing authenticated content, provide cookies in JSON format:

[
  {
    "name": "session_id",
    "value": "your_session_value",
    "domain": ".example.com",
    "path": "/",
    "secure": true,
    "httpOnly": true
  }
]

Requirements

  • Node.js 14+
  • FFmpeg (will prompt to install if missing)

Technical Notes

  • Only works with unencrypted HLS/DASH streams
  • Requires direct access to playlist.json or embedded player URLs
  • Does not perform web scraping or automated platform interaction
  • All URLs and authentication must be provided by the user

License

MIT License - See LICENSE file for details.

This software is provided "as is" without warranty of any kind.

Support

This tool is provided as-is for educational purposes. Users are responsible for ensuring their usage complies with applicable laws and platform terms of service.