Package Exports
- node-hls-downloader
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-hls-downloader) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
HLS downloader
About
Downloads a live HLS stream.
Usage
CLI
hls-downloader [-V] [-h] [-q QUALITY] -o FILE stream_urlExample
hls-downloader -q best -c 5 -o video.mp4 "https://......./stream.m3u8"API
import { download } from "node-hls-downloader";
await download({
quality: "best",
concurrency: 5,
outputFile: "video.mp4",
streamUrl: "https://......./stream.m3u8",
});Options
Note: options marked with 🔒 are mandatory.
stream_url, streamUrl 🔒
The URL to the stream (either the master file or a playlist).
--ffmpeg-merge, mergeUsingFfmpeg
Merge TS segments using FFMPEG instead of basic concatenation. Not recommended, but you can use it if stuttering issues occur when merging the TS segments.
- Default:
false
--segments-dir, segmentsDir
Where the TS segments will be stored.
- Default: a temporary directory
--merged-segments-file, mergedSegmentsFile
Location of the merged TS segments file.
- Default: a temporary file
-c, --concurrency, concurrency
How many threads to use for downloading segments.
- Default:
1
-q, --quality, quality 🔒*
Stream quality: worst, best, or max bandwidth.
* only mandatory if passing a master playlist stream URL
-o, --output-file, outputFile 🔒
Target file to download the stream to. If it already exists, it will be overwritten.
-h, --header, httpHeaders
Headers to use when making HTTP requests. On the CLI, the header can be repeated. Format is "Name: value".
Authors
License
The program is licensed under the Apache License 2.0.