0.1.0 • Published 7 years ago

m3u8parse-dumpfile-pmb v0.1.0

Weekly downloads
4
License
ISC
Repository
github
Last release
7 years ago

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