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

stitcheroo

v1.2.1

Published

Stitch all of your videos into a lovely big video wall.

Downloads

1

Readme

Stitcheroo

Stitch all of your videos into a lovely big video wall.

Description

Stitcheroo was created as part of the Choirless project.

Stitcheroo is a module that takes a list of video filepaths and then combines them together using FFMPEG to output a single video with all the source videos next to each other. The generated video is then return as a buffer.

Usage

Example

const sticheroo = require('stitcheroo');
const fs = require('fs');

const videosToCombine = [`${__dirname}/vid_1.mp4`, `${__dirname}/vid_2.mp4`, `${__dirname}/vid_3.mp4`]

// Options can be passed to Stitcheroo to affect the output.
// Below are the default values, but you can  
// change them as you like.
const options = {
    dimensions : {
        width: 1920,
        height: 1080
    },
    margin: 20,
    center: true,
    returnAsFile: false,
    pan: true
};

stitcheroo(videosToCombine, options)
    .then(data => {

        // Data is a buffer with the generated video contained within.
        // Once the buffer is created, no file persists on the system
        // so we'll write it to a file here, but you can do what you
        // like with it.

        fs.writeFileSync('written_output.mp4', data);

    })
    .catch(err => {
        console.log('Err:', err);
    })
;

Stitcheroo Arguments

stitcheroo([VIDEO FILE PATHS ARRAY], [OPTIONS OBJECT])

VIDEO FILE PATHS

This is an array of file paths pointing to the videos you'd like to combine. The videos passed will be proportionately scaled to fit within a 1920x1080 pixel container (HD video dimensions) and centered both horizontally and vertically.

OPTIONS

Defaults:

{
    dimensions : {
        width: 1920,
        height: 1080
    },
    margin: 20,
    center: true,
    returnAsFile: false,
    pan: true,
    reverb: {
        type: 'none',
        mix: 0.1
    }
}
dimensions

An object with the desired width and height value for the output video. All videos to be rendered will be fit into these dimensions. If you pass a dimensions object, you must have both a width and height value. If either is omitted, the function will reject. If dimensions is omitted, the values will default to a width of 1920 and height and 1080.

margin

A pixel value for the space around the videos.

center

Center the passed videos horizontally and vertically in the output video

returnAsFile

By default, Stitcheroo will return your rendered video as a buffer which you can handle as you wish. If you would rather handle a path to the file, you can pass true on this property.

pan

By default (true), Stitcheroo will pan the audio of each video to the left or right depending on its position in the output video e.g. videos on the left hand side of the output video will have their audio panned to the left.

To leave the input audio alone, pass false for this property.

reverb

The reverb object describes what type and how much reverberation effect to add to that output audio. By default none is added:

  reverb: {
      type: 'hall', 
      mix: 0.3
  }
  • reverb.type - one of: none, smallroom, largeroom, hall, church.
  • reverb.mix - a number between 0 and 1 that determines how much reverb effect is added into the mix. 0 = none, 1 = full.

Output

An animated GIF of the kind of output you can expect