mirror of
https://github.com/musix-org/musix-oss
synced 2025-06-16 15:46:00 +00:00
fix
This commit is contained in:
21
node_modules/ffmpeg-binaries/LICENSE
generated
vendored
Normal file
21
node_modules/ffmpeg-binaries/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Zachary Vacura
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
17
node_modules/ffmpeg-binaries/README.md
generated
vendored
Normal file
17
node_modules/ffmpeg-binaries/README.md
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# node-ffmpeg-binaries
|
||||
A platform indepindependent installer of [FFmpeg](https://ffmpeg.org/)
|
||||
|
||||
|
||||
Supported architectures:
|
||||
Linux | Windows | Mac
|
||||
----- | ------- | ---
|
||||
x64 | x64 | x64
|
||||
ia32 | ia32 |
|
||||
arm | |
|
||||
arm64 | |
|
||||
|
||||
## API
|
||||
`node-ffmpeg-binaries` exports a string containing the path to the FFmpeg executable.
|
||||
|
||||
|
||||
This software uses code of <a href=http://ffmpeg.org>FFmpeg</a> licensed under the <a href=http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>LGPLv2.1</a> and its source can be downloaded [here](ffmpeg)
|
BIN
node_modules/ffmpeg-binaries/bin/ffmpeg.exe
generated
vendored
Normal file
BIN
node_modules/ffmpeg-binaries/bin/ffmpeg.exe
generated
vendored
Normal file
Binary file not shown.
3
node_modules/ffmpeg-binaries/index.js
generated
vendored
Normal file
3
node_modules/ffmpeg-binaries/index.js
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
const { join } = require('path');
|
||||
|
||||
module.exports = join(__dirname, 'bin', `ffmpeg${process.platform === 'win32' ? '.exe' : ''}`);
|
81
node_modules/ffmpeg-binaries/install.js
generated
vendored
Normal file
81
node_modules/ffmpeg-binaries/install.js
generated
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
const { get } = require('https');
|
||||
const { cursorTo } = require('readline');
|
||||
const decompress = require('decompress');
|
||||
const tarxz = require('decompress-tarxz');
|
||||
const unzip = require('decompress-unzip');
|
||||
|
||||
function callback(res) {
|
||||
let last;
|
||||
let complete = 0;
|
||||
const total = parseInt(res.headers['content-length'], 10);
|
||||
|
||||
let index = 0;
|
||||
const buf = Buffer.alloc(total);
|
||||
|
||||
res.on('data', (chunk) => {
|
||||
chunk.copy(buf, index);
|
||||
index += chunk.length;
|
||||
|
||||
complete += chunk.length;
|
||||
const progress = Math.round((complete / total) * 20);
|
||||
|
||||
if (progress !== last) {
|
||||
cursorTo(process.stdout, 0, null);
|
||||
|
||||
process.stdout.write(`Downloading binary: [${'='.repeat(progress)}${[' '.repeat(20 - progress)]}] ${Math.round((complete / total) * 100)}%`);
|
||||
|
||||
last = progress;
|
||||
}
|
||||
});
|
||||
|
||||
res.on('end', () => {
|
||||
cursorTo(process.stdout, 0, null);
|
||||
console.log(`Downloading binary: [${'='.repeat(20)}] 100%`);
|
||||
|
||||
decompress(buf, 'bin', {
|
||||
plugins: process.platform === 'linux' ? [tarxz()] : [unzip()],
|
||||
strip: process.platform === 'linux' ? 1 : 2,
|
||||
filter: x => x.path === (process.platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg'),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
switch (process.arch) {
|
||||
case 'x64':
|
||||
get('https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-latest-win64-static.zip', callback);
|
||||
break;
|
||||
case 'ia32':
|
||||
get('https://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-latest-win32-static.zip', callback);
|
||||
break;
|
||||
default:
|
||||
throw new Error('unsupported platform');
|
||||
}
|
||||
} else if (process.platform === 'linux') {
|
||||
switch (process.arch) {
|
||||
case 'x64':
|
||||
get('https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz', callback);
|
||||
break;
|
||||
case 'ia32':
|
||||
get('https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-32bit-static.tar.xz', callback);
|
||||
break;
|
||||
case 'arm':
|
||||
get('https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-armhf-32bit-static.tar.xz', callback);
|
||||
break;
|
||||
case 'arm64':
|
||||
get('https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-arm64-64bit-static.tar.xz', callback);
|
||||
break;
|
||||
default:
|
||||
throw new Error('unsupported platform');
|
||||
}
|
||||
} else if (process.platform === 'darwin') {
|
||||
switch (process.arch) {
|
||||
case 'x64':
|
||||
get('https://ffmpeg.zeranoe.com/builds/macos64/static/ffmpeg-latest-macos64-static.zip', callback);
|
||||
break;
|
||||
default:
|
||||
throw new Error('unsupported platform');
|
||||
}
|
||||
} else {
|
||||
throw new Error('unsupported platform');
|
||||
}
|
71
node_modules/ffmpeg-binaries/package.json
generated
vendored
Normal file
71
node_modules/ffmpeg-binaries/package.json
generated
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
{
|
||||
"_from": "ffmpeg-binaries",
|
||||
"_id": "ffmpeg-binaries@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-a4ceKPIB51x7pHEK3BEOoCMgOUOm51MKi8UEOocfDOpN9aHgtTEDGo8SgLRhrRVllNnpNmW9AjkXeySvmeoU1w==",
|
||||
"_location": "/ffmpeg-binaries",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "tag",
|
||||
"registry": true,
|
||||
"raw": "ffmpeg-binaries",
|
||||
"name": "ffmpeg-binaries",
|
||||
"escapedName": "ffmpeg-binaries",
|
||||
"rawSpec": "",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "latest"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ffmpeg-binaries/-/ffmpeg-binaries-4.0.0.tgz",
|
||||
"_shasum": "698fa082c0512b1b083a1298e3fab4e41feeede3",
|
||||
"_spec": "ffmpeg-binaries",
|
||||
"_where": "C:\\Users\\matia\\Musix",
|
||||
"author": {
|
||||
"name": "Hackzzila",
|
||||
"email": "zach@hackzzila.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/Hackzzila/node-ffmpeg-binaries/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"decompress": "^4.2.0",
|
||||
"decompress-tarxz": "^2.1.1",
|
||||
"decompress-unzip": "^4.0.1"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "ffmpeg binaries",
|
||||
"devDependencies": {
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-config-airbnb-base": "^12.1.0",
|
||||
"eslint-plugin-import": "^2.10.0"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "airbnb-base"
|
||||
},
|
||||
"homepage": "https://github.com/Hackzzila/node-ffmpeg-binaries#readme",
|
||||
"keywords": [
|
||||
"ffmpeg",
|
||||
"binaries"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "ffmpeg-binaries",
|
||||
"os": [
|
||||
"win32",
|
||||
"linux",
|
||||
"darwin"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/Hackzzila/node-ffmpeg-binaries.git"
|
||||
},
|
||||
"scripts": {
|
||||
"install": "node install",
|
||||
"test": "eslint *.js"
|
||||
},
|
||||
"version": "4.0.0"
|
||||
}
|
Reference in New Issue
Block a user