https://github.com/nodef/extra-ffmpeg
Decode, encode, transcode, mux, demux, stream, filter, and play media through machine (via "ffmpeg").
https://github.com/nodef/extra-ffmpeg
decode demux encode extra ffmpeg filter framework machine media multimedia mux play stream transcode
Last synced: 11 months ago
JSON representation
Decode, encode, transcode, mux, demux, stream, filter, and play media through machine (via "ffmpeg").
- Host: GitHub
- URL: https://github.com/nodef/extra-ffmpeg
- Owner: nodef
- License: mit
- Created: 2018-11-09T07:03:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-04T05:49:35.000Z (almost 4 years ago)
- Last Synced: 2024-04-25T23:44:09.367Z (over 1 year ago)
- Topics: decode, demux, encode, extra, ffmpeg, filter, framework, machine, media, multimedia, mux, play, stream, transcode
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/extra-ffmpeg
- Size: 21.5 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Decode, encode, transcode, mux, demux, stream, filter, and play media through machine (via ["ffmpeg"]).
> Uses [setup-ffmpeg] to install, if absent.
```javascript
const ffmpeg = require('extra-ffmpeg');
// ffmpeg.sync(): stdout when done
// ffmpeg()
// -> Promise {stdout, stderr} when done
// : [{ // see ffmpeg -h
// outfile|o: // name of output file
// }]
ffmpeg.sync([{y: true}, {i: 'concat:0.mp3|1.mp3'}, {acodec: 'copy', o: 'aud.mp3'}]);
// concat 0.mp3, 1.mp3 to aud.mp3
ffmpeg.sync([
{y: true, err_detect: 'explode'}, {loop: 1, framerate: 1}, {i: 'img.jpg'}, {i: 'aud.mp3'},
{vcodec: 'libx264', crf: 0, preset: 'veryfast', tune: 'stillimage',
vf: 'scale=trunc(iw/2)*2:trunc(ih/2)*2', acodec: 'copy', shortest: true, o: 'vid.mp4'}
]);
// get video vid.mp4 from still image img.jpg and audio aud.mp4
```
[](https://nodef.github.io)
["ffmpeg"]: https://ffmpeg.org
[setup-ffmpeg]: https://www.npmjs.com/package/setup-ffmpeg