2

I have a list of .ts file segments that follow this pattern

http://www.someaddress.com/file_11223344.ts
http://www.someaddress.com/file_11223345.ts
http://www.someaddress.com/file_11223346.ts
...

Since I need a m3u8 file in order to open this videos, is there a way to generate this m3u8 manually (from ts segments) in .php for example. Original m3u8 is protected and generated only if I have user/pass id etc. This is live stream that is always updated and generated based on a timestamp

  • In case you didn't find a way, you could try something very simple like this while checking with php or something else whether or not the next segment is available (maybe with an HTTP HEAD request) and, when it is, update your playlist accordingly by adding its URL and removing the first segment's URL. #EXTM3U #EXT-X-VERSION:3 [3 segments]. – Æðelstan Sep 07 '16 at 11:30

4 Answers4

1

if you have the main file, let's say : http://www.someaddress.com/file_11223344.ts you don't have to convert anything. just change the end of the URL from .ts to .m3u8 that's it :)

korchix
  • 867
  • 9
  • 14
  • It works, but it appears to lose information along the way (like additional audio streams). Any workarounds for that? – Demosthese Jul 21 '19 at 19:36
0

Yes there is a way. You just generate it. The m3u8 spec is very simple and fully documented. https://tools.ietf.org/html/draft-pantos-http-live-streaming-19

szatmary
  • 27,213
  • 7
  • 39
  • 54
  • You are correct my man! I just used this method with Atom editor creating a Roku app and it did indeed work! Just had to make sure there was no BOM and yup, it works. – norcal johnny Jan 03 '17 at 08:39
0

szatmary is correct.

For your case, being pass protected you can use json or xml feeds and parse it or simply call the m3u8 file and make sure it is done in utf-8 without BOM. Here is a m3u8 method.

#EXTM3U
#EXTINF:-1,Title Here
http://www.someaddress.com/live/user/pass/file_11223344.m3u8
#EXTINF:-1,Title Here
http://www.someaddress.com/live/user/pass/file_11223345.m3u8
#EXTINF:-1,Title Here
http://www.someaddress.com/live/user/pass/file_11223346.m3u8

Learn about BOM here What's different between UTF-8 and UTF-8 without BOM?

Community
  • 1
  • 1
norcal johnny
  • 1,850
  • 1
  • 11
  • 17
-1

All you have to do is a IPTV website which provide .ts streaming file, If you have subscription then it will be more useful. Just you want to change one address.