mirror of
https://github.com/chrisbenincasa/tunarr.git
synced 2026-04-18 09:03:35 -04:00
fix: pass target audio codec to audio channel filter rather than source
Fixes issues with AAC output >2 channels
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { AudioFormats } from '../constants.ts';
|
||||
import { makeConstantOutputOption } from './OutputOption.ts';
|
||||
|
||||
export const AudioChannelsOutputOption = (
|
||||
@@ -8,7 +9,7 @@ export const AudioChannelsOutputOption = (
|
||||
const opts: string[] = [];
|
||||
if (
|
||||
sourceChannels !== desiredChannels ||
|
||||
(audioFormat === 'aac' && desiredChannels > 2)
|
||||
(audioFormat === AudioFormats.Aac && desiredChannels > 2)
|
||||
) {
|
||||
opts.push('-ac', desiredChannels.toString());
|
||||
}
|
||||
|
||||
@@ -580,7 +580,7 @@ export abstract class BasePipelineBuilder implements PipelineBuilder {
|
||||
if (!isNull(this.context.desiredAudioState.audioChannels)) {
|
||||
this.pipelineSteps.push(
|
||||
AudioChannelsOutputOption(
|
||||
this.context.audioStream.codec,
|
||||
this.context.desiredAudioState.audioEncoder,
|
||||
this.context.audioStream.channels,
|
||||
this.context.desiredAudioState.audioChannels,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user