mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-24 18:05:07 +00:00
fix(manifests): keep service drm, rebase carried vtt cues, ship single-track mpds
DASH no longer drops service-set DRM when the manifest has none, and the WebVTT rebase allows a cue that starts one segment early. --remote also sends single-track manifests matched by track id.
This commit is contained in:
@@ -286,8 +286,12 @@ class Subtitle(Track):
|
||||
self.data["dash"]["adaptation_set"], self.data["dash"]["representation"]
|
||||
)
|
||||
if template is not None:
|
||||
offset = template.get("presentationTimeOffset", "0")
|
||||
text = rebase_webvtt(text, int(offset) * 1000 // int(template.get("timescale", "1")))
|
||||
timescale = int(template.get("timescale", "1"))
|
||||
text = rebase_webvtt(
|
||||
text,
|
||||
int(template.get("presentationTimeOffset", "0")) * 1000 // timescale,
|
||||
int(template.get("duration", "0")) * 1000 // timescale,
|
||||
)
|
||||
if len(self.data["dash"]["segment_durations"]) > 1:
|
||||
text = merge_segmented_webvtt(
|
||||
text,
|
||||
|
||||
Reference in New Issue
Block a user