Skip to content

Commit

Permalink
Fix to allow multi language audio to be packaged correctly.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Prakash Duggaraju authored and pohhsu committed Dec 26, 2023
1 parent 146d726 commit 2dd5b13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migrationTool/transform/ShakaPackager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ private IEnumerable<string> GetArguments(IList<string> inputs, IList<string> 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
{
Expand Down

0 comments on commit 2dd5b13

Please sign in to comment.