Audio track fix
This commit is contained in:
1 parent
1678bee3b5
commit
ebabb6ca99
2 files changed
+30
-13
No files matched your search
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Nothing worth mentioning yet.
|
### Fixed
|
||||||
|
|
||||||
|
- Default audio track is now the regular audio instead of "Voice Boost" or "Stable Volume", which are now separate tracks
|
||||||
|
|
||||||
## [0.48.3] - 2026-07-28
|
## [0.48.3] - 2026-07-28
|
||||||
|
|
||||||
|
|||||||
@@ -255,6 +255,7 @@ class DashManifest
|
|||||||
xtagsInfo = m.GetXtagsInfo(format)
|
xtagsInfo = m.GetXtagsInfo(format)
|
||||||
format.xtagsInfo = xtagsInfo
|
format.xtagsInfo = xtagsInfo
|
||||||
format.isDrc = xtagsInfo.isDrc
|
format.isDrc = xtagsInfo.isDrc
|
||||||
|
format.isVoiceBoost = xtagsInfo.isVoiceBoost
|
||||||
format.isDubbed = xtagsInfo.isDubbed
|
format.isDubbed = xtagsInfo.isDubbed
|
||||||
format.isAutoDubbed = xtagsInfo.isAutoDubbed
|
format.isAutoDubbed = xtagsInfo.isAutoDubbed
|
||||||
format.isDescriptive = xtagsInfo.isDescriptive
|
format.isDescriptive = xtagsInfo.isDescriptive
|
||||||
@@ -277,12 +278,7 @@ class DashManifest
|
|||||||
audioTrackId = format.audioTrack.id
|
audioTrackId = format.audioTrack.id
|
||||||
end if
|
end if
|
||||||
|
|
||||||
drc = ""
|
groupId = `${mimeType}-${justCodec}-${colorInfo}-${audioTrackId}${m.GetAudioVariantSuffix(format)}`
|
||||||
if format.isDrc = true
|
|
||||||
drc = "drc"
|
|
||||||
end if
|
|
||||||
|
|
||||||
groupId = `${mimeType}-${justCodec}-${colorInfo}-${audioTrackId}-${drc}`
|
|
||||||
|
|
||||||
if groupInfo[groupId] = invalid
|
if groupInfo[groupId] = invalid
|
||||||
groupInfo[groupId] = []
|
groupInfo[groupId] = []
|
||||||
@@ -441,7 +437,7 @@ class DashManifest
|
|||||||
end for
|
end for
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if IsAssociativeArray(firstFormat.audioTrack) or firstFormat.isDrc = true
|
if IsAssociativeArray(firstFormat.audioTrack) or firstFormat.isDrc = true or firstFormat.isVoiceBoost = true
|
||||||
' Roles
|
' Roles
|
||||||
roles = m.GetTrackRoles(firstFormat)
|
roles = m.GetTrackRoles(firstFormat)
|
||||||
for each role in roles
|
for each role in roles
|
||||||
@@ -474,9 +470,7 @@ class DashManifest
|
|||||||
if IsAssociativeArray(stream.audioTrack) and IsString(stream.audioTrack.id)
|
if IsAssociativeArray(stream.audioTrack) and IsString(stream.audioTrack.id)
|
||||||
representationId = `${representationId}-${stream.audioTrack.id}`
|
representationId = `${representationId}-${stream.audioTrack.id}`
|
||||||
end if
|
end if
|
||||||
if stream.isDrc = true
|
representationId = `${representationId}${m.GetAudioVariantSuffix(stream)}`
|
||||||
representationId = `${representationId}-drc`
|
|
||||||
end if
|
|
||||||
|
|
||||||
representationAttributes = {
|
representationAttributes = {
|
||||||
"id": representationId
|
"id": representationId
|
||||||
@@ -739,7 +733,10 @@ class DashManifest
|
|||||||
|
|
||||||
function GetTrackRoles(format as object) as object
|
function GetTrackRoles(format as object) as object
|
||||||
roles = []
|
roles = []
|
||||||
if format.isOriginal = true
|
' Within the preferred language, the device defaults to a "main" track (a set
|
||||||
|
' without a Role counts as main) regardless of bitrate or manifest order.
|
||||||
|
' Stable Volume and Voice Boost are opt-in re-mixes of the original.
|
||||||
|
if format.isOriginal = true and format.isDrc <> true and format.isVoiceBoost <> true
|
||||||
roles.Push("main")
|
roles.Push("main")
|
||||||
else
|
else
|
||||||
roles.Push("alternate")
|
roles.Push("alternate")
|
||||||
@@ -753,13 +750,28 @@ class DashManifest
|
|||||||
roles.Push("description")
|
roles.Push("description")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
if format.isDrc = true
|
' The device's audio menu ignores Label: it lists tracks by language, and this
|
||||||
|
' role is what shows a same-language variant separately, as "Enhanced audio".
|
||||||
|
if format.isVoiceBoost = true
|
||||||
roles.Push("enhanced-audio-intelligibility")
|
roles.Push("enhanced-audio-intelligibility")
|
||||||
end if
|
end if
|
||||||
|
|
||||||
return roles
|
return roles
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
' Stable Volume and Voice Boost are re-mixes of the same itag: without the suffix
|
||||||
|
' they share an AdaptationSet (and Representation ids) with the regular mix.
|
||||||
|
function GetAudioVariantSuffix(format as object) as string
|
||||||
|
suffix = ""
|
||||||
|
if format.isDrc = true
|
||||||
|
suffix = `${suffix}-drc`
|
||||||
|
end if
|
||||||
|
if format.isVoiceBoost = true
|
||||||
|
suffix = `${suffix}-vb`
|
||||||
|
end if
|
||||||
|
return suffix
|
||||||
|
end function
|
||||||
|
|
||||||
function GenerateImageAdaptationSets(xml as object, storyboards as object, id as integer) as integer
|
function GenerateImageAdaptationSets(xml as object, storyboards as object, id as integer) as integer
|
||||||
' https://developer.roku.com/en-ca/docs/developer-program/media-playback/trick-mode/hls-and-dash.md#dash-standard-thumbnail-tiles
|
' https://developer.roku.com/en-ca/docs/developer-program/media-playback/trick-mode/hls-and-dash.md#dash-standard-thumbnail-tiles
|
||||||
for i = storyboards.Count() - 1 to 0 step -1
|
for i = storyboards.Count() - 1 to 0 step -1
|
||||||
@@ -885,6 +897,7 @@ class DashManifest
|
|||||||
lang: ""
|
lang: ""
|
||||||
acont: ""
|
acont: ""
|
||||||
isDrc: false
|
isDrc: false
|
||||||
|
isVoiceBoost: false
|
||||||
isDubbed: false
|
isDubbed: false
|
||||||
isAutoDubbed: false
|
isAutoDubbed: false
|
||||||
isDescriptive: false
|
isDescriptive: false
|
||||||
@@ -921,6 +934,8 @@ class DashManifest
|
|||||||
result.acont = tags[key]
|
result.acont = tags[key]
|
||||||
else if key = "drc" and tags[key] = "1"
|
else if key = "drc" and tags[key] = "1"
|
||||||
result.isDrc = true
|
result.isDrc = true
|
||||||
|
else if key = "vb" and tags[key] = "1"
|
||||||
|
result.isVoiceBoost = true
|
||||||
end if
|
end if
|
||||||
end for
|
end for
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user