{"_id":"@artrix909/hls-dl","_rev":"3-a0beab14a499f49afa6be703130c7103","name":"@artrix909/hls-dl","dist-tags":{"latest":"0.2.2"},"versions":{"0.2.0":{"name":"@artrix909/hls-dl","version":"0.2.0","description":"Downloads HTTP live/archived stream (m3u, m3u8, mpd)","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/Artrix9095/hls-dl.git"},"keywords":["http","live","stream","hls","m3u","m3u8","mpd","mpeg-dash","live-stream","download"],"author":{"name":"Artrix"},"license":"MIT","bugs":{"url":"https://github.com/Artrix9095/hls-dl/issues"},"homepage":"https://github.com/Artrix9095/hls-dl#readme","dependencies":{"sax":"^1.2.4"},"gitHead":"11c06f1134d465253af00c4ab30a56a268e358e8","_id":"@artrix909/hls-dl@0.2.0","_nodeVersion":"17.1.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-SgDty1y82+UzY8wy3+KHf7ohJWXa8gcmzjYlAIYE7tyYSCiasEWuxy1SspOOmWUq2HCeJ5sona83z6NCJ+xraQ==","shasum":"55586de2349c4f6a53ad66c892b25b69f2461b8d","tarball":"https://registry.npmjs.org/@artrix909/hls-dl/-/hls-dl-0.2.0.tgz","fileCount":9,"unpackedSize":21296,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKpldACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrrsg/+IvJOo0YmOr9XJkS6KkfxbcXKmcCTYFQO5dBBi9+ICTMb18k4\r\nBNA6jNqNzoUNLZET2it5ClLeL7mD7xClvIdVhyvysOdzWFiJWTAFQONwUuLc\r\nm9fOf3s4FlM/SroyLC1leAkdVSn5CpEZH16UZtVuK6B3H1/WvacxpCO7d9ad\r\nyp27JtpNPjslXu+iFKOQF/M85PAPTZNfEJQIKGkpR74qqHxjrUvk9LN/eI8I\r\nnnBXmI0uGz8P76zWfmmiI726GKqp5N3ZMXowBCortSp1mP7DQdutyyBU9MP3\r\n7ivjIPTaI0ZammG4sReBLnQdr2vra+xfgEkKkEQ1aNK+sd3jMUVLWlOGCbtL\r\nfxWAHFY6RuVawqTZOvOtaxPWJRWiA1SCVZu+k+7rQmz0Sp8B6IHQoehDMHQ2\r\nOus86PCOtMWDjZE9IKl1Q9UFkDvH/1pjB7nw0cL0Swhi8gaFi8eQqlhMRrOO\r\n90boHGA+XIQn4Y4LUpz3McbrmST3tPiQsqbvQLvyvpGUI5O3kQK84bq1RD+T\r\nFsSjQ5n3xbFHFrluFLmilch6Z5R5dhpReYlJydU6iYiDud09z0/t21lGAYYC\r\nwMr4Xj4yPd4V+abQqluHmk5Jx4FgQhjCh0CLiUxBD5hhcAuEw6UbJSLVVjog\r\nLxflL60Ry/rzgmeKKcQ+FCboCKZ600VbT94=\r\n=WKw3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCIcfttkq/H4vQBK8l2bfZkpFvW0nPwtNfAuV4OR7HQgAIhAOBDnL57+ptUCddPPPVINTL260Lf9+KWNImtaDp23OVP"}]},"_npmUser":{"name":"artrix9095","email":"sefu786@outlook.com"},"directories":{},"maintainers":[{"name":"artrix9095","email":"sefu786@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hls-dl_0.2.0_1646958941320_0.07590109555152758"},"_hasShrinkwrap":false},"0.2.1":{"name":"@artrix909/hls-dl","version":"0.2.1","description":"Downloads HTTP live/archived stream (m3u, m3u8, mpd)","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/Artrix9095/hls-dl.git"},"keywords":["http","live","stream","hls","m3u","m3u8","mpd","mpeg-dash","live-stream","download"],"author":{"name":"Artrix"},"license":"MIT","bugs":{"url":"https://github.com/Artrix9095/hls-dl/issues"},"homepage":"https://github.com/Artrix9095/hls-dl#readme","dependencies":{"sax":"^1.2.4"},"gitHead":"11c06f1134d465253af00c4ab30a56a268e358e8","_id":"@artrix909/hls-dl@0.2.1","_nodeVersion":"17.1.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-f3hqoHCwEhyzpDc+sZu0LwBh5fDHZlq+d4QwqSic3NZYNQHpgx2M4PaBp1WjiJQIOuFJe6iiizUtflJgj1grFA==","shasum":"c6725a75bef90c066f293d731b3b6ccbdad85066","tarball":"https://registry.npmjs.org/@artrix909/hls-dl/-/hls-dl-0.2.1.tgz","fileCount":9,"unpackedSize":21417,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKppvACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrgHA//VGAf5Ose/0vCWQ64/rzltC5AVUR0FV63k3+voC8udgV7JwNO\r\nQn7j2AXD6yx5wtuNk7fEC5Na57Qu2jNNHhL2W8+xOHV+13CUy3kZzidKZK7n\r\nx0H0QC1E+MqPbsb2r37gJW4QLZVkFHnYRX3aTOm1Gq06cwQhKm+XuBkOZOw+\r\nDy8TtoSjjLp8fjsNMnHX9fJNqh6eoMjp2IiPeJF9gpmQxI7GX+1iP9aX9Hep\r\nFDXTCSJNe/771nFaiYul05cObSg5IKFEKygSNX05v8mfll35Ax0qPdSAywN7\r\nVIfmROgjTwlALU+/5YXtosn977idAYFFwmIici7zWDdoI+ULYOz82hrbZIUA\r\nKqq7DsPXTcV+LywtOMfYjWDyN3ExzbBrWrn27/s29UNiLwQGz14mTJsqj5XH\r\nvvA8udtgslKD0AfOamNNVYAkuBD4tdX7L2DIVeEweREoneJ5xtdxDQNPMkq/\r\nhDKEF1R+c5ZYZV5v8i7t7CO9xGxF8DCo9JtF1ULW/jkJsDp+N2cmi5ieB0fl\r\nHG40IlUsn4ug4D16RmuCJqwM1JNCejiV2ERNLLg4l3MiObgQ8rXGd/QG4qdr\r\ncFM4QKS4Y5lPKjCFkNb12mNn517TbR4YuKx9FRe2H1jbzN+vBJZeegJUbfdV\r\n5CrHB/y7Q/T3ap7rwe6yLgb7cipySRtSZyM=\r\n=lxal\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3li0Ehd5bQdgFv8jTVnsPcBqHDJ3QgRyRQbov2AQhUAiAjmvavP4kqWk4Kz9MJmXwfAfZeU+EcMb4dpfl5dqdV5w=="}]},"_npmUser":{"name":"artrix9095","email":"sefu786@outlook.com"},"directories":{},"maintainers":[{"name":"artrix9095","email":"sefu786@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hls-dl_0.2.1_1646959215320_0.9499943182696344"},"_hasShrinkwrap":false},"0.2.2":{"name":"@artrix909/hls-dl","version":"0.2.2","description":"Downloads HTTP live/archived stream (m3u, m3u8, mpd)","main":"index.js","types":"index.d.ts","repository":{"type":"git","url":"git+https://github.com/Artrix9095/hls-dl.git"},"keywords":["http","live","stream","hls","m3u","m3u8","mpd","mpeg-dash","live-stream","download"],"author":{"name":"Artrix"},"license":"MIT","bugs":{"url":"https://github.com/Artrix9095/hls-dl/issues"},"homepage":"https://github.com/Artrix9095/hls-dl#readme","dependencies":{"sax":"^1.2.4"},"gitHead":"7101861b65801990519bcf37333f69982a248b77","_id":"@artrix909/hls-dl@0.2.2","_nodeVersion":"17.1.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Y2B20H8cinP8DbluJXE5mcp2NKPlIjb48NWtQ7aI0q45tifETELgtgWrJ14dzxTF8sJmpu4RrZ5I/akkXyMgTA==","shasum":"070d51d0a9b820c7cda9108cbb6dee27e0d5820c","tarball":"https://registry.npmjs.org/@artrix909/hls-dl/-/hls-dl-0.2.2.tgz","fileCount":9,"unpackedSize":21453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiKpwmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmolvA//V0140dYpfCYW0uP399eziYTmdgEHWU8k2hLDtF54Ljv3GTmI\r\nh9d/DapFlmZidr8LJKAIDC1GGfr+4OYBx1AjSnOYPgf7CvaCWuwEj5pX7HrW\r\n0mpAd+nID14qMo3h4QyK0x/IqxPZ2RBNIS3I9ot2HuiWx0xePqhcybEvSi/a\r\nxj69QyLlwMiaYSf1NdZDlMW7oV1et6QcD2vnnsZyD3CFQQB/DAywc/u6dszk\r\nqsiTr3OCfokzQ6u2G8gigag78PXF2dWRhwBJQsD7f9zGA8GeHcDbX9Lqohvg\r\nvjBNxJMemi2nyaGAvQkrouuYY8MuGsWaAJkRDQwAWZgKgJs/DZt5CBFFr9pq\r\nhf27wk2JTdcK144K9izcVMzJobMkEy+crzVbYmrIn5zMrB2pwNS2ASxZ/2CA\r\nenPi++zDEVQrpZH6wp1a5oJbpIZlEMKRmtahAKAW+HNSQaxYU1xUkF2ONzFk\r\naxGaysovZPsc28jresHaFYoXMhUS9sK1/QjG0ppdWRY6NtylO/UGapPgkAvM\r\nL9OYY4P1vuP2LXLzopn5U2bOKSS2ijZTS5+BSANFYkhYTA6kOglL+OYFjgVK\r\n8uUOtbCeoibxySJ363kcBk4XDGora9oEcD9muavq+Ru3oMshWIM0gyzTfXFI\r\npOiVgKaUU0RFwL1CFXoqBaWCbxcmpYE3bFc=\r\n=uDwc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1Xub/P8f6l5OW5k1VCet+2inbFa/WgCxzsk2cgPZRpQIhAIPvvfoSmHTCBNOf7aS+PEHvkV65fX3/54mM+8L7DvFL"}]},"_npmUser":{"name":"artrix9095","email":"sefu786@outlook.com"},"directories":{},"maintainers":[{"name":"artrix9095","email":"sefu786@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hls-dl_0.2.2_1646959654047_0.08345225814496082"},"_hasShrinkwrap":false}},"time":{"created":"2022-03-11T00:35:41.253Z","0.2.0":"2022-03-11T00:35:41.500Z","modified":"2022-04-04T15:39:40.193Z","0.2.1":"2022-03-11T00:40:15.471Z","0.2.2":"2022-03-11T00:47:34.279Z"},"maintainers":[{"name":"artrix9095","email":"sefu786@outlook.com"}],"description":"Downloads HTTP live/archived stream (m3u, m3u8, mpd)","homepage":"https://github.com/Artrix9095/hls-dl#readme","keywords":["http","live","stream","hls","m3u","m3u8","mpd","mpeg-dash","live-stream","download"],"repository":{"type":"git","url":"git+https://github.com/Artrix9095/hls-dl.git"},"author":{"name":"Artrix"},"bugs":{"url":"https://github.com/Artrix9095/hls-dl/issues"},"license":"MIT","readme":"# hls-dl\r\n\r\n###### [Getting Started](#getting-started) | [Usage](#usage) | [API](#api) | [Future](#future)\r\n\r\n> hls-dl is a NodeJS module that provides the ability to download HTTP Live Stream playlists, particularly M3U/M3U8 and MPEG-DASH playlist files. hls-dl is capable of downloading media and master streams, as well as actively live streams.\r\n\r\n##### Features\r\n\r\nCapturing media from live streams is not always a straightforward task. hls-dl simplifies this process and provides the following features:\r\n\r\n* Supports http, https, and file:// protocols\r\n* Blazing fast speeds - **average of 1.5-4x** faster than other HTTP live-stream downloading modules\r\n* Downloads M3U/M3U8 media stream playlists\r\n* Provides stream object to easily retrieve output data\r\n* Simplified stream events for additional insight\r\n\r\n\r\n<!-- [START gettingstarted] -->\r\n\r\n## Getting Started\r\n\r\n### Install\r\n\r\nTo include hls-dl in your project, run the following command:\r\n\r\n```bash\r\nnpm install @artrix909/hls-dl\r\n```\r\n\r\nor if you prefer using yarn:\r\n\r\n```bash\r\nyarn add @artrix909/hls-dl\r\n```\r\n\r\n<!-- [END gettingstarted] -->\r\n\r\n<!-- [START usage] -->\r\n\r\n## Usage\r\n\r\nhls-dl provides a readable stream object to download any data returned from a M3U/M3U8 media playlist file. This data can be be written to a file easily using Node's `fs` module. A number of examples are provided below to demonstrate capture from playlists that are located in the file system as well as online.\r\n\r\n**Example** - Downloading an m3u8 media playlist stream and piping to a writable stream\r\n\r\nSave file as example.js\r\n\r\n```js\r\nconst hlsdl = require('hls-dl');\r\nconst fs = require('fs');\r\n\r\nconst httpstream = hlsdl('https://example.com/path/to/your/m3u8/file.m3u8', { headers: { 'Cache-Control': 'no-cache' } });\r\nhttpstream.pipe(fs.createWriteStream('save_file_https.mp4'));\r\n\r\n// additionally, a playlist file in the file system can be loaded as well\r\nconst filestream = hlsdl('file:///User/name/path/to/your/m3u8/file.m3u8');\r\nfilestream.pipe(fs.createWriteStream('save_file_local.mp4'));\r\n```\r\n\r\nThen execute the script using\r\n\r\n```bash\r\nnode example.js\r\n```\r\n\r\nhls-dl will download all segments and begin piping to the writable stream after segment downloads have completed. \r\n\r\n**Example** - Capturing events emitted from the stream\r\n\r\n```js\r\nconst hlsdl = require('hls-dl');\r\nconst fs = require('fs');\r\n\r\nconst stream = hlsdl('https://example.com/path/to/your/m3u8/file.m3u8');\r\nstream.pipe(fs.createWriteStream('save_file.mp4'));\r\n\r\nstream.on('status', info => {\r\n    // do something with info\r\n    console.log(info);\r\n});\r\n```\r\n\r\nThroughout the retrieval process, multiple events are emitted from the stream to indicate overall progression in the playlist capture. Additional events can be found in the [API](#api) section below. \r\n\r\n<!-- [END usage] -->\r\n\r\n<!-- [START api] -->\r\n\r\n## API\r\n\r\n### Functions\r\n\r\n#### hlsdl(path, [options])\r\n- `path` <[String]> a path pointing to a **file**, **http**, or **https** link\r\n- `options` <[Object]> configurable options for the stream to use\r\n    - `parser` <[String]> Specifies which parser to use, either `m3u` or `mpd`\r\n    - `timeout` <[Number]> Number of milliseconds to wait before considering a segment fetch as timed out\r\n    - `headers` <[Object]> A object of headers used for fetching the file\r\n- returns <[Stream.Readable]> A readable stream that will output playlist segment data\r\n\r\nThis method will immediately begin capture of the specified playlist and return the readable stream\r\n\r\n### Events\r\n\r\n#### event: 'segment'\r\n\r\n- `info` <[Object]> returns an object of information regarding a segment\r\n    - `id` <[Number]> the segment's internal id\r\n    - `url` <[String]> path to the segment's origin\r\n    - `size` <[Number]> the size of the segment's buffer\r\n    - `totalsegments` <[Number]> the total number of segments\r\n\r\nEmitted when a new segment has been saved and pushed to the readable stream. Returns an object.\r\n\r\n#### event: 'status'\r\n\r\n- `status` <[String]> returns a string of information\r\n\r\nEmitted throughout different points of the script being run including: parsing the playlist, downloading segments, download completion, pushing segments to the stream, and notifying playlist completion\r\n\r\n#### event: 'issue'\r\n\r\n- `issue` <[String]> returns a string of information\r\n\r\nEmitted when an error or issue occurs, but does not break the script. Any point in which an issue is emitted, a self-fixing mechanism is triggered to resolve the issue.\r\n\r\n<!-- [END api] -->\r\n\r\n<!-- [START future] -->\r\n\r\n## Future\r\n\r\n### Current Tasks\r\n\r\nDue to the package being actively developed, there are a number of items in the development backlog which are currently being worked on. A list of these features is provided below:\r\n\r\n* MPD playlist download\r\n* MPD live playlists\r\n\r\n### Future Tasks\r\n\r\nA number of features that would be nice to complete but are not considered a priority to develop are provided below. If there are any requests to complete these features sooner, they may be moved into the current iteration. These features are listed below:\r\n\r\n- M3U master playlists\r\n- M3U encrypted media streams\r\n\r\n<!-- [END future] -->\r\n\r\n[Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type \"Number\"\r\n[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object \"Object\"\r\n[String]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type \"String\"\r\n[Stream.Readable]: https://nodejs.org/api/stream.html#stream_readable_streams \"Readable Stream\"","readmeFilename":"README.md"}