{"_id":"@bigfootds/nodejs-trickplay","_rev":"4-f029e7cd0838887119e7b256b0235c4f","name":"@bigfootds/nodejs-trickplay","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.1":{"name":"@bigfootds/nodejs-trickplay","version":"0.0.1","keywords":[],"author":{"url":"https://github.com/AlexStormwood","name":"Alex Stormwood","email":"alex@bigfootds.com"},"license":"MIT","_id":"@bigfootds/nodejs-trickplay@0.0.1","maintainers":[{"name":"alexstormwood","email":"alex@bigfootds.com"}],"homepage":"https://github.com/BigfootDS/nodejs-trickplay#readme","bugs":{"url":"https://github.com/BigfootDS/nodejs-trickplay/issues"},"dist":{"shasum":"9cd71fea8c4dabacb258140ab9ae867494a79a26","tarball":"https://registry.npmjs.org/@bigfootds/nodejs-trickplay/-/nodejs-trickplay-0.0.1.tgz","fileCount":24,"integrity":"sha512-vzHaiI2A8qEmzcYhuESZMqJgbb7YK7LTvZOvyaUEnv5Qj91/B2ayObwAKQnWLB9vaNizslif8ZHw/+DuaekxOg==","signatures":[{"sig":"MEUCIQD2WvMB1FuZvId45JKfTuRlEoqt53U+RpT/9PFztbcYpgIgdoNMhYdEpNfFHTHvqbZEterSk/tLKqHm4kUnFQMceus=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3092047},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"a224dbbf49dfe18b2d4add73c0ccf0bcce0358ee","scripts":{"dev":"npm run build && node .sandbox/index.js","build":"tsc"},"_npmUser":{"name":"alexstormwood","email":"alex@bigfootds.com"},"repository":{"url":"git+https://github.com/BigfootDS/nodejs-trickplay.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate trickplay images for a given video file, for usage in NodeJS environments.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"jimp":"^1.6.0","fluent-ffmpeg":"^2.1.3","@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.14.1","@types/fluent-ffmpeg":"^2.1.27"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-trickplay_0.0.1_1745202966486_0.217887682459178","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bigfootds/nodejs-trickplay","version":"0.0.2","keywords":[],"author":{"url":"https://github.com/AlexStormwood","name":"Alex Stormwood","email":"alex@bigfootds.com"},"license":"MIT","_id":"@bigfootds/nodejs-trickplay@0.0.2","maintainers":[{"name":"alexstormwood","email":"alex@bigfootds.com"}],"homepage":"https://github.com/BigfootDS/nodejs-trickplay#readme","bugs":{"url":"https://github.com/BigfootDS/nodejs-trickplay/issues"},"dist":{"shasum":"653b4f881f2450e2bb16dceaba33e8699665304d","tarball":"https://registry.npmjs.org/@bigfootds/nodejs-trickplay/-/nodejs-trickplay-0.0.2.tgz","fileCount":24,"integrity":"sha512-hWhcd6zmZiZqfXZBAJS6/lENYcqdQtgyfaheP0ccL+FWMEsmsaZrAtv88mJg2+YAf03XCKLxjIbj//U6At0IYw==","signatures":[{"sig":"MEUCIByKnOyiBuTT+bNUMeCCCd7IUFAESmAYBy5kHf5fRAyHAiEA1b+Men7FIKYu2Tfp6PYIbrB2BI5h4IpbHBjOkwfHZyU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3092143},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"d4786e1c220efa1c65313d60a0c3d0c27687a832","scripts":{"dev":"npm run build && node .sandbox/index.js","build":"tsc"},"_npmUser":{"name":"alexstormwood","email":"alex@bigfootds.com"},"repository":{"url":"git+https://github.com/BigfootDS/nodejs-trickplay.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate trickplay images for a given video file, for usage in NodeJS environments.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"jimp":"^1.6.0","fluent-ffmpeg":"^2.1.3","@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.14.1","@types/fluent-ffmpeg":"^2.1.27"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-trickplay_0.0.2_1745203242891_0.7092682449750634","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bigfootds/nodejs-trickplay","version":"1.0.1","keywords":[],"author":{"url":"https://github.com/AlexStormwood","name":"Alex Stormwood","email":"alex@bigfootds.com"},"license":"MIT","_id":"@bigfootds/nodejs-trickplay@1.0.1","maintainers":[{"name":"alexstormwood","email":"alex@bigfootds.com"}],"homepage":"https://github.com/BigfootDS/nodejs-trickplay#readme","bugs":{"url":"https://github.com/BigfootDS/nodejs-trickplay/issues"},"dist":{"shasum":"7bf1138065354182aff02f2345e265c5670b8b0c","tarball":"https://registry.npmjs.org/@bigfootds/nodejs-trickplay/-/nodejs-trickplay-1.0.1.tgz","fileCount":24,"integrity":"sha512-Li5SHsCwRdcF7aRz8AVDff5FrKYyo23y51wgpvvzp7oATHC7GmzoBrTDKFWLRJttsFemnOna/ecuq6Pjrx+U5g==","signatures":[{"sig":"MEYCIQDiofOzEAnRKym628ycP+UZEGzdLRleqtyUiJxEQUJQ/QIhAPcdITDvXFY6T7AAhokWlmmCJqAr/XTK5YGD+EkRKciW","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3092431},"main":"dist/index.js","type":"commonjs","types":"dist/index.d.ts","engines":{"node":">=20.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"9bc5a687ceb64837769f99868345cbb731d63a3e","scripts":{"dev":"npm run build && node .sandbox/index.js","build":"tsc"},"_npmUser":{"name":"alexstormwood","email":"alex@bigfootds.com"},"repository":{"url":"git+https://github.com/BigfootDS/nodejs-trickplay.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate trickplay images for a given video file, for usage in NodeJS environments.","directories":{},"_nodeVersion":"20.19.0","dependencies":{"jimp":"^1.6.0","fluent-ffmpeg":"^2.1.3","@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.1.2"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.8.3","@types/node":"^22.14.1","@types/fluent-ffmpeg":"^2.1.27"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-trickplay_1.0.1_1745203447559_0.3133139379820149","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bigfootds/nodejs-trickplay","version":"1.0.2","description":"Generate trickplay images for a given video file, for usage in NodeJS environments.","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"npm run build && node .sandbox/index.js","build":"tsc"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"repository":{"type":"git","url":"git+https://github.com/BigfootDS/nodejs-trickplay.git"},"keywords":["trickplay","video-scrubbing","video-processing","video-preview","video-preview-thumbnails","video scrubbing","video processing","video preview","video preview thumbnails"],"author":{"name":"Alex Stormwood","email":"alex@bigfootds.com","url":"https://github.com/AlexStormwood"},"license":"MIT","type":"commonjs","bugs":{"url":"https://github.com/BigfootDS/nodejs-trickplay/issues"},"homepage":"https://github.com/BigfootDS/nodejs-trickplay#readme","engines":{"node":">=20.0.0"},"devDependencies":{"@types/fluent-ffmpeg":"^2.1.27","@types/node":"^22.14.1","typescript":"^5.8.3"},"dependencies":{"@ffmpeg-installer/ffmpeg":"^1.1.0","@ffprobe-installer/ffprobe":"^2.1.2","fluent-ffmpeg":"^2.1.3","jimp":"^1.6.0"},"_id":"@bigfootds/nodejs-trickplay@1.0.2","gitHead":"dc7d5d19aced8f59ed4c491181afb87d2bf5256b","_nodeVersion":"20.19.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-H0gwUFzLz4OCOnumSXwkR0bK++6yDIxpR68kTqsi9myH3IqwaFcIpOIzf0qnWVxefJkeE52R49E9gnqZI6bHXA==","shasum":"130cc17e21ac646b26fce78efff6f69e8eea637d","tarball":"https://registry.npmjs.org/@bigfootds/nodejs-trickplay/-/nodejs-trickplay-1.0.2.tgz","fileCount":24,"unpackedSize":3092650,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAMEd2FNqZ9TEHl+Pq+TrZ3Xv9fnnYgwaqnr9x11ehzpAiEA9g9ytUc0iST4R+fUYNCdiiZ1Xicys9/9wNqlQKbs4rY="}]},"_npmUser":{"name":"alexstormwood","email":"alex@bigfootds.com"},"directories":{},"maintainers":[{"name":"alexstormwood","email":"alex@bigfootds.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nodejs-trickplay_1.0.2_1745374273216_0.32053298414743714"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-21T02:36:06.388Z","modified":"2025-04-23T02:11:13.669Z","0.0.1":"2025-04-21T02:36:06.720Z","0.0.2":"2025-04-21T02:40:43.151Z","1.0.1":"2025-04-21T02:44:07.793Z","1.0.2":"2025-04-23T02:11:13.476Z"},"bugs":{"url":"https://github.com/BigfootDS/nodejs-trickplay/issues"},"author":{"name":"Alex Stormwood","email":"alex@bigfootds.com","url":"https://github.com/AlexStormwood"},"license":"MIT","homepage":"https://github.com/BigfootDS/nodejs-trickplay#readme","keywords":["trickplay","video-scrubbing","video-processing","video-preview","video-preview-thumbnails","video scrubbing","video processing","video preview","video preview thumbnails"],"repository":{"type":"git","url":"git+https://github.com/BigfootDS/nodejs-trickplay.git"},"description":"Generate trickplay images for a given video file, for usage in NodeJS environments.","maintainers":[{"name":"alexstormwood","email":"alex@bigfootds.com"}],"readme":"# @bigfootds/nodejs-trickplay\n\nGenerate trickplay images for a given video file, for usage in NodeJS environments.\n\nBasically just recreating the Jellyfin approach to trickplay, via NodeJS.\n\n## Installation\n\nThis is a scoped package, to the `@bigfootds` namespace. Your installation command should look something like this:\n\n`npm install @bigfootds/nodejs-trickplay`\n\nThe dependencies of this package should automatically sort out the `ffmpeg` and `ffprobe` installations for your operating systems.\n\n## Usage\n\nWhen given an absolute path to a video file, this package will create trickplay data alongside that specified video file.\n\n```js\nconst { generateTrickplay } = require(\"@bigfootds/nodejs-trickplay\");\nconst path = require(\"node:path\");\n\nlet pathAbsolute = path.resolve(\"./.sandbox/SomeCoolVideo (2025) - WEBDL-1080p.mkv\");\n\ngenerateTrickplay(pathAbsolute);\n```\n\nIf you already have raw trickplay frames in a neighbouring `.trickplay` folder for your video content, then you can also skip the frame generation and just use your existing raw trickplay frames.\n\n```js\nconst { generateTrickplay } = require(\"@bigfootds/nodejs-trickplay\");\nconst path = require(\"node:path\");\n\nlet pathAbsolute = path.resolve(\"./.sandbox/SomeCoolVideo (2025) - WEBDL-1080p.mkv\");\n\ngenerateTrickplay(pathAbsolute, {skipIndividualFrameGeneration: true});\n```\n\nThere are additional options available as well, but they are all optional. Anything not specified will fall back to a value in line with a value typical of Jellyfin trickplay behaviour.\n\n```js\n{\n\t// Defaults to a \".trickplay\" directory based on the target video file, neighbouring that file.\n\ttrickplayOutputDir?: string;\n\t// Defaults to 10. Causes frame generation to grab a frame from every X seconds of the target video.\n\tsecondsBetweenFrames?: number;\n\t// Defaults to 320. The width of the individual frames generated by the system. Works best when smaller than the target video width.\n\ttrickplayImageWidth?: number;\n\t// Defaults to 10. Determines how many individual frames are squeezed into a single tilesheet.\n\ttrickplaySheetRows?: number;\n\t// Defaults to 10. Determines how many individual frames are squeezed into a single tilesheet.\n\ttrickplaySheetColumns?: number;\n\t// Defaults to false. Allows you to use pre-existing individual frames in the trickplayOutDir. Very handy for debugging!\n\tskipIndividualFrameGeneration?: boolean;\n\n\n\t// Calculated at runtime, try not to use it.\n\tnumberOfFramesToGrab?: number;\n\t// Calculated at runtime, try not to use it.\n\tframeTimestamps?: string[];\n\t\n}\n```\n\n\n\n## More Info\n\nSo, given a folder like: \n\n`Videos/SomeCoolVideo (2025) - WEBDL-1080p.mp4`\n\nThis will generate trickplay images and organise them into a nearby folder, adding content to the directory containing the specified video file:\n\n```\n- Videos/\n\t- SomeCoolVideo (2025) - WEBDL-1080p.mp4\n\t- SomeCoolVideo (2025) - WEBDL-1080p.trickplay/\n\t\t- 320 - 10x10/\n\t\t\t- 0.jpg\n\t\t\t- 1.jpg\n\t\t\t- 2.jpg\n\t\t- frames/\n\t\t\t- 0.jpg\n\t\t\t- 1.jpg\n\t\t\t- 2.jpg\n```\n\nEach trickplay JPG file is a tilesheet of multiple frames from the target video. Longer videos will automatically create multiple tilesheets, constrained by the number of rows and columns you specified when calling the package's function.\n\n![Multiple tilesheets.](./docs/ArcaneBridgingTheRift-S01E01.png)\n\nIndividual frames are kept as well, so you can potentially _not_ use tilesheets in your trickplay implementation for your video player.\n\n![Output file and folder structure example.](./docs/OutputExample.png)","readmeFilename":"README.md"}