Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

m3u8parse-dumpfile-pmb

mk-pmb4ISC0.1.0

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

JSON, m3u8

readme



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