Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

codem-ffmpeg

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

codem-ffmpeg

Simple wrapper for FFmpeg

  • 0.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

codem-ffmpeg

codem-ffmpeg is a simple wrapper library for ffmpeg. It is extracted from (and used by) codem-transcode.

Example usage

const FFmpeg = require('codem-ffmpeg')

// Create new instance with array of arguments
let instance = new FFmpeg(['-i', 'input.mp4', '-y', 'output.mp4'])

// Progress reporting
instance.on('progress', (progress) => {
  console.log(progress)
})

// Exit handler
instance.on('exit', (code, signal) => {
  console.log("FFmpeg exited:", code, signal)
  
  // Custom attributes that expose additional information about the process/file,
  // e.g. input/output file, input duration, filesize
  console.log(instance.attributes)
})

// Error handler
instance.on('error', (error) => {
  console.log("FFmpeg error:", error)
})

// Spawn the FFmpeg process
instance.spawn()

// Cancel a running process
instance.cancel()

Running tests

codem-ffmpeg features a test suite written using Jasmine. Checkout the code, install the dependencies (make sure you have FFmpeg available on your path) and run:

# git clone https://github.com/madebyhiro/codem-ffmpeg.git
# cd codem-ffmpeg
# npm install
# npm test

Keywords

FAQs

Package last updated on 25 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc