{"_id":"@ahmedrowaihi/m3u8-to-mp4","_rev":"5-fa923c3175e2b54bc713e6b038a92baf","time":{"created":"2022-12-01T15:48:57.209Z","1.0.0":"2022-12-01T15:22:17.572Z","modified":"2022-12-02T13:39:48.235Z","1.0.1":"2022-12-01T15:30:08.400Z","1.0.2":"2022-12-01T15:48:57.458Z","1.1.0":"2022-12-02T13:39:48.154Z"},"name":"@ahmedrowaihi/m3u8-to-mp4","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.2":{"name":"@ahmedrowaihi/m3u8-to-mp4","version":"1.0.2","description":"This module helps you convert an M3U8 file to an MP4 file easily using ffmpeg/node.js","main":"index.js","scripts":{"test":"node index.test.js","prepublish":"npm test"},"repository":{"type":"git","url":"git+https://github.com/ahmedrowaihi/m3u8-to-mp4.git"},"keywords":["m3u8","to","mp4","converter","nodejs"],"author":{"name":"Ahmed Rowaihi"},"license":"MIT","bugs":{"url":"https://github.com/ahmedrowaihi/m3u8-to-mp4/issues"},"homepage":"https://github.com/ahmedrowaihi/m3u8-to-mp4#readme","dependencies":{"fluent-ffmpeg":"^2.1.2","fs":"0.0.1-security"},"gitHead":"d985288bef1fd031a75867972980dbf72f8b4be3","_id":"@ahmedrowaihi/m3u8-to-mp4@1.0.2","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"integrity":"sha512-XKeI5SsAALNrEqkSS41KN6/r9R0s/AxUEzZjbabpuFZl78gNpAe8BsfgKj2DWtDL7aP0kuji0W9xzM9817gDAg==","shasum":"75201134ed33e191adfb215f36c325e627af8811","tarball":"https://registry.npmjs.org/@ahmedrowaihi/m3u8-to-mp4/-/m3u8-to-mp4-1.0.2.tgz","fileCount":5,"unpackedSize":7921,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBrU/jeZ+pubudiyshFQRFJgnvvq9JMmkrExmuUaA/+wIhANzQ23hLcaKGTU7JnFdmjKINKKP6b6GgvZqvmvEVswPj"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjiMzpACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpoBBAAmbvk5IbZVm/Ao1rIUb8HgorudS/kaAAsB2oFZvgK5kTHTz0S\r\nVU7MfdxoBlgpPRQKhyen7xTM8Yn1fxbYhKiJ/+Dv+h7r4Yf2TWP4Jg53llBP\r\nA02PoQaFA9c9GxuLuXAFYlwhdKQg/+IM+I3T0frPa6GiM5TMwN8ZBmc6dcRK\r\nD+RavQz5HXZtrCshmtkz20E9rC5jwg86141nxCwlEhUI653k5umkVrK88Lu3\r\n7HhVCtxRlWqUih7Cr/XeH2A4Ej4bSTx/8v3SeWTGaCZ9n4zxWauDn1NuCzkh\r\nR2SnHXqZJpCYNwB8bLGKNRHDwNZ+xBZWbn/ORLF1tX906gWrptpxHG+y3wjQ\r\nNqcxzWQphRDkMgS+ySdsAltu/19R8LBTXKL2hYCr6GCj1BeEvvDmuG318T7w\r\npnFakNXEJpk6kCYVWXJh43Zj37CA5T1Y5B3DJT2DNn224k6P6Rer66FeFjk1\r\ncHfDxFnWfyLJxV3TAn1aoL2kVBq236TqIC4YWyBF7NdDTXZVZxqrwjBXSoBm\r\nEUW5B7Wlw8BUA0rGLYPzo5uNvVTI/cqlFy9i1gdnHU/ZGAAplJjCRBkWTUVB\r\nr0ciKJsAtM6Q9t3tGHrHkq/xkudLoRBVXyHVQvr0PjJSZAJCdmPWtNOjyMDb\r\ngsfrudTyFk4iAUNH10qGNhW7tw0AenuzhXg=\r\n=JGNo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ahmedrowaihi","email":"ahmedrowaihi1@gmail.com"},"directories":{},"maintainers":[{"name":"ahmedrowaihi","email":"ahmedrowaihi1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/m3u8-to-mp4_1.0.2_1669909737277_0.002157948673384258"},"_hasShrinkwrap":false},"1.1.0":{"name":"@ahmedrowaihi/m3u8-to-mp4","version":"1.1.0","description":"This module helps you convert an M3U8 file to an MP4 file easily using ffmpeg/node.js","main":"index.js","scripts":{"test":"node index.test.js","prepublish":"npm test"},"repository":{"type":"git","url":"git+https://github.com/ahmedrowaihi/m3u8-to-mp4.git"},"keywords":["m3u8","to","mp4","converter","nodejs"],"author":{"name":"Ahmed Rowaihi"},"license":"MIT","bugs":{"url":"https://github.com/ahmedrowaihi/m3u8-to-mp4/issues"},"homepage":"https://github.com/ahmedrowaihi/m3u8-to-mp4#readme","dependencies":{"fluent-ffmpeg":"^2.1.2","fs":"0.0.1-security"},"gitHead":"231e1e8ef01d0a9ee2ce2c786eda9aa8817844bc","_id":"@ahmedrowaihi/m3u8-to-mp4@1.1.0","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-m8SIFGG7x+76KpdSBS/IBbev/Pq8a25R2TS5ulX6jCVGpGlE5yM4iqPCzvhXRUk8YFebf4rpsnPRMBpdU8i1Zw==","shasum":"620b5ea260e529c823e57e0262f04d173d6e2235","tarball":"https://registry.npmjs.org/@ahmedrowaihi/m3u8-to-mp4/-/m3u8-to-mp4-1.1.0.tgz","fileCount":6,"unpackedSize":8227,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDimfrzhv0cPcXAHd3I8WVwsomudIIkPMAA9iwTTeSXngIgYbRnBkjlcBz/FCNU1PMF0FsgtzNtECU3RA033Gj53gQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjigAkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqc4g//X76MdM92InbIF3kXJnGa1Q4POsulBcV5I+Oz6eoKdNZOW6NF\r\n3jdgieeMkrj5/UqYEIC6A1iC4C0KEzimcJotSeZ5vVsCi3NAFIDu99JWG56n\r\nQOTxEn69dGrJu93KmEDKUWD30+ZW7trnbBMRnYigX54Kc6HgWPOonFSz4AXe\r\npet4pXd+NoeRyRp0gi9P1SZjy9g7BI5e4IyoBzhpHhrtfrByR68rpuJ/8kP1\r\ndl/qH/a5NOnCHQ1qWm7DzbhHuFo44leCcQIZx2hQOFP1y6AkSZWcJH8XXXBW\r\nBKjRPOfzVw/YeJPLx+9sWiKaPMuauKmU/5VeV1JNPMOtu/o3DG37/QPYHLyf\r\nHn7rZ9v22uN+CfNKQTYrVQAySwQaPrd8o4GCTmt18LYUyKcvOPMu9+KJ+X5M\r\nN5QYLf09oXU1bFoMTuGn1ckWlkrK+QbUJNgusvDFyyu4hkwfh4TcFIMubsLR\r\ny6Av4nt7oUlpWfzjb6lhEThUdaXgjHH9+BUQOupUSBfkOeOGHdJwAWZhPwAz\r\nngTJHRy8RildyYVdkQJYZySLPKnynpKQrF8h17Kl+wHTmpn/DbzpyJuTiAey\r\n6p2WKv46ho1No0n0qD6mqYwPmGSFYBlR6IVGMjrqc5eqFtsk6F8n6aTx3xpq\r\nUpyRjXyBxpFlZ6EBogorJbMm99PPxPV0XRw=\r\n=cndR\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ahmedrowaihi","email":"ahmedrowaihi1@gmail.com"},"directories":{},"maintainers":[{"name":"ahmedrowaihi","email":"ahmedrowaihi1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/m3u8-to-mp4_1.1.0_1669988387954_0.5001736484555608"},"_hasShrinkwrap":false}},"maintainers":[{"name":"ahmedrowaihi","email":"ahmedrowaihi1@gmail.com"}],"description":"This module helps you convert an M3U8 file to an MP4 file easily using ffmpeg/node.js","homepage":"https://github.com/ahmedrowaihi/m3u8-to-mp4#readme","keywords":["m3u8","to","mp4","converter","nodejs"],"repository":{"type":"git","url":"git+https://github.com/ahmedrowaihi/m3u8-to-mp4.git"},"author":{"name":"Ahmed Rowaihi"},"bugs":{"url":"https://github.com/ahmedrowaihi/m3u8-to-mp4/issues"},"license":"MIT","readme":"# m3u8-to-mp4 - Convert m3u8 to mp4\n\nThis module is forked from [m3u8-to-mp4](\n  https://github.com/furkaninanc/m3u8-to-mp4) created by [furkaninanc](https://github.com/furkaninanc).\n\nit's intended to helps you convert an M3U8 file to an MP4 file easily using ffmpeg/node.js\n\n### This Fork Supports passing headers for remote m3u8 file fetching \n## Installation\n\nThis module can be installed via npm. You will also need to install [ffmpeg](https://ffmpeg.org/) for this module to work:\n\n```sh\n$ sudo apt install ffmpeg\n$ npm install --save m3u8-to-mp4\n```\n\n**Windows** users, you can download ffmpeg from [here](https://ffmpeg.org/download.html#build-windows)\n\n**Mac** users, you can download ffmpeg from [here](https://ffmpeg.org/download.html#build-mac)\n\n## Usage\n\n```js\nvar m3u8ToMp4 = require(\"m3u8-to-mp4\");\nvar converter = new m3u8ToMp4();\n```\n\n### Functions\n\n#### converter.setHeaders(headers) - optional\n\n- **headers:** An object containing the headers to be used in the request to the M3U8 file.\n\n#### converter.setInputFile(filename)\n\n- **filename:** M3U8 file path. You can use remote URL\n\n#### converter.setOutputFile(filename)\n\n- **filename:** Output file path. Has to be local :)\n\n#### converter.start()\n\n```js\nvar m3u8ToMp4 = require(\"m3u8-to-mp4\");\nvar converter = new m3u8ToMp4();\n\n(async function() {\n  await converter\n    .setInputFile(\"https://<URL_OF_THE_WEBSITE>/<PATH_TO_THE_M3U8_FILE>\")\n    .setOutputFile(\"dummy.mp4\")\n    .start();\n\n  console.log(\"File converted\");\n})();\n```\n\nif you want to use headers, you can use `setHeaders` function.\n\n```js\nvar m3u8ToMp4 = require(\"m3u8-to-mp4\");\nvar converter = new m3u8ToMp4();\n (async function() {\n  await converter\n    .setInputFile(\"https://<URL_OF_THE_WEBSITE>/<PATH_TO_THE_M3U8_FILE>\")\n    .setOutputFile(\"dummy.mp4\")\n    .setHeaders({\n      \"Authorization\": \"Bearer XXXXXX\",\n      \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36\",\n})\n    .start();\n\n  console.log(\"File converted\");\n\n )()\n```\n\nor if you want to use it with _.then()_ instead of async/await:\n\n```js\nvar m3u8ToMp4 = require(\"m3u8-to-mp4\");\nvar converter = new m3u8ToMp4();\n\nconverter\n  .setInputFile(\"https://<URL_OF_THE_WEBSITE>/<PATH_TO_THE_M3U8_FILE>\")\n  .setOutputFile(\"dummy.mp4\")\n  .start()\n  .then(() => {\n    console.log(\"File converted\");\n  });\n```\n","readmeFilename":"README.md"}