codem-ffmpeg
codem-ffmpeg
is a simple wrapper library for ffmpeg. It is extracted from (and used by) codem-transcode
.
Example usage
const FFmpeg = // Create new instance with array of argumentslet instance = '-i' 'input.mp4' '-y' 'output.mp4' // Progress reportinginstance // Exit handlerinstance // Error handlerinstance // Spawn the FFmpeg processinstance // Cancel a running processinstance
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