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

@gumlet/video-manifest-parser

v1.0.4

Published

A TypeScript package for manipulating MPD and M3U8 manifests

Readme

Test Status

Note: This package does not handle segmentation or encryption of media files like Shaka Packager. It is intended as a quick tool for editing manifests and removing already segmented streams.

It currently honors HLS and DASH specifications as followed by Shaka Packager.

Manifest Editor

A TypeScript library for manipulating MPD (MPEG-DASH) and M3U8 (HLS) manifest/master playlist files.

Features

  • Parse and modify MPD (MPEG-DASH) manifests
  • Parse and modify M3U8 (HLS) master playlists
  • Support for multiple media types (video, audio, subtitles)
  • Automatic ID generation for new elements
  • Type-safe API with TypeScript interfaces

Installation

npm install @gumlet/video-manifest-parser

Usage

MPD Editor

import { MPDEditor } from '@gumlet/video-manifest-parser';

// Parse MPD manifest
const editor = new MPDEditor(mpdString);

// Add new adaptation set
const newAdaptationSet = {
  '@contentType': 'video',
  '@width': '1920',
  '@height': '1080',
  Representation: {
    '@bandwidth': '5000000',
    '@codecs': 'avc1.640028',
    '@mimeType': 'video/mp4'
  }
};

editor.addAdaptationSet(newAdaptationSet);

// Get modified MPD string
const updatedMpd = editor.toString();

M3U8 Editor

import { M3U8Editor } from '@gumlet/video-manifest-parser';

// Parse M3U8 playlist
const editor = new M3U8Editor(m3u8String);

// Add new media stream
const newStream: StreamInfo = {
  bandwidth: 5000000,
  codecs: 'avc1.640028',
  resolution: { width: 1920, height: 1080 },
  frameRate: '30.000'
};

editor.addStream(newStream);

// Get modified M3U8 string
const updatedM3U8 = editor.toString();

API Reference

MPDEditor

interface AdaptationSet {
  '@id': string;
  '@contentType': 'video' | 'audio' | 'text';
  '@lang'?: string;
  Representation: {
    '@id': string;
    '@bandwidth': string;
    '@codecs': string;
    '@mimeType': string;
    '@audioSamplingRate'?: string;
    '@width'?: string;
    '@height'?: string;
  };
}

interface MPD {
  Period: {
    AdaptationSet: AdaptationSet[];
  };
}

M3U8Editor

interface StreamInfo {
  bandwidth: number;
  codecs: string;
  resolution?: { width: number; height: number };
  frameRate?: string;
  videoRange?: string;
  audio?: string;
  subtitles?: string;
  closedCaptions?: string;
}

interface Media {
  type: 'AUDIO' | 'SUBTITLES' | 'CLOSED_CAPTIONS';
  group_id: string;
  language: string;
  name: string;
  uri: string;
  default?: boolean;
  autoselect?: boolean;
  channels?: number;
}

Dependencies

  • fast-xml-parser: For parsing and building MPD XML
  • m3u8-parser: For parsing M3U8 playlists
  • typescript: For type definitions and compilation