# m3u8-downloader-concurrency

> M3u8 downloader - Multi Thread/Auto Merge/Event Monitor/Custom HTTP Referrer

Latest version **2.1.0** (published 2023-01-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install m3u8-downloader-concurrency
pnpm add m3u8-downloader-concurrency
yarn add m3u8-downloader-concurrency
bun add m3u8-downloader-concurrency
```

Provides the command `m3u8-downloader`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2023-01-25 |
| First published | 2020-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.1 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 17 |
| Author | reason211 |
| Maintainers | reason211 |
| Keywords | m3u8 downloader, multi thread, auto merge, http referrer, event, monitor |

## Links

- npm: https://www.npmjs.com/package/m3u8-downloader-concurrency
- Repository: https://github.com/reason211/m3u8-downloader
- Homepage: https://github.com/reason211/m3u8-downloader#readme
- Issues: https://github.com/reason211/m3u8-downloader/issues
- npm.io page: https://npm.io/package/m3u8-downloader-concurrency

## Dependencies (2)

- [request](https://npm.io/package/request.md) ^2.88.2
- [minimist](https://npm.io/package/minimist.md) ^1.2.5

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2023-01-25
- 2.0.0 — 2023-01-24
- 1.1.9 — 2022-03-18
- 1.1.8 — 2022-03-16
- 1.1.7 — 2022-03-09
- 1.1.6 — 2021-12-26
- 1.1.5 — 2021-12-26
- 1.1.4 — 2021-12-26
- 1.1.3 — 2021-10-27
- 1.1.2 — 2021-03-01
- 1.1.1 — 2021-03-01
- 1.1.0 — 2020-04-24
- 1.0.9 — 2020-04-24
- 1.0.8 — 2020-04-24
- 1.0.7 — 2020-04-24
- … 7 more at https://npm.io/package/m3u8-downloader-concurrency/versions

## README

# m3u8-downloader
M3u8 downloader - Multi Thread/Auto Merge/Event Monitor/Custom HTTP Referrer/Support HTTP Proxy

****Pure Javascript

# How to use

Download m3u8 video files directly 
```shell
npm install -g m3u8-downloader-concurrency 

m3u8-downloader --url="https://xxx/xxx.m3u8"
# or with proxy
m3u8-downloader --proxy="http://127.0.0.1:1080" --url="https://xxx/xxx.m3u8" --out tmpdir
```


# options

## --out=outputDir 

Specify the download output directory

## --proxy="http://127.0.0.1:1080" 

Specify the proxy to use

## --suffix=".ts" 

Specify the suffix name of the video fragment to download

## --root="https://abc.com/video28912030123/" 

Specify the URL Root address of the video fragment to download

## --referrer="https://abc.com"

HTTP Referrer

## --threadCount=3

Thread Count

## --debug=true
DEBUG false or true


# Advanced usage
```shell
npm install --save m3u8-downloader-concurrency 
```

```javascript
let url = 'https://abc.com/video28912030123/index.m3u8'; //required
let outputDir = '/Users/xxxx/Downloads/tmp'; //required

// let outputFileName = 'output.ts'; //optional
// let threadCount = 5; //optional

// let videoUrlDirPath = 'https://abc.com/video28912030123/'; //optional
// let headerReferrer = 'https://abc.com'; //optional
// let videoSuffix = '.ts'; //optional

// let retryOnError = true; //optional

// let proxy = '127.0.0.1:1080'; //optional

let downloader = require('m3u8-downloader-concurrency')

let options = {
    url,
    outputDir, //optional
    proxy, //optional
    // outputFileName, //optional
    threadCount, //optional
    videoSuffix, //optional
    videoUrlDirPath, //optional
    headerReferrer, //optional
    retryOnError, //optional
    debug //optional
};

let listener = downloader.download(options)

listener.on('start', function (options) {
    console.log("started downloading", options);
});

listener.on('progress', function (percent) {
    console.log('progress', percent);
});


listener.on('downloaded', function (list) {
    console.log('downloaded', list);
});


listener.on('complete', function (outFile) {
  console.log("done", outFile);
});

listener.on('error', function (error) {
    console.error('error', error);
});

```

---
_Source: https://npm.io/package/m3u8-downloader-concurrency · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
