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

@javagt/n-m3u8dl-re

v0.5.1

Published

TypeScript port of N_m3u8DL-RE v0.5.1 (C#) — cross-platform DASH/HLS/MSS stream downloader. Ported by DeepSeek V4 Flash.

Readme

@javagt/n-m3u8dl-re

Version 0.5.1 — Pure TypeScript port of N_m3u8DL-RE v0.5.1, the C# media stream downloader by nilaoda.

Ported by DeepSeek V4 Flash. Version numbers are kept in sync with the original C# releases.

Installation

npm install @javagt/n-m3u8dl-re

Library Usage

The library exports every module for programmatic use — parse manifests, download segments, decrypt content, and handle subtitles all from TypeScript/JavaScript.

Download a stream with Widevine keys

import { downloadMedia } from '@javagt/n-m3u8dl-re';

const result = await downloadMedia({
  mpdUrl: 'https://.../manifest.mpd',
  keys: ['635b2fb2...:0c0a5df3...'],
  saveName: 'My Video',
  saveDir: '/downloads',
});
console.log(result.success ? `Saved to ${result.outputPath}` : `Failed: ${result.error}`);

Parse a DASH manifest programmatically

import { parseMPD, extractDASHStreams } from '@javagt/n-m3u8dl-re';

const streams = extractDASHStreams(mpdXml, 'https://example.com/base/');
for (const stream of streams) {
  console.log(stream.bandwidth, stream.codecs, stream.resolution);
}

Parse an HLS playlist

import { HLSParser, isHLSUrl } from '@javagt/n-m3u8dl-re';

const parser = new HLSParser();
const result = parser.parse(m3u8Content);
console.log(result.variants?.length, 'variant streams found');

Decrypt an MP4 with CENC keys

import { decryptMP4 } from '@javagt/n-m3u8dl-re';

await decryptMP4('encrypted.mp4', 'decrypted.mp4', '635b2fb2...', '0c0a5df3...');

Parse MP4 box structure

import { parseChildren, findBox, BoxReader } from '@javagt/n-m3u8dl-re';

const boxes = parseChildren(mp4Buffer);
const moov = findBox(boxes, 'moov');
// Extract DRM info, codecs, etc.

Download segments with progress

import { DownloadManager } from '@javagt/n-m3u8dl-re';

const manager = new DownloadManager({ threadCount: 4 });
const results = await manager.downloadVOD(segments);

Subtitle processing

import { parseVTT, convertVTTtoSRT, parseTTML, mergeSubtitleFiles } from '@javagt/n-m3u8dl-re';

MSS (Smooth Streaming)

import { extractMSSStreams, synthesizeMoov, parseISM } from '@javagt/n-m3u8dl-re';

ESM Imports

All modules are available as named ESM imports:

// Parsers
import { parseMPD, extractDASHStreams } from '@javagt/n-m3u8dl-re';
import { HLSParser, parseHLSContent } from '@javagt/n-m3u8dl-re';
import { extractMSSStreams, parseISM } from '@javagt/n-m3u8dl-re';

// Crypto
import { decryptMP4, aes128Decrypt, ChaCha20 } from '@javagt/n-m3u8dl-re';

// MP4
import { parseChildren, findBox, BoxReader, BoxWriter } from '@javagt/n-m3u8dl-re';
import { parsePssh, parseTenc, extractDRMFromMoov } from '@javagt/n-m3u8dl-re';

// Download
import { DownloadManager, HttpClient, MergeManager } from '@javagt/n-m3u8dl-re';

// Subtitles
import { parseVTT, parseTTML, parseSRT } from '@javagt/n-m3u8dl-re';

// CLI (for tools that need the full pipeline)
import { cliMain, parseCLI, parseFilter } from '@javagt/n-m3u8dl-re';

Features

  • DASH: Parse MPD manifests with SegmentTemplate, SegmentTimeline, and ContentProtection
  • HLS: Parse M3U8 playlists with AES-128 encryption, variant streams, and live support
  • MSS: Parse Microsoft Smooth Streaming ISM manifests with FourCC codec handling
  • MP4: Binary parsing for DRM extraction, codec configuration, and moov synthesis
  • Download: Parallel segment downloading with HTTP range requests
  • Encryption: AES-128-CBC and ChaCha20 decryption support

Installation

npm install
npm run build

Usage

npx tsx src/cli/index.ts <url> [options]

Project Structure

src/
  parser/          # Manifest parsers (DASH, HLS, MSS)
  mp4/             # MP4 binary parsing and moov synthesis
  crypto/          # Encryption/decryption
  download/        # Segment downloading
  cli/             # Command-line interface

Documentation

See ../N_m3u8DL-RE/docs/features/ for feature specifications.

License

MIT

Ported from N_m3u8DL-RE (MIT) by DeepSeek V4 Flash.