Add function to merge segment playlists
In case I want to play live stream, I download the playlist from one location and get few segments from continuing stream. I'd like have an function which merges these chunks to single playlist.
Playlist examples:
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:58877187
#EXT-X-TARGETDURATION:8
#EXT-X-PROGRAM-DATE-TIME:2015-12-05T14:11:36Z
#EXTINF:8
1502/58877187.ts
#EXTINF:8
1502/58877188.ts
#EXTINF:8
1502/58877189.ts
#EXTM3U
#EXT-X-MEDIA-SEQUENCE:58877188
#EXT-X-TARGETDURATION:8
#EXT-X-PROGRAM-DATE-TIME:2015-12-05T14:11:44Z
#EXTINF:8
1502/58877188.ts
#EXTINF:8
1502/58877189.ts
#EXTINF:8
1502/58877190.ts
@ziima can you explain it a little bit more? :) maybe give us examples of your idea, what is your wish. Are these two playlists from different bitrates?
I can point you to my script: https://github.com/ziima/televize/blob/master/televize.py#L77-L99
LiveStream.update is what I want. The playlist there is M3U8 object.
The playlists are from the same bitrates.
@ziima do you want to generate a single VOD playlist from a live playlist? it's like converting live to event type ... maybe offering two kinds of representation for the same playlist.
Sounds correct. I'm a bit lost in the terminology.
The major problem though is that we need to keep track of the data we're merging... and if someone is using this library as part of a distributed system it shouldn't work as expected unless we can enforce that a given playlist is being "watched" uniquely from a single node.