npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@bigfootds/nodejs-trickplay

v1.0.2

Published

Generate trickplay images for a given video file, for usage in NodeJS environments.

Readme

@bigfootds/nodejs-trickplay

Generate trickplay images for a given video file, for usage in NodeJS environments.

Basically just recreating the Jellyfin approach to trickplay, via NodeJS.

Installation

This is a scoped package, to the @bigfootds namespace. Your installation command should look something like this:

npm install @bigfootds/nodejs-trickplay

The dependencies of this package should automatically sort out the ffmpeg and ffprobe installations for your operating systems.

Usage

When given an absolute path to a video file, this package will create trickplay data alongside that specified video file.

const { generateTrickplay } = require("@bigfootds/nodejs-trickplay");
const path = require("node:path");

let pathAbsolute = path.resolve("./.sandbox/SomeCoolVideo (2025) - WEBDL-1080p.mkv");

generateTrickplay(pathAbsolute);

If 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.

const { generateTrickplay } = require("@bigfootds/nodejs-trickplay");
const path = require("node:path");

let pathAbsolute = path.resolve("./.sandbox/SomeCoolVideo (2025) - WEBDL-1080p.mkv");

generateTrickplay(pathAbsolute, {skipIndividualFrameGeneration: true});

There 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.

{
	// Defaults to a ".trickplay" directory based on the target video file, neighbouring that file.
	trickplayOutputDir?: string;
	// Defaults to 10. Causes frame generation to grab a frame from every X seconds of the target video.
	secondsBetweenFrames?: number;
	// Defaults to 320. The width of the individual frames generated by the system. Works best when smaller than the target video width.
	trickplayImageWidth?: number;
	// Defaults to 10. Determines how many individual frames are squeezed into a single tilesheet.
	trickplaySheetRows?: number;
	// Defaults to 10. Determines how many individual frames are squeezed into a single tilesheet.
	trickplaySheetColumns?: number;
	// Defaults to false. Allows you to use pre-existing individual frames in the trickplayOutDir. Very handy for debugging!
	skipIndividualFrameGeneration?: boolean;


	// Calculated at runtime, try not to use it.
	numberOfFramesToGrab?: number;
	// Calculated at runtime, try not to use it.
	frameTimestamps?: string[];
	
}

More Info

So, given a folder like:

Videos/SomeCoolVideo (2025) - WEBDL-1080p.mp4

This will generate trickplay images and organise them into a nearby folder, adding content to the directory containing the specified video file:

- Videos/
	- SomeCoolVideo (2025) - WEBDL-1080p.mp4
	- SomeCoolVideo (2025) - WEBDL-1080p.trickplay/
		- 320 - 10x10/
			- 0.jpg
			- 1.jpg
			- 2.jpg
		- frames/
			- 0.jpg
			- 1.jpg
			- 2.jpg

Each 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.

Multiple tilesheets.

Individual frames are kept as well, so you can potentially not use tilesheets in your trickplay implementation for your video player.

Output file and folder structure example.