Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add raw list of segment lines to manifest #145

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jeff-transmit
Copy link

Feature #49

Adds raw segment lines to the parsed manifest.

Playlist:

#EXTM3U
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-TARGETDURATION:10
#EXTINF:10,
media-00001.ts
#EXTINF:10,
media-00002.ts
#EXTINF:10,
media-00003.ts
#EXTINF:10,
media-00004.ts
#EXT-X-ENDLIST

Parsed output:

{
  allowCache: true,
  mediaSequence: 0,
  playlistType: 'VOD',
  segments: [
    {
      duration: 10,
      raw: [
        '#EXTINF:10,',
        'media-00001.ts'
      ],
      timeline: 0,
      uri: 'media-00001.ts'
    },
    {
      duration: 10,
      raw: [
        '#EXTINF:10,',
        'media-00002.ts'
      ],
      timeline: 0,
      uri: 'media-00002.ts'
    },
    {
      duration: 10,
      raw: [
        '#EXTINF:10,',
        'media-00003.ts'
      ],
      timeline: 0,
      uri: 'media-00003.ts'
    },
    {
      duration: 10,
      raw: [
        '#EXTINF:10,',
        'media-00004.ts'
      ],
      timeline: 0,
      uri: 'media-00004.ts'
    }
  ],
  targetDuration: 10,
  endList: true,
  discontinuitySequence: 0,
  discontinuityStarts: []
}

@gkatsev
Copy link
Member

gkatsev commented Jul 13, 2021

Can you provide more info on why this would be useful?

@gkatsev
Copy link
Member

gkatsev commented Jul 13, 2021

Ah, missed the link to the issue.

@gkatsev
Copy link
Member

gkatsev commented Jul 13, 2021

I think my main concern here is that we often have memory issues in VHS and keeping around even more strings is going to exacerbate it.

@gkatsev
Copy link
Member

gkatsev commented Jul 13, 2021

One alternative would be to feature flag this and make it default off and then if someone needs it, they can have it.

I think a concrete usecase would be nice, though.

@jeff-transmit
Copy link
Author

One alternative would be to feature flag this and make it default off and then if someone needs it, they can have it.

I think a concrete usecase would be nice, though.

In our case, we need to be able to change and rebuild the playlist after using the parsed playlist and it would be more efficient to do this with the raw segment lines rather than processing the whole playlist again.

@gkatsev
Copy link
Member

gkatsev commented Jul 14, 2021

Are you using m3u8-parser directly or via VHS?

@jeff-transmit
Copy link
Author

Are you using m3u8-parser directly or via VHS?

We are using it directly.

@peterblazejewicz
Copy link
Contributor

peterblazejewicz commented Sep 5, 2021

IIMO there could be a pluggable metod to create event data or could be via events allowing to movidy events/source as callback, kind of the data parser for custom tari. No constructor changes (imagine, next version requires new param, actual core feature, this time required, to be added or removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants