Skip to content
forked from telvue/m3uzi

Read, create, write and validate M3U8 files.

License

Notifications You must be signed in to change notification settings

os6sense/m3uzi2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

M3Uzi2

Code Climate Build Status Test Coverage

Unfinished, incomplete tests, not a version 1.0.0 despite what the version says!

This started life as a simple bug fix of M3uzi but ended up becoming such a major rewrite that there is very little (if any!) of the original m3uzi remaining.

I'm still working on the client which actually uses this gem hence patches/issues are WELCOME!

Usage

There are a few ways to use the main components - the most basic is to include M3Uzi2

Read an M3U8 file:

m3u8 = M3Uzi2.new('../spec/samples/valid/2014-08-18-122730.M3U8')

Write an M3U8 file:

m3u8.save('../spec/samples/valid/2014-08-18-122730.COPY.M3U8')

Write to a stream:

m3u8.write_io_stream(stream = StringIO.new)

Get a list of media segments:

m3u8.media_segments

Get a single media segment by name:

m3u8.media_segment['something.ts']

Add a media segment:

Get all tag reference objects:

Get a tag value:

Set an individual tag value:

Add a tag to the M3U index :

Check if a file is valid:

m3u8.valid?

Create a sliding window:

m3u8.slide!

Note that this is currently a shebang method and the in memory content will be altered.

NOTES

  • Target duration will be calculated and included if omitted

TODO

About

Read, create, write and validate M3U8 files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%