https://github.com/fabiopf02/ffmpeg-bridge-js
A bridge between ffmpeg and Node/JS with a simplified usage interface
https://github.com/fabiopf02/ffmpeg-bridge-js
ffmpeg ffmpeg-js ffmpeg-wrapper
Last synced: 2 months ago
JSON representation
A bridge between ffmpeg and Node/JS with a simplified usage interface
- Host: GitHub
- URL: https://github.com/fabiopf02/ffmpeg-bridge-js
- Owner: Fabiopf02
- Created: 2024-08-15T04:14:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T04:18:02.000Z (10 months ago)
- Last Synced: 2025-02-15T09:37:52.308Z (4 months ago)
- Topics: ffmpeg, ffmpeg-js, ffmpeg-wrapper
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ffmpeg-bridge-js
> A bridge between `ffmpeg` and `Node/JS` with a simplified usage interface
> ! Initially implemented for use with YouTube url's!
##### _Documentation in progress_
[Full usage example](./example/usage.example.js)
### Video
### Launch instance
```js
const videoInstance = new Video(
{
url: 'https://www.youtube.com/...',
quality: 'bestvideo[height>1080]+bestaudio[height>1080]/best', // Optional parameter
},
)
```### Include the generation of a video cut
```js
videoInstance.short({
start: '00:00:00',
end: '00:00:10',
output: 'short1.mp4'
})
```#### This can be done for more than one cut
```js
videoInstance.short(...).short(...)
```#### And finally get the result
```js
// to perform all cuts at the same time (uses more resources)
videoInstance.parallel()// or do it one by one (lighter)
videoInstance.sequentially()
```### Audio
The `Video` class also allows you to cut just the `audio`:
```js
videoInstance.audio({
start: '00:00:00',
end: '00:00:10',
output: 'short1.mp4'
})
```
#### And it can be combined with `short`
```js
videoInstance.short({
start: '00:00:31',
end: '00:00:40',
output: 'short4.mp4',
})
.audio({ start: '00:00:00', end: '00:00:15', output: 'audio2.aac' })
```