@backendsuraj/offline-ffprobe 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +47 -0
  2. package/index.js +34 -0
  3. package/package.json +16 -0
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @backendsuraj/offline-ffprobe
2
+
3
+ A platform-independent, offline-friendly binary installer of **FFprobe** for Node.js projects.
4
+
5
+ > **FFprobe Version: 8.0.0**
6
+
7
+
8
+ ## Why this package?
9
+ Most FFmpeg/FFprobe wrappers download the binary at runtime or install time. This fails in strict corporate environments with firewalls or proxies.
10
+ This package **bundles the binaries directly**, so `npm install` is all you need.
11
+
12
+ ## Usage
13
+
14
+ ### Standard Node.js
15
+ ```javascript
16
+ import ffprobe from '@backendsuraj/offline-ffprobe';
17
+ import { spawn } from 'child_process';
18
+
19
+ const ffprobePath = ffprobe.path;
20
+ spawn(ffprobePath, ['-version'], { stdio: 'inherit' });
21
+ ```
22
+
23
+ ### With `fluent-ffmpeg`
24
+ ```javascript
25
+ import fluentFfmpeg from 'fluent-ffmpeg';
26
+ import ffprobeBinary from '@backendsuraj/offline-ffprobe';
27
+
28
+ // Manually set the path to the bundled binary
29
+ fluentFfmpeg.setFfprobePath(ffprobeBinary.path);
30
+
31
+ // Use fluent-ffmpeg as usual
32
+ fluentFfmpeg('input.mp4').ffprobe((err, data) => {
33
+ console.log(data);
34
+ });
35
+ ```
36
+
37
+ ## Binary Details
38
+ - **Source**: [BtbN/FFmpeg-Builds](https://github.com/BtbN/FFmpeg-Builds/releases)
39
+ - **Version**: 8.0.0
40
+ - **License**: LGPL 3.0
41
+
42
+ ## Supported Platforms
43
+ | OS | Architecture | Status |
44
+ | :--- | :--- | :--- |
45
+ | **Windows** | x64 | ✅ Supported |
46
+ | **Linux** | x64 | ✅ Supported |
47
+ | **MacOS** | Any | ⏳ Coming Soon |
package/index.js ADDED
@@ -0,0 +1,34 @@
1
+ var os = require('os');
2
+ var path = require('path');
3
+
4
+ var platform = os.platform();
5
+ var arch = os.arch();
6
+
7
+ if (platform !== 'linux' && platform !== 'darwin' && platform !== 'win32') {
8
+ console.error('Unsupported platform: ' + platform);
9
+ console.error('ffprobe-installer only supports linux, darwin and win32 systems');
10
+ process.exit(1);
11
+ }
12
+
13
+ var ffprobePath = path.join(
14
+ __dirname,
15
+ 'node_modules',
16
+ '@backendsuraj',
17
+ 'offline-ffprobe-' + platform + '-' + arch,
18
+ 'bin',
19
+ platform === 'win32' ? 'ffprobe.exe' : 'ffprobe'
20
+ );
21
+
22
+ var fs = require('fs');
23
+ if (!fs.existsSync(ffprobePath)) {
24
+ ffprobePath = path.join(
25
+ __dirname,
26
+ '..',
27
+ 'offline-ffprobe-' + platform + '-' + arch,
28
+ 'bin',
29
+ platform === 'win32' ? 'ffprobe.exe' : 'ffprobe'
30
+ );
31
+ }
32
+
33
+ exports.path = ffprobePath;
34
+ exports.version = '8.0.0';
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "@backendsuraj/offline-ffprobe",
3
+ "version": "8.0.0",
4
+ "description": "Platform independent binary installer of FFprobe for node projects (Offline Friendly)",
5
+ "main": "index.js",
6
+ "author": "Suraj",
7
+ "license": "LGPL-3.0",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/backendsuraj/offline-ffmpeg"
11
+ },
12
+ "optionalDependencies": {
13
+ "@backendsuraj/offline-ffprobe-win32-x64": "8.0.0",
14
+ "@backendsuraj/offline-ffprobe-linux-x64": "8.0.0"
15
+ }
16
+ }