tedconf / node-m3u8

Streaming parser for m3u8 files in node
MIT License
189 stars 77 forks source link

few extra features #16

Open akhoury opened 8 years ago

akhoury commented 8 years ago

List of additions/changes (all backward compatible)

parser

I think I covered all the things I added :), still a little shy but I will submit more as I move along.

bog commented 8 years ago

Wow, thanks for this. I'll be taking a closer look soon.

blainsmith commented 8 years ago

Wow, these are awesome additions! I'd love to take advantage of all of these. If you need help reviewing to get this PR merged I would be glad to. I have this module used in production now and I'd love these new additions/fixes.

bog commented 8 years ago

I haven't had time yet. If you have time @blainsmith, it'd be appreciated.

blainsmith commented 8 years ago

Great, I will poke around at it. If you ever need another maintainer I'd be glad to help out. I do rely on this plugin a lot so I would love it to stay alive. We are using it at http://oddnetworks.com

blainsmith commented 8 years ago

So I found and issue with isLive() and isVOD() and that is with the following:

#EXTM3U

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio-1",NAME="Audio",LANGUAGE="en",AUTOSELECT=YES,URI="audio_0_128000_hls.m3u8"

#EXT-X-STREAM-INF:BANDWIDTH=4928000,CODECS="avc1.64000d,mp4a.40.2",RESOLUTION=1280x544,AUDIO="audio-1"
video_0_2400000_hls.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2528000,CODECS="avc1.64000d,mp4a.40.2",RESOLUTION=854x362,AUDIO="audio-1"
video_0_1200000_hls.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1728000,CODECS="avc1.64000d,mp4a.40.2",RESOLUTION=640x272,AUDIO="audio-1"
video_0_800000_hls.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=928000,CODECS="avc1.64000d,mp4a.40.2",RESOLUTION=426x180,AUDIO="audio-1"
video_0_400000_hls.m3u8

This is actually a VOD, but it is the master.m3u8 file defining the bitrates. Unfortunately, you cannot tell it is either live or VOD until you parse the subsequent m3u8 urls (video_0_X_hls.m3u8). In most cases EXT-X-PLAYLIST-TYPE and EXT-X-ENDLIST will never appear in a file like this. Perhaps an isMaster() method to account for this 3rd format would help identify them.

akhoury commented 8 years ago

Sounds good, I can add that in

akhoury commented 8 years ago

@bog, @blainsmith any more comments? and/or any idea when this would be merged? if accepted

tjenkinson commented 7 years ago

I could do with these new features as well :)

tjenkinson commented 7 years ago

I'm working on a fork for now so I have can point to it from a package.json file. Will switch it to point here when this is merged :)

akhoury commented 7 years ago

ping @bog