1.0.4 • Published 3 years ago

cute-ffmpeg v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

cute-FFMPEG

cute-FFMPEG is an easy-to-use wrapper for FFMPEG, with a primary focus on audio conversion.

Disclaimer

This module is still lacking a lot of different custom features, and therefore not production ready.

Usage

Example

// CommonJS
const CuteFFMPEG = require("cute-ffmpeg").CuteFFMPEG;
const FFMPEGRequest = require("cute-ffmpeg").FFMPEGRequest;
// ES6
import { CuteFFMPEG, FFMPEGRequest } from "cute-ffmpeg";

const ffmpeg = new CuteFFMPEG({
  overwrite: true
});

const request = new FFMPEGRequest({
  input: {
    path: "input.wav"
  },
  output: {
    path: "output_320k.mp3",
    bitrate: 320,
  }
});

ffmpeg.convert(request)
.then(filePath => {
  // Done
})
.catch(error => {
  // Something went wrong
})
;

Options

FFMPEGGlobalOptions

PropertyTypeDescriptionFFMPEG
overwritebooleanOverwrite output file-y
ffmpegPathstringDefine path to ffmpeg (default uses PATH variable)

FFMPEGGlobalOptions

PropertyTypeDescriptionFFMPEG
pathstringPath to file
codecstringForce audio codec (Full list)-c:a
bitratenumberBitrate for audio; adds "k" automatically-b:a
volumenumberVolume (default is 256)-vol
audioQualitystring | numberCodec-specific audio quality setting-q:a
audioFramesnumberAudio Frames-aframes