Gathering detailed insights and metrics for m3u8stream
Gathering detailed insights and metrics for m3u8stream
Gathering detailed insights and metrics for m3u8stream
Gathering detailed insights and metrics for m3u8stream
Concatenates segments from a m3u8/dash-mpd playlist into a consumable stream.
npm install m3u8stream
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (96.74%)
JavaScript (3.26%)
Total Downloads
29,450,685
Last Day
28,544
Last Week
191,836
Last Month
742,244
Last Year
9,556,697
MIT License
224 Stars
146 Commits
53 Forks
6 Watchers
4 Branches
7 Contributors
Updated on Jun 14, 2025
Minified
Minified + Gzipped
Latest Version
0.8.6
Package Id
m3u8stream@0.8.6
Unpacked Size
48.37 kB
Size
13.49 kB
File Count
21
NPM Version
7.24.2
Node Version
16.13.1
Cumulative downloads
Total Downloads
Reads segments from a m3u8 playlist or DASH MPD file into a consumable stream.
1const fs = require('fs'); 2const m3u8stream = require('m3u8stream') 3 4m3u8stream('http://somesite.com/link/to/the/playlist.m3u8') 5 .pipe(fs.createWriteStream('videofile.mp4'));
Creates a readable stream of binary media data. options
can have the following
begin
- Where to begin playing the video. Accepts an absolute unix timestamp or date and a relative time in the formats 1:23:45.123
and 1m2s
.liveBuffer
- How much buffer in milliseconds to have for live streams. Default is 20000
.chunkReadahead
- How many chunks to preload ahead. Default is 3
.highWaterMark
- How much of the download to buffer into the stream. See node's docs for more. Note that the actual amount buffered can be higher since each chunk request maintains its own buffer.requestOptions
- Any options you want to pass to miniget, such as headers
.parser
- Either "m3u8" or "dash-mpd". Defaults to guessing based on the playlist url ending in .m3u8
or .mpd
.id
- For playlist containing multiple media options. If not given, the first representation will be picked.If called, stops requesting segments, and refreshing the playlist.
Object
- Current segment with the following fields,
number
- numnumber
- sizenumber
- durationstring
- urlnumber
- Total number of segments.number
- Bytes downloaded up to this point.For static non-live playlists, emitted each time a segment has finished downloading. Since total download size is unknown until all segment endpoints are hit, progress is calculated based on how many segments are available.
All miniget events are forwarded and can be listened to from the returned stream.
Converts human friendly time to milliseconds. Supports the format
00:00:00.000 for hours, minutes, seconds, and milliseconds respectively.
And 0ms, 0s, 0m, 0h, and together 1m1s.
time
- A string (or number) giving the user-readable input dataCurrently, it does not support encrypted media segments. This is because the sites where this was tested on and intended for, YouTube and Twitch, don't use it.
This does not parse master playlists, only media playlists. If you want to parse a master playlist to get links to media playlists, you can try the m3u8 module.
npm install m3u8stream
Tests are written with mocha
1npm test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 3/27 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
23 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
9.7%
28,544
Compared to previous day
Last Week
5.5%
191,836
Compared to previous week
Last Month
6.2%
742,244
Compared to previous month
Last Year
192.9%
9,556,697
Compared to previous year