Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Segmented subtitles not handled properly #117

@Xewdy444

Description

@Xewdy444

Describe the bug
Subtitle tracks listed in MPD files with a startNumber value greater than 1 are not downloaded properly. For example, this subtitle track should be downloaded as 9 segments and merged together accordingly:

<AdaptationSet id="51" lang="en-US" contentType="text" segmentAlignment="true">
    <Label>en-US</Label>
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
    <BaseURL>https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/</BaseURL>
    <Representation mimeType="text/vtt" id="t15" bandwidth="7">
        <SegmentTemplate timescale="1000" presentationTimeOffset="8132916" startNumber="9" media="t/0_23e44d/t15/$Number$.vtt">
            <SegmentTimeline>
                <S t="8132916" d="1814103"/>
            </SegmentTimeline>
        </SegmentTemplate>
    </Representation>
</AdaptationSet>

The segment URLs would be:

https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/1.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/2.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/3.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/4.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/5.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/6.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/7.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/8.vtt
https://gcp.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/t/0_23e44d/t15/9.vtt

Devine instead only downloads segment 9.

MPD URL: https://akm.prd.media.h264.io/e58e0cad-2e65-463e-baaa-825862402a5a/1_7260bd_fallback.mpd

To Reproduce
Attempt to download an MPD subtitle track with a startNumber value greater than 1.

Expected behavior
The subtitle segments are all downloaded and merged accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions