Skip to content

Commit

Permalink
always transcode multichannel aac if surround sound is detected
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Oct 20, 2024
1 parent f748770 commit 9a4ac22
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions source/api/Items.bs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ function ItemPostPlaybackInfo(id as string, mediaSourceId = "" as string, audioT
end if
end if
end for

' don't direct play multi-channel AAC
if selectedAudioStream.Codec <> invalid and LCase(selectedAudioStream.Codec) = "aac"
for each container in deviceProfile.DirectPlayProfiles
if container.AudioCodec = "aac"
container.AudioCodec = ""
else if container.AudioCodec.Left(4) = "aac,"
container.AudioCodec = mid(container.AudioCodec, 5)
end if
end for
end if
end if

end if
Expand Down
2 changes: 1 addition & 1 deletion source/utils/deviceCapabilities.bs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function GetDirectPlayProfiles() as object
}
' all possible codecs (besides those restricted by user settings)
videoCodecs = ["h264", "mpeg4 avc", "vp8", "vp9", "h263", "mpeg1"]
audioCodecs = ["mp3", "mp2", "pcm", "lpcm", "wav", "ac3", "ac4", "aiff", "wma", "flac", "alac", "aac", "opus", "dts", "wmapro", "vorbis", "eac3", "mpg123"]
audioCodecs = ["aac", "mp3", "mp2", "pcm", "lpcm", "wav", "ac3", "ac4", "aiff", "wma", "flac", "alac", "opus", "dts", "wmapro", "vorbis", "eac3", "mpg123"]

' check if hevc is disabled
if globalUserSettings["playback.compatibility.disablehevc"] = false
Expand Down

0 comments on commit 9a4ac22

Please sign in to comment.