
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
@gumlet/video-manifest-parser
Advanced tools
A TypeScript package for manipulating MPD and M3U8 manifests
A TypeScript library for manipulating MPD (MPEG-DASH) and M3U8 (HLS) manifest files.
npm install @gumlet/video-manifest-parser
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();
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();
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[];
};
}
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;
}
fast-xml-parser: For parsing and building MPD XMLm3u8-parser: For parsing M3U8 playliststypescript: For type definitions and compilationFAQs
A TypeScript package for manipulating MPD and M3U8 manifests
We found that @gumlet/video-manifest-parser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies