mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-04-21 08:21:56 +00:00
parent
c907510e20
commit
b1bd11235e
2 changed files with 14 additions and 5 deletions
12
funi.js
12
funi.js
|
|
@ -549,7 +549,7 @@ async function downloadStreams(){
|
|||
console.log('[INFO] Skip video downloading...\n');
|
||||
}
|
||||
|
||||
if (!argv.novids && plAud.uri) {
|
||||
if (!argv.noaudio && plAud.uri) {
|
||||
// download audio
|
||||
let reqAudio = await getData({
|
||||
url: plAud.uri,
|
||||
|
|
@ -627,7 +627,7 @@ async function downloadStreams(){
|
|||
}
|
||||
}
|
||||
if (!langCode)
|
||||
langCode = argv.sub ? 'jpn' : 'eng'
|
||||
langCode = argv.sub ? 'jpn' : 'eng';
|
||||
|
||||
// usage
|
||||
let usableMKVmerge = true;
|
||||
|
|
@ -646,6 +646,9 @@ async function downloadStreams(){
|
|||
console.log('[WARN] FFmpeg not found, skip using this...');
|
||||
usableFFmpeg = false;
|
||||
}
|
||||
if ( argv.novids ){
|
||||
console.log('[INFO] Video not downloaded. Skip muxing video.');
|
||||
}
|
||||
|
||||
// ftag
|
||||
argv.ftag = argv.ftag ? argv.ftag : argv.a;
|
||||
|
|
@ -686,10 +689,11 @@ async function downloadStreams(){
|
|||
let ffmux = `-i "${muxTrg}.ts" `;
|
||||
if(plAud.uri){
|
||||
ffmux += `-i "${muxTrgA}.ts" `;
|
||||
ffmux += '-map 1:a ';
|
||||
}
|
||||
ffmux += addSubs ? `-i "${muxTrg}${subsExt}" ` : '';
|
||||
ffmux += '-map 0 -map 1:a -c:v copy -c:a copy ';
|
||||
ffmux += addSubs ? '-map 1 ' : '';
|
||||
ffmux += '-map 0 -c:v copy -c:a copy ';
|
||||
ffmux += addSubs ? `-map ${plAud.uri ? 2 : 1} ` : '';
|
||||
ffmux += addSubs && !argv.mp4 ? '-c:s ass ' : '';
|
||||
ffmux += addSubs && argv.mp4 ? '-c:s mov_text ' : '';
|
||||
ffmux += '-metadata encoding_tool="no_variable_data" ';
|
||||
|
|
|
|||
|
|
@ -91,10 +91,15 @@ const appArgv = (cfg) => {
|
|||
type: 'number',
|
||||
})
|
||||
// skip
|
||||
.option('noaudio', {
|
||||
group: 'Downloading:',
|
||||
describe: 'Skip downloading audio',
|
||||
type: 'boolean'
|
||||
})
|
||||
.option('novids', {
|
||||
group: 'Downloading:',
|
||||
alias: 'skipdl',
|
||||
describe: 'Skip downloading video (for downloading subtitles only)',
|
||||
describe: 'Skip downloading video',
|
||||
type: 'boolean',
|
||||
})
|
||||
.option('nosubs', {
|
||||
|
|
|
|||
Loading…
Reference in a new issue