Skip to content

Segment index is 1 more than media sequence in playlist #204

Open
@Ivan114654

Description

@Ivan114654

Hello, per RFC HTTP Live Streaming 2nd Edition,
#EXT-X-MEDIA-SEQUENCE sets sequence number for first segment, example from the RFC

   #EXTM3U
   #EXT-X-VERSION:3
   #EXT-X-TARGETDURATION:8
   #EXT-X-MEDIA-SEQUENCE:2680
   #EXTINF:7.975,
   https://priv.example.com/fileSequence2680.ts
   #EXTINF:7.941,
   https://priv.example.com/fileSequence2681.ts
   #EXTINF:7.975,
   https://priv.example.com/fileSequence2682.ts

but in media framework media sequence of first segment on 1 bigger:

#EXTM3U
#EXT-X-TARGETDURATION:4
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:1714957236
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-ALLOW-CACHE:YES
#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,CAN-SKIP-UNTIL=24.000,PART-HOLD-BACK=3.000
#EXT-X-PART-INF:PART-TARGET=1.000
#EXT-X-MAP:URI="init-1714957226-s1080-v.mp4"
#EXT-X-PROGRAM-DATE-TIME:2024-05-06T01:01:09.998+00:00
#EXT-X-PART:DURATION=1.000,INDEPENDENT=YES,URI="part-1714957237-1-s1080-v.m4s"
#EXT-X-PART:DURATION=1.000,URI="part-1714957237-2-s1080-v.m4s"
#EXT-X-PART:DURATION=1.000,INDEPENDENT=YES,URI="part-1714957237-3-s1080-v.m4s"
#EXT-X-PART:DURATION=1.000,URI="part-1714957237-4-s1080-v.m4s"
#EXTINF:4.000,
seg-1714957237-s1080-v.m4s
...

here seg-1714957237-s1080-v.m4s has 1714957236 media sequence,
and should be named as seg-1714957236-s1080-v.m4s then,
it is not big deal, but this might be misleading

UPD: And it is not just naming, segment indexes gotten from media framework API endpoints have same numbers as in segment names, which don't add up with #EXT-X-MEDIA-SEQUENCE in a playlist.
So if you want to somehow post-process playlists you should aware about it. It would be better if segment indexes and media sequences were the same numbers.

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