1.0.0 • Published 3 years ago
@romain-faust/ffmpeg v1.0.0
@romain-faust/ffmpeg
Set of tools for interacting with ffmpeg.
Installation
With NPM:
npm install @romain-faust/ffmpeg rxjs
With Yarn:
yarn add @romain-faust/ffmpeg rxjs
Usage
import { transcode } from '@romain-faust/ffmpeg'
transcode({
audioFormat: 'aac',
inputPath: '/path/to/the/input/file',
outputFormat: 'matroska',
outputPath: '/path/to/the/output/file',
subTitleFormat: 'srt',
videoFormat: 'libx265',
}).subscribe({
next(event) {
console.log(`Transcoded ${event.current} ms out of ${event.total}.`)
},
error(error) {
console.error(`An error occurred: ${error.message}.`)
},
complete() {
console.log('Transcode succeed.')
},
})
License
1.0.0
3 years ago