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 🙏

© 2026 – Pkg Stats / Ryan Hefner

youtube-frames

v1.0.3

Published

An easy to use API to get the frames from youtube videos.

Downloads

25

Readme

YOUTUBE!

youtube-frames

Another youtube-video-to-frames module. Inspired by youtube-video-to-frames and powered by ytdl-core.

Install

To use this module you need to have Node.js installed in your computer. You can download the latest version here. Also this module depends on ffmpeg (assumes ffmpeg is in your $PATH variable), you can download it here.

Once you have Node.js and ffmpeg installed (and in your $PATH). Open your terminal and type the following commands(without the '$' symbol):

$ mkdir name_your_folder  # create a directory
$ cd name_your_folder     # go into the directory
$ npm i youtube-frames   # install module inside directory

Usage

The following code, will download the video from https://www.youtube.com/watch?v=sDj72zqZakE and name it waffle_falling. Then it's going to get the frames of the downloaded video.

require('youtube-frames');

const o = $ytvideo('https://www.youtube.com/watch?v=sDj72zqZakE', 'waffle_falling');
o.download().toFrames();

API

$ytvideo(youtubeURL, videoName)

Returns a simple object with the youtube URL and the given name of the video.

download(path)

Attempts to download a YouTube video (from the url given) and tries to store it in the path specified. If path is not specified, the video is stored in the root path.

  • path: must be a string containing the path to the directory where the youtube video is going to be downloaded. Examples:
.download() // default path: ./
.download("./dir") // if path doesn't exist, it will create it: ./dir/

toFrames(fps, begin, end)

Attempts to get the video frames (as JPEG) and stores them in the same location given by path. This function can take 3 parameters:

  • fps: must be a number, it specifies the number of frames to get per second. | [fps default value] = 1
  • begin: must be a number (seconds) or string ("00:01:40"). It specifies the starting point to get the frames. | [begin default value] = 0
  • end: must be a number (seconds) or string ("00:00:03"). It specifies the ending point to get the frames. | [end default value] = length of video Example:
.toFrames(15) // gets 15 frames per second and uses the default values for begin and end
.toFrames(30, 1, 3) // gets 30 frames per second and starts getting frames beginning from 1 to 3.
.toFrames(2, "00:00:01", "00:00:03") // gets 2 frames per second and starts getting frames beggining from 1 to 3.
.toFrames() // gets 1 frame per second for the entire video.