Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glynnbird/ffmpegrunner
fluent-ffmpeg promise runner
https://github.com/glynnbird/ffmpegrunner
Last synced: 5 days ago
JSON representation
fluent-ffmpeg promise runner
- Host: GitHub
- URL: https://github.com/glynnbird/ffmpegrunner
- Owner: glynnbird
- Created: 2021-02-02T10:53:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-28T14:23:35.000Z (over 3 years ago)
- Last Synced: 2024-10-12T22:13:03.689Z (about 1 month ago)
- Language: JavaScript
- Size: 63.5 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ffmpegrunner
A tiny utility that turns a [fluent-ffmpeg](https://github.com/fluent-ffmpeg) command into a Promise
## Installing
```sh
npm install https://github.com/glynnbird/ffmpegrunner.git
```## Usage
```js
const run = require('ffmegrunner').run
const ffmpeg = require('fluent-ffmpeg')const main = async () => {
const command = ffmpeg()
.input('in.mp4')
.output('out.jpg')
.outputOptions(['-format singlejpeg', '-vframes 1'])
await run(command)
}main()
```To send debug information to `stderr`, add `true` as a second parameter to run e.g
```js
await run(command, true)
```To probe a file with `ffprobe`:
```js
const probe = require('ffmpegrunner').probe
const results = await probe('myfile.mp4')
```