m3u8parse-dumpfile-pmb

0.1.0 • Public • Published

m3u8parse-dumpfile-pmb

Read a file, m3u8parse() it, and dump the result as JSON.

Usage

var inputFile = (process.argv[2] || process.stdin.fd),
  readAndDump_m3u8 = require('m3u8parse-dumpfile-pmb');
 
readAndDump_m3u8(inputFile, function report(err, json) {
  if (err) { throw err; }
  if (json.substr(0, 1) !== '{') { throw new Error('Expected a JSON object'); }
  console.log(json);
});
$ m3u8parse-dumpfile-pmb streams.m3u8 | grep -m 1 -C 2 -Fe e-band
    { "info"{
        "bandwidth""1322894",
        "average-bandwidth""568881",
        "codecs""\"avc1.64001f,mp4a.40.2\"",
        "resolution""1280x720",

Known issues

  • Needs more/better tests and docs.

 

License

ISC

Readme

Keywords

Package Sidebar

Install

npm i m3u8parse-dumpfile-pmb

Weekly Downloads

1

Version

0.1.0

License

ISC

Last publish

Collaborators

  • mk-pmb