All Projects → fent → Node M3u8stream

fent / Node M3u8stream

Licence: mit
Concatenates segments from a m3u8/dash-mpd playlist into a consumable stream.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Node M3u8stream

Zee5
Just a simple shit but no one knows
Stars: ✭ 29 (-77.17%)
Mutual labels:  stream, m3u8
mock-hls-server
Fake a live/event HLS stream from a VOD one. Useful for testing. Supports looping.
Stars: ✭ 61 (-51.97%)
Mutual labels:  stream, m3u8
Freeiptv
FreeIPTV • Watch Free IPTV World Wide
Stars: ✭ 68 (-46.46%)
Mutual labels:  stream, m3u8
hls-segment-reader
Node.js Readable for retrieving HLS segments.
Stars: ✭ 18 (-85.83%)
Mutual labels:  stream, m3u8
Backoffice Administration
Stars: ✭ 89 (-29.92%)
Mutual labels:  stream, m3u8
Rxviz
Rx Visualizer - Animated playground for Rx Observables
Stars: ✭ 1,471 (+1058.27%)
Mutual labels:  stream
React Papaparse
react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
Stars: ✭ 116 (-8.66%)
Mutual labels:  stream
Emberconf 2017
A collection of links that summarize EmberConf 2017
Stars: ✭ 103 (-18.9%)
Mutual labels:  stream
Snail
基于Java、JavaFX开发的下载工具,支持下载协议:BT(BitTorrent、磁力链接、种子文件)、HLS(M3U8)、FTP、HTTP。人家才不要你的⭐⭐呢,哼
Stars: ✭ 102 (-19.69%)
Mutual labels:  m3u8
Twitchrecover
Twitch VOD tool which recovers all VODs including those that are sub only or deleted.
Stars: ✭ 123 (-3.15%)
Mutual labels:  stream
Deluge Streaming
Streaming plugin for deluge, making it possible to read torrents and download required parts on-demand.
Stars: ✭ 119 (-6.3%)
Mutual labels:  stream
Twitchpotplayer
Extensions for PotPlayer to watch Twitch streams without streamlinks or any crap.
Stars: ✭ 112 (-11.81%)
Mutual labels:  stream
Illuminati
This is a Platform that collects all the data accuring in your Application and shows the data in real time by using Kibana or other tools.
Stars: ✭ 106 (-16.54%)
Mutual labels:  stream
Corrode
A batteries-included library for reading binary data.
Stars: ✭ 116 (-8.66%)
Mutual labels:  stream
Rapscallion
Asynchronous React VirtualDOM renderer for SSR.
Stars: ✭ 1,405 (+1006.3%)
Mutual labels:  stream
Tunnel
PG数据同步工具(Java实现)
Stars: ✭ 122 (-3.94%)
Mutual labels:  stream
Zy Player Web
▶️ 跨平台浏览器端视频资源播放器. 简洁免费. 🎞 ZY Player 浏览器端。
Stars: ✭ 101 (-20.47%)
Mutual labels:  m3u8
Extreme
Elixir Adapter for EventStore
Stars: ✭ 110 (-13.39%)
Mutual labels:  stream
Vxg.media.sdk.android
Market leading Android SDK with encoding, streaming & playback functionality
Stars: ✭ 119 (-6.3%)
Mutual labels:  stream
Flinkstreamsql
基于开源的flink,对其实时sql进行扩展;主要实现了流与维表的join,支持原生flink SQL所有的语法
Stars: ✭ 1,682 (+1224.41%)
Mutual labels:  stream

node-m3u8stream

Reads segments from a m3u8 playlist or DASH MPD file into a consumable stream.

Depfu codecov

Usage

const fs = require('fs');
const m3u8stream = require('m3u8stream')

m3u8stream('http://somesite.com/link/to/the/playlist.m3u8')
    .pipe(fs.createWriteStream('videofile.mp4'));

API

m3u8stream(url, [options])

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.

Stream#end()

If called, stops requesting segments, and refreshing the playlist.

Event: progress

  • Object - Current segment with the following fields,
    • number - num
    • number - size
    • number - duration
    • string - url
  • number - 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.

miniget events

All miniget events are forwarded and can be listened to from the returned stream.

m3u8stream.parseTimestamp(time)

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 data

Limitations

Currently, 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.

Install

npm install m3u8stream

Tests

Tests are written with mocha

npm test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].