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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@elmotron9000/fmlpeg

v0.2.0

Published

Exposing useful functions for Elmotron9000 using `fluent-ffmpeg`.

Downloads

17

Readme

fmlpeg

Exposing useful functions for Elmotron9000 using fluent-ffmpeg.

Features

  • [x] Concatenate videos
  • [x] Add audio clips into videos
  • [x] Get duration of media file
  • [x] Generate video from photo
  • [x] Generate subtitles for video
  • [x] Allows videos of different resolutions
  • [x] Embed subtitles into video file

How to Use

This exposes some useful functions for working with photos, audio, and video directly, but the intended purpose is primarily the SceneBuilder class with the Scene types for generating a single video containing audio clips, video clips, and slides.

You can import any of the helper functions from the package directly, such as getLengthOfFile.

To use SceneBuilder, import it from the module.

import { SceneBuilder } from "@elmotron9000/fmlpeg";

You can create a new SceneBuilder with a list of Scenes, or add them after the fact.

// Add scenes after creating it
const addingBuilder = new SceneBuilder();
const introSlide = {
    type: "photo",
    filename: "/tmp/photo0.png",
    duration: 15,
    audio: [],
};
const videoScene = {
    type: "video",
    filename: "/tmp/video0.mp4",
    audio: [],
};

addingBuilder.addScene(introSlide);
addingBuilder.addScene(videoScene);
await addingBuilder.build();

// Or pass them directly to the constructor
const constructorBuilder = new SceneBuilder([
    introSlide,
    videoScene,
]);
await constructorBuilder.build();

There are also build options that can be passed to the build() method. Subtitles are not generated by default.

export interface BuildOptions {
    subtitles: boolean;
    filename: string;
}

// Example usage
const builder = new SceneBuilder([
    // ... scenes
]);
await builder.build({
    subtitles: true,
    filename: "/tmp/final-cut.mp4",
});