Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@w3vish/ffmpeg-installer

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@w3vish/ffmpeg-installer - npm Package Compare versions

Comparing version
2.0.0
to
2.0.1
+1
-1
package.json
{
"name": "@w3vish/ffmpeg-installer",
"version": "2.0.0",
"version": "2.0.1",
"type": "module",

@@ -5,0 +5,0 @@ "description": "A fast and lightweight cross-platform FFmpeg & FFprobe binary installer for Node.js, supporting Linux, macOS, and Windows.",

+32
-23

@@ -34,10 +34,10 @@ # @w3vish/ffmpeg-installer

// Import the package
import ffmpeg from '@w3vish/ffmpeg-installer';
// Or import specific paths
import { ffmpegPath, ffprobePath } from '@w3vish/ffmpeg-installer';
import FFmpegInstaller from '@w3vish/ffmpeg-installer';
// Access paths
console.log('FFmpeg path:', ffmpegPath);
console.log('FFprobe path:', ffprobePath);
console.log('FFmpeg version:', ffmpeg.version);
// Access the data directly
console.log('FFmpeg path:', FFmpegInstaller.ffmpeg.path);
console.log('FFprobe path:', FFmpegInstaller.ffprobe.path);
console.log('FFmpeg version:', FFmpegInstaller.ffmpeg.version);
console.log('Platform:', FFmpegInstaller.platform);
console.log('Architecture:', FFmpegInstaller.arch);
```

@@ -49,5 +49,5 @@

import { spawn } from 'child_process';
import { ffmpegPath } from '@w3vish/ffmpeg-installer';
import FFmpegInstaller from '@w3vish/ffmpeg-installer';
const process = spawn(ffmpegPath, [
const process = spawn(FFmpegInstaller.ffmpeg.path, [
'-i', 'input.mp4',

@@ -67,7 +67,7 @@ '-c:v', 'libx264',

import ffmpeg from 'fluent-ffmpeg';
import { ffmpegPath, ffprobePath } from '@w3vish/ffmpeg-installer';
import FFmpegInstaller from '@w3vish/ffmpeg-installer';
// Set paths
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfprobePath(ffprobePath);
ffmpeg.setFfmpegPath(FFmpegInstaller.ffmpeg.path);
ffmpeg.setFfprobePath(FFmpegInstaller.ffprobe.path);

@@ -102,17 +102,26 @@ // Use fluent-ffmpeg

## API
## Return Object Structure
| Property | Type | Description |
|----------|------|-------------|
| `path` | `string` | Path to the FFmpeg binary (alias for `ffmpegPath`) |
| `ffmpegPath` | `string` | Path to the FFmpeg binary |
| `ffprobePath` | `string` | Path to the FFprobe binary |
| `version` | `string` | Version of the FFmpeg binaries |
| `url` | `string` | URL from where the binaries were downloaded |
| `platform` | `string` | Current platform identifier |
| `arch` | `string` | Current architecture identifier |
The package exports an `FFmpegInstaller` object with this structure:
```javascript
{
ffmpeg: {
path: '/path/to/ffmpeg',
version: 'v1.0.0',
url: 'https://github.com/w3vish/ffmpeg-installer/releases/download/v1.0.0/linux-x64-ffmpeg'
},
ffprobe: {
path: '/path/to/ffprobe',
version: 'v1.0.0',
url: 'https://github.com/w3vish/ffmpeg-installer/releases/download/v1.0.0/linux-x64-ffprobe'
},
platform: 'linux',
arch: 'x64'
}
```
## TypeScript Types
The package includes comprehensive TypeScript definitions:
The package includes TypeScript definitions:

@@ -119,0 +128,0 @@ ```typescript