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-panda

v1.1.2

Published

node js wrapper for ffmpeg

Downloads

9

Readme

ffmpeg-panda

Node Bash OSX

A ffmpeg nodejs wrapper to access to ffmpeg withing your nodejs code

InstallationUsageLicense . Changelog . Changelog . Contributing . Support

⚠️ This project is still in beta, it works only on OSX, windows and linux version comming soon. Due to beta status, breaking change will appear, check the changelog and the documentation. A stable version will be release in next weeks for the 1.5 ⚠️

Installation

brew install ffmpeg
npm i ffmpeg-panda

Usage

import Ffmpeg from './ffmpeg.js'

Ffmpeg.listDevices()

List avaiable devices

ℹ️ Because of some usage issue , screen device are hidden. They will be available in future version

// Get device list
let deviceList = await Ffmpeg.listDevices()

// Print device list
console.log(deviceList.map(d => "[" + d.index + "] " + d.name))

Device.infos()

Show device informations and features

// Get device list
let deviceList = await Ffmpeg.listDevices()
let device     = deviceList[0]

// Retrieve devices features
await device.detectFeatures()

// Print devices features
device.infos()

Device.listModes()

Show devices modes, mods are sorted by width

// Get device list
let deviceList = await Ffmpeg.listDevices()
let device     = deviceList[0]

// Retrieve devices features
await device.detectFeatures()

// Print devices modes
device.listModes()

Device.listPixelFormats()

Show pixel format

// Get device list
let deviceList = await Ffmpeg.listDevices()
let device     = deviceList[0]

// Retrieve devices features
await device.detectFeatures()

// Print devices pixel format
device.listPixelFormats()

Device.takePicture()

Take a picture with the device

| Argument | Type | Description |---------------|:------:|:-----------------| | output | string | the file output | | resolution | string | the resolution | | pixel format | string | the pixel format |

By default if no argument given, it will use the last mode of the list (the one width max width) and the first pixel format of the list. The output filename will be : output.jpg

❌ Will return a rejected promise if given parameters doesn't fit an avaiable mode

// Get device list
let deviceList = await Ffmpeg.listDevices()
let device     = deviceList[0]

// Retrieve devices features
await device.detectFeatures()
let filename = await device.takePicture()
console.log("File created: " + filename)

Device.takeVideo()

Take a video with the device

| Argument | Type | Description |---------------|:------:|:-----------------------------| | output | string | the file output | | duration | number | the video duration in second | | resolution | string | the resolution | | fps | string | the framerate | | pixel format | string | the pixel format |

By default if no argument given, it will use the last mode of the list (the one width max width) and the first pixel format of the list. The output filename will be : output.avi

❌ Will return a rejected promise if given parameters doesn't fit an avaiable mode

let deviceList = await Ffmpeg.listDevices()
let device = deviceList[0]

await device.detectFeatures()
let filename = await device.takeVideo("test.avi",10)
console.log("File created: " + filename)

License

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International

by-sa

Changelog

1.1.0 :

  • 💥Breaking change💥 parameter order for taking picture of video change, output file become the first one (see documentation)
  • 💥Breaking change💥 remove fps param for for taking picture
  • Adding takeVideo method
  • Adding more comment

Roadmap

  • Make future change non breaking
  • Make sound record avaiable

Contributing

A bug ? An idea of feature ? Fill an issue on github

Support