Omar Salix > Video-M3U8-0.0.3 > Video::M3U8



Annotate this POD


New  1
Open  0
View/Report Bugs

Overview ^

Module for fetching and working with M3U8 manifest files. This is for individual manifests not multi-variant playlists (I may eventually create a module that builds on this)


        $m = Video::M3U8->new($url_or_filename)

If the string contains 'http', new() will fetch the contains from the web, if it does not, new will read from the file and process the contents, the contents are read into a hash once. since its possible for playlists to be updated consistently, the only time it is fetched is on 'new()', all other functions work from cache, each new manifest or seeking updates should be called again.

Get playlist

Function will return the entire manifest/playlist


Get tags

If you would just like to use the tags;


Checking for the last playlist

If its an Ondemand playlist or the last in a Live stream (contains EXT-X-ENDLIST tag) this sub will return '1' (true)


Checking for target duration

Function will return the target duration



 Copyright (c) 2012
 Cost: tell me about bugs or points to improve - have fun.
 Omar Salix, <>
syntax highlighting: