FF-1173: Trying to fix channels parsing

This commit is contained in:
John Andrews
2024-01-07 10:56:18 +13:00
parent de6f30b11a
commit 246fb77cae

View File

@@ -214,17 +214,18 @@ public class FfmpegBuilderAudioAddTrack : FfmpegBuilderNode
{
audio.Codec = Codec;
int sampleRate = SampleRate == 1 ? audio.Stream.SampleRate : SampleRate;
int totalChannels = GetAudioBitrateChannels(audio);
if (totalChannels == 8 && Codec == "eac3")
{
args.Logger?.ILog("EAC3 detected with 7.1, switch to 5.1");
totalChannels = 6;
Channels = 5.1f;
}
int bitrate = Bitrate;
if (BitratePerChannel)
{
int totalChannels = GetAudioBitrateChannels(audio);
if (totalChannels == 8 && Codec == "eac3")
{
args.Logger?.ILog("EAC3 detected with 7.1, switch to 5.1");
totalChannels = 6;
Channels = 5.1f;
}
args.Logger?.ILog("Total channels: " + totalChannels);
args.Logger?.ILog("Bitrate Per Channel: " + bitrate);