mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-03-11 17:45:30 +00:00
Replace ffprobe static with ffprobe bin
This commit is contained in:
parent
df7dd06235
commit
7e8bb06a8b
6 changed files with 10 additions and 13 deletions
|
|
@ -1,2 +1,3 @@
|
|||
ffmpeg: "ffmpeg.exe"
|
||||
mkvmerge: "mkvmerge.exe"
|
||||
ffprobe: "ffprobe.exe"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ This application is not endorsed by or affiliated with *Funimation*, *Crunchyrol
|
|||
By default this application uses the following paths to programs (main executables):
|
||||
|
||||
* `ffmpeg.exe` (From PATH)
|
||||
* `ffprobe.exe` (From PATH)
|
||||
* `mkvmerge.exe` (From PATH)
|
||||
|
||||
To change these paths you need to edit `bin-path.yml` in `./config/` directory.
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ export type ConfigObject = {
|
|||
},
|
||||
bin: {
|
||||
ffmpeg?: string,
|
||||
mkvmerge?: string
|
||||
mkvmerge?: string,
|
||||
ffprobe?: string
|
||||
},
|
||||
cli: {
|
||||
[key: string]: any
|
||||
|
|
@ -143,8 +144,9 @@ const loadBinCfg = async () => {
|
|||
const binCfg = loadYamlCfgFile<ConfigObject['bin']>(binCfgFile);
|
||||
// binaries
|
||||
const defaultBin = {
|
||||
ffmpeg: '${wdir}/bin/ffmpeg/ffmpeg',
|
||||
mkvmerge: '${wdir}/bin/mkvtoolnix/mkvmerge',
|
||||
ffmpeg: 'ffmpeg',
|
||||
mkvmerge: 'mkvmerge',
|
||||
ffprobe: 'ffprobe'
|
||||
};
|
||||
const keys = Object.keys(defaultBin) as (keyof typeof defaultBin)[];
|
||||
for(const dir of keys){
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import * as iso639 from 'iso-639';
|
||||
import * as yamlCfg from './module.cfg-loader';
|
||||
import { fontFamilies, fontMime } from './module.fontsData';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
|
|
@ -7,7 +8,6 @@ import { AvailableMuxer } from './module.args';
|
|||
import { exec } from './sei-helper-fixes';
|
||||
import { console } from './log';
|
||||
import ffprobe from 'ffprobe';
|
||||
import ffprobeStatic from 'ffprobe-static';
|
||||
|
||||
export type MergerInput = {
|
||||
path: string,
|
||||
|
|
@ -67,10 +67,11 @@ class Merger {
|
|||
public async createDelays() {
|
||||
//Don't bother scanning it if there is only 1 vna stream
|
||||
if (this.options.videoAndAudio.length > 1) {
|
||||
const bin = await yamlCfg.loadBinCfg();
|
||||
const vnas = this.options.videoAndAudio;
|
||||
//get and set durations on each videoAndAudio Stream
|
||||
for (const [vnaIndex, vna] of vnas.entries()) {
|
||||
const streamInfo = await ffprobe(vna.path, { path: ffprobeStatic.path });
|
||||
const streamInfo = await ffprobe(vna.path, { path: bin.ffprobe as string });
|
||||
const videoInfo = streamInfo.streams.filter(stream => stream.codec_type == 'video');
|
||||
vnas[vnaIndex].duration = videoInfo[0].duration;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
"eslint-plugin-import": "^2.27.5",
|
||||
"express": "^4.18.2",
|
||||
"ffprobe": "^1.1.2",
|
||||
"ffprobe-static": "^3.1.0",
|
||||
"form-data": "^4.0.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"got": "^11.8.6",
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@ dependencies:
|
|||
ffprobe:
|
||||
specifier: ^1.1.2
|
||||
version: 1.1.2
|
||||
ffprobe-static:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
form-data:
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0
|
||||
|
|
@ -3523,10 +3520,6 @@ packages:
|
|||
dependencies:
|
||||
reusify: 1.0.4
|
||||
|
||||
/ffprobe-static@3.1.0:
|
||||
resolution: {integrity: sha512-Dvpa9uhVMOYivhHKWLGDoa512J751qN1WZAIO+Xw4L/mrUSPxS4DApzSUDbCFE/LUq2+xYnznEahTd63AqBSpA==}
|
||||
dev: false
|
||||
|
||||
/ffprobe@1.1.2:
|
||||
resolution: {integrity: sha512-a+oTbhyeM7Z8PRy+mpzmVUAnATZT7z4BO94HSKeqHupdmjiKZ1djzcZkyoyXA21zCOCG7oVRrsBMmvvtmzoz4g==}
|
||||
dependencies:
|
||||
|
|
|
|||
Loading…
Reference in a new issue