Skip to content

Commit

Permalink
add stream index to various options in ensureAudioStream
Browse files Browse the repository at this point in the history
  • Loading branch information
Sipnol committed Oct 17, 2024
1 parent 9b66243 commit 686a7ab
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ var details = function () { return ({
},
tooltip: 'Tdarr will add this name to the metadata title of the audio stream.',
},
{
label: 'Modify existing audio tracks Title',
name: 'enableTitleAdjust',
type: 'boolean',
defaultValue: 'false',
inputUI: {
type: 'switch',
},
tooltip: 'Append "(original)" to the existing audio tracks Title',
},
{
label: 'Audio Encoder',
name: 'audioEncoder',
Expand Down Expand Up @@ -162,7 +152,8 @@ var details = function () { return ({
inputUI: {
type: 'switch',
},
tooltip: 'Toggle whether to enable setting audio upmixing this will only get used if there is no higher channel count available',
tooltip: 'Toggle whether to enable setting audio upmixing this'
+ 'will only get used if there is no higher channel count available',
},
{
label: 'Upmixing pan filter',
Expand Down Expand Up @@ -274,14 +265,14 @@ var attemptMakeStream = function (_a) {
streamCopy.mapArgs = [];
}
else {
streamCopy.outputArgs.push('-ac', "".concat(targetChannels));
streamCopy.outputArgs.push('-ac:a:{outputTypeIndex}', "".concat(targetChannels));
}
streamCopy.outputArgs.push('-c:{outputIndex}', audioEncoder);
streamCopy.outputArgs.push('-c:a:{outputTypeIndex}', audioEncoder);
if (enableBitrate) {
streamCopy.outputArgs.push("-b:a:{outputTypeIndex}", "".concat(bitrate));
streamCopy.outputArgs.push('-b:a:{outputTypeIndex}', "".concat(bitrate));
}
if (enableSamplerate) {
streamCopy.outputArgs.push('-ar', "".concat(samplerate));
streamCopy.outputArgs.push('-ar:a:{outputTypeIndex}', "".concat(samplerate));
}
if (streamName !== '') {
streamCopy.outputArgs.push('-metadata:s:a:{outputTypeIndex}', "title=".concat(streamName));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,16 +305,16 @@ const attemptMakeStream = ({
streamCopy.outputArgs.push('-map', '[a_{outputIndex}]');
streamCopy.mapArgs = [];
} else {
streamCopy.outputArgs.push('-ac', `${targetChannels}`);
streamCopy.outputArgs.push('-ac:a:{outputTypeIndex}', `${targetChannels}`);
}
streamCopy.outputArgs.push('-c:{outputIndex}', audioEncoder);
streamCopy.outputArgs.push('-c:a:{outputTypeIndex}', audioEncoder);

if (enableBitrate) {
streamCopy.outputArgs.push('-b:a:{outputTypeIndex}', `${bitrate}`);
}

if (enableSamplerate) {
streamCopy.outputArgs.push('-ar', `${samplerate}`);
streamCopy.outputArgs.push('-ar:a:{outputTypeIndex}', `${samplerate}`);
}

if (streamName !== '') {
Expand Down

0 comments on commit 686a7ab

Please sign in to comment.