Open clitic opened 2 years ago
@sdroege I think PR only fixes write_to
method. What about parsing unknown media playlist unknown tags into unknown_tags
field ?
Indeed. The problem here is that everything that is not a known media playlist tag ends up in a media segment as there's no clear indication in HLS between what is the media playlist "header" and where the media segments are starting.
This looks like it could be improved a bit though. Your first #EXT-SEGMENT-UNKNOWN-TAG
could be either part of the "header" or part of the first segment, but the other unknown tags are clear.
What we could probably do here is to consider everything part of the "header" until the first known media segment tag is found. In that case your first #EXT-SEGMENT-UNKNOWN-TAG
would not be part of the media segment though.
What do you think?
Thanks for explaining me so well. I understood that we can't parse #EXT-PLAYLIST-UNKNOWN-TAG
because it can be a potential segment unknown tag. Maybe we can specify media playlist unknown tags after the last segment similar to #EXT-X-ENDLIST
tag.
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-SEGMENT-UNKNOWN-TAG
#EXTINF:10,
seg-1.ts
#EXT-SEGMENT-UNKNOWN-TAG
#EXTINF:10,
seg-2.ts
#EXT-PLAYLIST-UNKNOWN-TAG
#EXT-X-ENDLIST
I would consider everything part of the playlist until the first known media segment tag, and everything after the last media segment URL/filename also as part of the playlist. Everything in between would be for the next segment.
It would be the best solution to this problem. If someone wants to check unknown_tags for first segment, then it can be inferred from playlist unknown_tags.
Or they would have to be after some other known media segment tag, e.g. between the extinf and segment URL/filename
I have never seen a playlist using media unknown tags in between segments. Everything between the extinf and segment URL/filename should be considered as segment unknown tags.
That's what I'm saying, yes. Sorry if I wasn't clear :)
hey @sdroege are you still working on this?
Not right now, please feel free to take this over.