@backendsuraj/offline-ffmpeg 8.0.0 → 8.0.2
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.
- package/README.md +1 -1
- package/index.d.ts +9 -0
- package/index.js +16 -26
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ fluentFfmpeg('input.mp4').save('output.mp3');
|
|
|
35
35
|
## Binary Details
|
|
36
36
|
- **Source**: [BtbN/FFmpeg-Builds](https://github.com/BtbN/FFmpeg-Builds/releases)
|
|
37
37
|
- **Version**: 8.0.0
|
|
38
|
-
- **License**:
|
|
38
|
+
- **License**: GPL 3.0
|
|
39
39
|
|
|
40
40
|
## Supported Platforms
|
|
41
41
|
| OS | Architecture | Status |
|
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -1,43 +1,33 @@
|
|
|
1
1
|
var os = require('os');
|
|
2
2
|
var path = require('path');
|
|
3
|
+
var fs = require('fs');
|
|
3
4
|
|
|
4
5
|
var platform = os.platform();
|
|
5
6
|
var arch = os.arch();
|
|
6
7
|
|
|
7
|
-
if (platform
|
|
8
|
-
console.error('
|
|
9
|
-
console.error('ffmpeg-installer only supports linux, darwin and win32 systems');
|
|
8
|
+
if (platform === 'darwin') {
|
|
9
|
+
console.error('MacOS support coming soon.');
|
|
10
10
|
process.exit(1);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
if (platform !== 'linux' && platform !== 'win32') {
|
|
14
|
+
console.error('Unsupported platform: ' + platform);
|
|
15
|
+
console.error('offline-ffmpeg only supports linux and win32 systems');
|
|
16
|
+
process.exit(1);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'offline-ffmpeg-' + platform + '-' + arch,
|
|
23
|
-
'bin',
|
|
24
|
-
platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg'
|
|
25
|
-
);
|
|
19
|
+
var packageName = 'offline-ffmpeg-' + platform + '-' + arch;
|
|
20
|
+
var binaryName = platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg';
|
|
21
|
+
|
|
22
|
+
var ffmpegPath = path.resolve(__dirname, 'node_modules', '@backendsuraj', packageName, 'bin', binaryName);
|
|
26
23
|
|
|
27
|
-
// Fallback to checking if it is installed at the same level (flattened deps)
|
|
28
|
-
var fs = require('fs');
|
|
29
24
|
if (!fs.existsSync(ffmpegPath)) {
|
|
30
|
-
ffmpegPath = path.
|
|
31
|
-
__dirname,
|
|
32
|
-
'..',
|
|
33
|
-
'offline-ffmpeg-' + platform + '-' + arch,
|
|
34
|
-
'bin',
|
|
35
|
-
platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg'
|
|
36
|
-
);
|
|
25
|
+
ffmpegPath = path.resolve(__dirname, '..', packageName, 'bin', binaryName);
|
|
37
26
|
}
|
|
38
27
|
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
if (!fs.existsSync(ffmpegPath)) {
|
|
29
|
+
ffmpegPath = path.resolve(__dirname, '..', '..', packageName, 'bin', binaryName);
|
|
30
|
+
}
|
|
41
31
|
|
|
42
32
|
exports.path = ffmpegPath;
|
|
43
|
-
exports.version = '8.0.
|
|
33
|
+
exports.version = '8.0.2';
|
package/package.json
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backendsuraj/offline-ffmpeg",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"description": "Platform independent binary installer of FFmpeg for node projects (Offline Friendly)",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "node test.js"
|
|
8
9
|
},
|
|
9
10
|
"author": "Suraj",
|
|
10
|
-
"license": "
|
|
11
|
+
"license": "GPL-3.0",
|
|
11
12
|
"repository": {
|
|
12
13
|
"type": "git",
|
|
13
14
|
"url": "https://github.com/backendsuraj/offline-ffmpeg"
|
|
14
15
|
},
|
|
15
16
|
"optionalDependencies": {
|
|
16
|
-
"@backendsuraj/offline-ffmpeg-win32-x64": "8.0.
|
|
17
|
-
"@backendsuraj/offline-ffmpeg-linux-x64": "8.0.
|
|
17
|
+
"@backendsuraj/offline-ffmpeg-win32-x64": "8.0.2",
|
|
18
|
+
"@backendsuraj/offline-ffmpeg-linux-x64": "8.0.2"
|
|
18
19
|
}
|
|
19
20
|
}
|