1.0.7 • Published 1 year ago

m3u8-grabber v1.0.7

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago
HELP ME!

m3u8 Grabber

This will take a m3u8 URL and recursively download the file itself, .ts video files, and any .key encryption key files. It will try to preserve the structure of everything "as-is" without distrurbing how the files are. It will then upload everything to Google Cloud Storage.

Usage

Typescript example

import path from 'path';
import { Storage } from '@google-cloud/storage';
import {
  downloadM3u8,
} from 'm3u8-grabber';
const jsonFilePath = path.resolve(__dirname, 'google-credentials.json');
const jsonData = fs.readFileSync(jsonFilePath, 'utf-8');
const keyFile = JSON.parse(jsonData) as never;

const storage = new Storage({
  credentials: keyFile,
});

await downloadM3u8(
  storage, // <-- Google Cloud Storage JS/TS client.
  'https://my-url.com/hls/index.m3u8', // <-- The m3u8 URL
  'my-gcs-bucket', // <-- Google Cloud Storage Bucket
  'output', // <--- The local output folder name on disk for m3u8 files.
  'my-user-1234', // <-- The remote Google Cloud Storage "folder" output.
);

HELP ME!

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago