Skip to content

Commit

Permalink
Merge pull request #76 from Marnalas/flowPluginSetDefaultAudioStream
Browse files Browse the repository at this point in the history
Added -c: copy in the streams output args
  • Loading branch information
Marnalas authored Jan 10, 2025
2 parents be52fad + 1fbbe9f commit a3ccecc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ var plugin = function (args) {
&& ((_c = stream.channels) !== null && _c !== void 0 ? _c : 0) === channels
&& !defaultSet) {
args.jobLog("Setting stream ".concat(index, " (language ").concat(languageCode, ", channels ").concat(channels, ") has default"));
stream.outputArgs.push("-disposition:".concat(index), 'default');
stream.outputArgs.push("-c:".concat(index), 'copy', "-disposition:".concat(index), 'default');
defaultSet = true;
}
else
stream.outputArgs.push("-disposition:".concat(index), '0');
stream.outputArgs.push("-c:".concat(index), 'copy', "-disposition:".concat(index), '0');
}
});
if (defaultSet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ const plugin = (args: IpluginInputArgs): IpluginOutputArgs => {
&& (stream.channels ?? 0) === channels
&& !defaultSet) {
args.jobLog(`Setting stream ${index} (language ${languageCode}, channels ${channels}) has default`);
stream.outputArgs.push(`-disposition:${index}`, 'default');
stream.outputArgs.push(`-c:${index}`, 'copy', `-disposition:${index}`, 'default');
defaultSet = true;
} else stream.outputArgs.push(`-disposition:${index}`, '0');
} else stream.outputArgs.push(`-c:${index}`, 'copy', `-disposition:${index}`, '0');
}
});

Expand Down

0 comments on commit a3ccecc

Please sign in to comment.