{"_id":"@conpago/video-thumbnail-generator","_rev":"7-30c272267096b04f72cfe638f65a32fd","name":"@conpago/video-thumbnail-generator","dist-tags":{"latest":"2.0.2"},"versions":{"2.0.0":{"name":"@conpago/video-thumbnail-generator","version":"2.0.0","license":"MIT","_id":"@conpago/video-thumbnail-generator@2.0.0","maintainers":[{"name":"alex_conpago","email":"alex@conpago.com.au"},{"name":"etonello_conpago","email":"emanuele@conpago.com.au"}],"homepage":"https://github.com/conpagoaus/video-thumbnail-generator#readme","bugs":{"url":"https://github.com/conpagoaus/video-thumbnail-generator/issues"},"dist":{"shasum":"ec8fd76f793c60b5e78aa3b323ca9c2ca17c444f","tarball":"https://registry.npmjs.org/@conpago/video-thumbnail-generator/-/video-thumbnail-generator-2.0.0.tgz","fileCount":5,"integrity":"sha512-JQmT2CxsJKp46/BapTIaADUyoIpAZjL7ij3H9jwS6qlzaZzuyFNIkWYYqX4weVuAkCzad9y8UvbmFBlZsE7REw==","signatures":[{"sig":"MEQCIAYdOHCYely7mXP3Ck+ZTgsHpigfaQ5UbF6o1Jvq6PmtAiB2sTUD5eP7RzD8VNyXTsvbGsObjFx1qaShKMEypd8UxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18229},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"8f7a2b1332b5e8b80ac324582d64aa7dc524c39c","private":false,"scripts":{"test":"vitest run","compile":"tsc -p tsconfig.json","prepare":"yarn compile","publish":"npm publish --access public","postinstall":"npx tsc -p tsconfig.json"},"_npmUser":{"name":"etonello_conpago","email":"emanuele@conpago.com.au"},"repository":{"url":"git+https://github.com/conpagoaus/video-thumbnail-generator.git","type":"git"},"_npmVersion":"9.5.0","description":"Package to generate a thumbail for an mp4 video","directories":{},"_nodeVersion":"18.15.0","dependencies":{"lodash":"^4.17.21","moment":"2.29.4","rimraf":"^5.0.1","fluent-ffmpeg":"2.1.2","@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.7","sinon":"15.1.0","eslint":"^8.41.0","vitest":"^0.31.2","ts-node":"^10.9.1","prettier":"^2.8.8","sinon-chai":"3.7.0","typescript":"^5.0.4","@types/node":"^20.2.5","@types/sinon":"^10.0.15","@types/lodash":"^4.14.195","@types/fluent-ffmpeg":"^2.1.21","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.7","@typescript-eslint/eslint-plugin":"^5.59.7"},"_npmOperationalInternal":{"tmp":"tmp/video-thumbnail-generator_2.0.0_1685511615718_0.1895096189217449","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@conpago/video-thumbnail-generator","version":"2.0.1","license":"MIT","_id":"@conpago/video-thumbnail-generator@2.0.1","maintainers":[{"name":"alex_conpago","email":"alex@conpago.com.au"},{"name":"etonello_conpago","email":"emanuele@conpago.com.au"}],"homepage":"https://github.com/conpagoaus/video-thumbnail-generator#readme","bugs":{"url":"https://github.com/conpagoaus/video-thumbnail-generator/issues"},"dist":{"shasum":"733b9c8141ad86a6ded411d99c74eefd9262e18f","tarball":"https://registry.npmjs.org/@conpago/video-thumbnail-generator/-/video-thumbnail-generator-2.0.1.tgz","fileCount":14,"integrity":"sha512-P01VIxC0GQK7nx12uBBWuTErEI1m8E2JX1FGPFudFKDSk/j4CG4b/67Z+C0whv2+NS/lQsFQ/yJVY1UXJ/d/Sg==","signatures":[{"sig":"MEUCIQClAyreP9ZF6MZpmvDqo1OSa4G1IJhOV6jLcgCGL7PiTAIgetamLmNQauKpG7tXzbrf7M7mdZfVRud+nioV07Es5LU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384341},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"8f7a2b1332b5e8b80ac324582d64aa7dc524c39c","private":false,"scripts":{"test":"vitest run","compile":"tsc -p tsconfig.json","prepare":"yarn compile","publish":"npm publish --access public","postinstall":"npx tsc -p tsconfig.json"},"_npmUser":{"name":"etonello_conpago","email":"emanuele@conpago.com.au"},"repository":{"url":"git+https://github.com/conpagoaus/video-thumbnail-generator.git","type":"git"},"_npmVersion":"9.5.0","description":"Package to generate a thumbail for an mp4 video","directories":{},"_nodeVersion":"18.15.0","dependencies":{"lodash":"^4.17.21","moment":"2.29.4","rimraf":"^5.0.1","fluent-ffmpeg":"2.1.2","@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.7","sinon":"15.1.0","eslint":"^8.41.0","vitest":"^0.31.2","ts-node":"^10.9.1","prettier":"^2.8.8","sinon-chai":"3.7.0","typescript":"^5.0.4","@types/node":"^20.2.5","@types/sinon":"^10.0.15","@types/lodash":"^4.14.195","@types/fluent-ffmpeg":"^2.1.21","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.7","@typescript-eslint/eslint-plugin":"^5.59.7"},"_npmOperationalInternal":{"tmp":"tmp/video-thumbnail-generator_2.0.1_1685512825092_0.9208314862412705","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@conpago/video-thumbnail-generator","version":"2.0.2","license":"MIT","_id":"@conpago/video-thumbnail-generator@2.0.2","maintainers":[{"name":"alex_conpago","email":"alex@conpago.com.au"},{"name":"etonello_conpago","email":"emanuele@conpago.com.au"}],"homepage":"https://github.com/conpagoaus/video-thumbnail-generator#readme","bugs":{"url":"https://github.com/conpagoaus/video-thumbnail-generator/issues"},"dist":{"shasum":"93159563a7d0ccf7cf29a8c3d576835a948fa302","tarball":"https://registry.npmjs.org/@conpago/video-thumbnail-generator/-/video-thumbnail-generator-2.0.2.tgz","fileCount":14,"integrity":"sha512-MvcIFu7BglR7pIkedYsNBIKcCinnL3FmQfDYIyuYpRNad58Fn9XbI5Gom9gZpFiMAXW5nHm8MLwKuw3alPS+Iw==","signatures":[{"sig":"MEUCIEqiNZW7YYdwuvi6sZksCnU0pxg+j9SCGezvibCvjtsqAiEAsuAC5WRRXJEfuT+5/yvVEIwEe72nkUMTQO8lu9WQugE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":384294},"main":"dist/index.js","types":"./dist/index.d.ts","gitHead":"8f7a2b1332b5e8b80ac324582d64aa7dc524c39c","private":false,"scripts":{"test":"vitest run","compile":"tsc -p tsconfig.json","prepare":"yarn compile","publish":"npm publish --access public"},"_npmUser":{"name":"etonello_conpago","email":"emanuele@conpago.com.au"},"repository":{"url":"git+https://github.com/conpagoaus/video-thumbnail-generator.git","type":"git"},"_npmVersion":"9.5.0","description":"Package to generate a thumbail for an mp4 video","directories":{},"_nodeVersion":"18.15.0","dependencies":{"lodash":"^4.17.21","moment":"2.29.4","rimraf":"^5.0.1","fluent-ffmpeg":"2.1.2","@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.3.7","sinon":"15.1.0","eslint":"^8.41.0","vitest":"^0.31.2","ts-node":"^10.9.1","prettier":"^2.8.8","sinon-chai":"3.7.0","typescript":"^5.0.4","@types/node":"^20.2.5","@types/sinon":"^10.0.15","@types/lodash":"^4.14.195","@types/fluent-ffmpeg":"^2.1.21","eslint-config-prettier":"^8.8.0","eslint-plugin-prettier":"^4.2.1","@typescript-eslint/parser":"^5.59.7","@typescript-eslint/eslint-plugin":"^5.59.7"},"_npmOperationalInternal":{"tmp":"tmp/video-thumbnail-generator_2.0.2_1685513115608_0.3617630133951879","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-05-31T05:40:15.647Z","modified":"2025-06-27T05:12:56.191Z","2.0.0":"2023-05-31T05:40:15.859Z","2.0.1":"2023-05-31T06:00:25.453Z","2.0.2":"2023-05-31T06:05:15.860Z"},"bugs":{"url":"https://github.com/conpagoaus/video-thumbnail-generator/issues"},"license":"MIT","homepage":"https://github.com/conpagoaus/video-thumbnail-generator#readme","repository":{"url":"git+https://github.com/conpagoaus/video-thumbnail-generator.git","type":"git"},"description":"Package to generate a thumbail for an mp4 video","maintainers":[{"email":"alex@conpago.com.au","name":"alex_conpago"},{"email":"emanuele@conpago.com.au","name":"etonello_conpago"},{"email":"vladimir@conpago.com.au","name":"0xvlado"},{"email":"nihar@conpago.com.au","name":"nihar27_conpago"},{"email":"bishwo@conpago.com.au","name":"bishwoconpago"}],"readme":"# Video Thumbnail Generator\n\n## Quick Start\n\n```js\nimport ThumbnailGenerator from \"@conpagoaus/video-thumbnail-generator\";\n// const ThumbnailGenerator = require('@conpagoaus/video-thumbnail-generator').default;\n\nconst tg = new ThumbnailGenerator({\n  sourcePath: \"/tmp/test.mp4\",\n  thumbnailPath: \"/tmp/\",\n  tmpDir: \"/some/writeable/directory\", //only required if you can't write to /tmp/ and you need to generate gifs\n});\n\nconst thumbs = await tg.generate();\nconsole.log(thumbs);\n// [ 'test-thumbnail-320x240-0001.png',\n//  'test-thumbnail-320x240-0002.png',\n//  'test-thumbnail-320x240-0003.png',\n//  'test-thumbnail-320x240-0004.png',\n//  'test-thumbnail-320x240-0005.png',\n//  'test-thumbnail-320x240-0006.png',\n//  'test-thumbnail-320x240-0007.png',\n//  'test-thumbnail-320x240-0008.png',\n//  'test-thumbnail-320x240-0009.png',\n//  'test-thumbnail-320x240-0010.png' ]\n\nconst thumbPath = await tg.generateOneByPercent(90);\nconsole.log(thumbPath);\n// 'test-thumbnail-320x240-0001.png'\n\nconst thumbPath = await tg.generateGif();\nconsole.log(thumbPath);\n// '/full/path/to/video-1493133602092.gif'\n```\n\n## Options\n\nThere are options that can be passed when generating thumbnails. Both `ThumbnailGenerate.generate(opts)` and `ThumbnailGenerate.generateOneByPercent(number, opts)` can take options. See example below to get screenshots at a resolution of 200x200:\n\n### When generating screenshots/thumbnails\n\n```js\nconst thumbs = await tg.generate({\n  size: \"200x200\",\n});\nconsole.log(thumbs);\n// [ 'test-thumbnail-200x200-0001.png',\n//  'test-thumbnail-200x200-0002.png',\n//  'test-thumbnail-200x200-0003.png',\n//  'test-thumbnail-200x200-0004.png',\n//  'test-thumbnail-200x200-0005.png',\n//  'test-thumbnail-200x200-0006.png',\n//  'test-thumbnail-200x200-0007.png',\n//  'test-thumbnail-200x200-0008.png',\n//  'test-thumbnail-200x200-0009.png',\n//  'test-thumbnail-200x200-0010.png' ]\n```\n\nThe `opts` above can take anything that options in [fluent-ffmpeg's Screenshots allow](https://github.com/fluent-ffmpeg/node-fluent-ffmpeg#screenshotsoptions-dirname-generate-thumbnails)\n\n### When generating gifs\n\n```js\nawait tg.generateGif({\n  fps: 0.75, //how many frames per second you want in your gif\n  scale: 180, //the smaller the number, the smaller the thumbnail\n  speedMultiple: 4, //this is 4x speed\n  deletePalette: true, //to delete the palettefile that was generated to create the gif once gif is created\n});\n```\n\n## Tests\n\n```bash\nyarn test\n```\n","readmeFilename":"README.md"}