https://github.com/potatoparser/ffmpeg-cli
ffmpeg with support for multiple OSs
https://github.com/potatoparser/ffmpeg-cli
hacktoberfest
Last synced: about 1 year ago
JSON representation
ffmpeg with support for multiple OSs
- Host: GitHub
- URL: https://github.com/potatoparser/ffmpeg-cli
- Owner: PotatoParser
- License: mit
- Created: 2019-01-17T02:45:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-10-30T10:44:09.000Z (over 3 years ago)
- Last Synced: 2025-03-26T20:55:06.124Z (about 1 year ago)
- Topics: hacktoberfest
- Language: JavaScript
- Homepage:
- Size: 251 MB
- Stars: 17
- Watchers: 2
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ffmpeg-cli
[](https://travis-ci.com/PotatoParser/ffmpeg-cli) [](https://nodejs.org/en/download/) [](https://nodejs.org/dist/latest-v10.x/)
A simple way of implementing FFmpeg regardless of OS
```javascript
const ffmpeg = require("ffmpeg-cli");
ffmpeg.run("-version");
console.log(ffmpeg.runSync("-version"));
```
## Hassle Free!
No need to install other programs as ffmpeg-cli will download and extract necessary binaries for your OS!
## Supported OS
+ MacOS ~ 64 bit
+ Linux ~ 32/64 bit
+ Windows ~ [~~32/~~](https://github.com/PotatoParser/ffmpeg-cli/issues/9)64 bit
## FFmpeg Path
Returns the path of FFmpeg executable
```javascript
ffmpeg.path;
// Ex: C:\Users\PotatoParser\Desktop\NodeJS\ffmpeg-cli\ffmpeg\win32x64\bin\ffmpeg.exe
```
## Synchronous Commands
Returns the output from FFmpeg
```javascript
ffmpeg.runSync(commands);
// Ex: ffmpeg.runSync(`-i input.jpg -vf scale=320:240 output.png`);
```
## Asynchronous Commands
Returns a `Promise`
```javascript
ffmpeg.run(commands);
ffmpeg.run(commands).catch((error)=>{...}); // Catch errors
ffmpeg.run(commands).then((result)=>{...}); // Only results
ffmpeg.run(commands).then((result)=>{...}).catch((error)=>{...}); // Catches when errors found
```
## FFmpeg Force Re-Download
**Run to redownload (synchronously) ffmpeg files**
Returns true if download is successful
```javascript
ffmpeg.forceDownload();
```
## FFmpeg Documentation
[FFmpeg's Official Documentation](https://www.ffmpeg.org/ffmpeg.html)