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

ffmpeg-installer

v1.0.2

Published

This is a shell script that automatically installs FFmpeg.

Downloads

1,047

Readme

FFmpeg installer

This is a shell script that automatically installs FFmpeg.
The content of the shell script follows the installation procedure (https://trac.ffmpeg.org/wiki/CompilationGuide/Centos) on the official FFmpeg page.

Prerequisites

Cmake 3.5 or higher is required to incorporate the AV1 encoder.
Therefore, if 3.5 or more cmake is not installed, 3.5 or more cmake will be reinstalled by the installation shell script (./bin/ffmpeg-installer.sh).

Installation / Uninstallation

Install:

sh ./bin/ffmpeg-installer.sh;

Uninstall:

sh ./bin/ffmpeg-uninstaller.sh;

FFmpeg command syntax

ffmpeg {Input options} -i {Input file name} {Output options} {Output file name};

FFmpeg command example

Convert mp4 format videos to sequential images

  • Output one image every second:
ffmpeg -i input.mp4 -vf fps=1 output_%d.png;
  • Output one image every minute:
ffmpeg -i input.mp4 -vf fps=1/60 output_%04d.png
  • Output one image every 10 minutes:
ffmpeg -i input.mp4 -vf fps=1/600 output_%04d.png

Convert images to mp4

  • When converting continuous images such as input_0001.png, input_0002.png, ... to mp4 format video:

    |Parameter|Description| |--|--| |The first -r|specifies that the image is 1 fps (one image per second).| |The second -r|specifies to output a video at 60 fps (60 images per second). In other words, the output moving image displays the same image 60 times per second.If there are 10 images ((input_0001.png to input_0010.png), a 10 second movie will be created.|

    ffmpeg -r 1 -i input_%04d.png -vcodec libx264 -pix_fmt yuv420p -r 60 output.mp4;
  • When the input image is 30 fps and the output video is 60 fps:

    If there are 120 images (input_0001.png to image_0120.png), a 4-second movie is created.

    ffmpeg -r 30 -i input_%04d.png -vcodec libx264 -pix_fmt yuv420p -r 60 output.mp4;
  • Video creation from images ~ Avoid dropping frames ~:

    If you specify the -r option twice, unintended frame dropping may occur in some cases.
    To prevent dropped frames, replace the first -r option with the -framerate option.
    Reference: https://github.com/yihui/animation/issues/74

    ffmpeg -framerate 1 -i input_%04d.png -vcodec libx264 -pix_fmt yuv420p -r 60 output.mp4;

Convert images to GIF

  • When converting continuous images such as input_0001.png, input_0002.png, ... to GIF:

    |Parameter|Description| |--|--| |The first -r|specifies that the image is 1 fps (one image per second).| |The second -r|specifies to output a video at 60 fps (60 images per second). | |-vf scale=512:-1|make the output 512 pixels in height, and adjust width to maintain the aspect ratio.This is common use case for images for the web, which tend to have much smaller resolution than video.If you remove this option, the output GIF has the same height as the input video.|

    ffmpeg -framerate 1 -i input_%04d.png -r 60 -vf scale=512:-1 output.gif;

Node.js examples

|Description|Example file| |--|--| |Convert images to mp4|./examples/nodejs/convert-image-to-mp4.js| |Convert images to GIF|./examples/nodejs/convert-image-to-gif.js|

License

MIT - see License file.

Author

Twitter: @TakuyaMotoshima
Github: TakuyaMotoshima
mail to: [email protected]