From 23a0a1a4e1e59741c8bb9a52fbc9430ad67651f4 Mon Sep 17 00:00:00 2001 From: Prakash Duggaraju Date: Fri, 22 Dec 2023 10:50:40 -0800 Subject: [PATCH] Fix to allow multi language audio to be packaged correctly. Use stream id instead of stream type to select multiple audios correctly. Assumes that track id is stream_index + 1 which works 99% of time but could be incorrect some times. --- migrationTool/transform/ShakaPackager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrationTool/transform/ShakaPackager.cs b/migrationTool/transform/ShakaPackager.cs index 6684fe1..95b9995 100644 --- a/migrationTool/transform/ShakaPackager.cs +++ b/migrationTool/transform/ShakaPackager.cs @@ -139,7 +139,7 @@ private IEnumerable GetArguments(IList inputs, IList out var stream = t.Type.ToString().ToLowerInvariant(); var language = string.IsNullOrEmpty(t.SystemLanguage) || t.SystemLanguage == "und" ? string.Empty : $",language={t.SystemLanguage},"; var role = t is TextTrack ? $",dash_role={values[text_tracks++ % values.Length].ToString().ToLowerInvariant()}" : string.Empty; - return $"stream={stream},in={inputFile},out={outputs[i]},playlist_name={manifests[i]}{language}{drm_label}{role}"; + return $"stream={t.TrackID - 1},in={inputFile},out={outputs[i]},playlist_name={manifests[i]}{language}{drm_label}{role}"; } else {