Skip to content

download HLS video

Notifications You must be signed in to change notification settings

musakui/kaizoku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kaizoku

download HLS video

npm

usage

import { Readable } from 'node:stream'
import { createWriteStream } from 'node:fs'
import { HlsVideo } from '@musakui/kaizoku'

const video = new HlsVideo('[playlist url]', { key: '[key]' })
Readable.from(video).pipe(createWriteStream('video.m2ts'))

// iterate manually to track progress
const writeStream = createWriteStream('video.m2ts')

for await (const chunk of video) {
	writeStream.write(Buffer.from(chunk))

	// notify progress
	// ...
}

About

download HLS video

Resources

Code of conduct

Security policy

Stars

Watchers

Forks