m3u8_to_mpegts

A small library that allows the user to download mpeg-ts chunk files after he provides it with a m3u8 playlist url file, and an output directory.

Usage no npm install needed!

<script type="module">
  import m3u8ToMpegts from 'https://cdn.skypack.dev/m3u8_to_mpegts';
</script>

README

LIVE-HLS-FETCHER (JS ONLY)

A simple CLI tool to fetch an entire hls manifest and it's segments and save it all locally.

Installation

npm install m3u8_to_mpegts

Usage

Then on your main file you run this

Example

var tsFetcher = require('m3u8_to_mpegts');

tsFetcher({
        uri: "http://api.new.livestream.com/accounts/15210385/events/4353996/videos/113444715.m3u8",
        cwd: "destinationDirectory",
        preferLowQuality: true,
    }, 
   function(){
       console.log("Download of chunk files complete");
   }
);

Special thanks to:

Tenacex for making it live

and

imbcmdth for creating hls-fetcher.