Skip to content

milan090/youtube-giffify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Youtube-GIFFIFY

Convert youtube videos to gifs on the fly

NPM


Usage

const { generateGif } = require("youtube-giffify");

generateGif(
  "https://www.youtube.com/watch?v=7JgdzmrqTXU", // Youtube video url
  "./example.gif", // Output file path
  {
    // Options
    fps: 24,
  }
).then((filename) => console.log(filename));

// In async function
const res = await generateGif(
  "https://www.youtube.com/watch?v=7JgdzmrqTXU", // Youtube video url
  "./example.gif", // Output file path
  {
    // Options
    fps: 24,
  }
);

Options

  • startInSeconds (number): GIF will start from here [Default = 0]
  • width (number): width of GIF [Default = 320]
  • duration (number) [Default = 3]
  • fps (number) [Default = 18]