rounce / nginx-hls-module

Smooth Streaming Module fork
Other
53 stars 34 forks source link

Relative URL instead of fixed from root in generated m3u8 #5

Closed marcelpoelstra closed 10 years ago

marcelpoelstra commented 10 years ago

First of all, I love this plugin, it works like a charm.

However, one thing might be worth considering. In the generated m3u8 the chunks are referenced like :

EXTINF:12.000,

/53e8838134bb886b7646c6b7/53e8838134bb886b7646c6b7.ts?video=0

EXTINF:12.000,

/53e8838134bb886b7646c6b7/53e8838134bb886b7646c6b7.ts?video=4

However, this does not work for certain applications, like when the hls uri in Safari, it will not find the videos and just parse the m3u8 as a text file. Same for VLC, it can not "find" the chuncks. Quicktime player however works fine, so do iPhones and iPods.

It turns out that when constructing the m3u8 like this instead (so with a relative path) it fixes this issue:

EXTINF:12.000,

53e8838134bb886b7646c6b7/53e8838134bb886b7646c6b7.ts?video=0

So, without the leading / . everery thing works fine, also in Safari and in VLC. Maybe the (relative) path to the chuncks could be a configurable option ?

Keep up the good work !

rounce commented 10 years ago

relative path should be 53e8838134bb886b7646c6b7.ts?video=0 or /53e8838134bb886b7646c6b7/53e8838134bb886b7646c6b7.ts?video=0

53e8838134bb886b7646c6b7/53e8838134bb886b7646c6b7.ts?video=0 is wrong. My VLC (v.2.1.2) can't find the chunks without the leading /.

Check commit 5780b6b please.

marcelpoelstra commented 10 years ago

That is looking exactly like I meant ! :)

I need to rebuild nginx and do some testing, I will let you know the result

Thanks !

marcelpoelstra commented 10 years ago

I did some extensive testing with this and it is working perfectly now !