I'm currently working on an Iptv player app, and i have managed to parse the m3u file, the problem now that i want to separate live tv from Vod, i don't know when live tv channels ends and the Vod begins in the playlists
here are the keys of every object after the parsing is complete
[ 'duration', 'title', 'tvgId', 'tvgName', 'tvgLogo', 'groupTitle' ]
i'm using nestJs and m3u8-file-parser library for m3u parsing
I'm assuming that your question is about HLS video. The short answer is that there's nothing in the HLS specification that lets you determine whether content is live. The stream types do lead to some confusion about that
the specification defines 3 types of streams:
VOD,LIVE, andEVENT.VOD streams, which have the following characteristics:
#EXT-X-PLAYLIST-TYPE:VODLIVE streams, which have the following characteristics:
EXT-X-PLAYLIST-TYPEtagEVENT streams, which have the following characteristics:
EXT-X-PLAYLIST-TYPE: EVENTtagWe need to distinguish between the LIVE stream type and 'liveness' as we usually think about it. As we noted above, a LIVE stream type just means that the stream is being presented as a sliding window with old segments falling off and new segments being added, whereas a VOD stream type has all the segments listed in the manifest and it never changes.
This is different from our usual conception of 'liveness' where we think that the
contentof the video is happening 'right now' (or perhaps almost 'right now', allowing for some latency)I know of at least one commercial HLS server product that uses LIVE stream type to dynamically create a stream that is a combination of live ('right now') content and prerecorded stored content by concatenating the segments in a single stream.
Since the originator of the stream can do this at their pleasure, and since the HLS spec doesn't offer any guidance about describing the 'liveness' of the content, you will only be able to determine if content is really live if the originator of the stream uses custom tags or naming or other conventions to indicate when LIVE and VOD content start and end. In my experience, that does not commonly happen.