Stream live ts file from url - iptv

I bought an IPTV reseller account and I got these links:

#EXTM3U
#EXTINF:-1,CHANNEL NAME 1
http://X.X.X.X:15000/live/USERNAME/PASSWORD/13094.ts
#EXTINF:-1,CHANNEL NAME 2
http://X.X.X.X:15000/live/USERNAME/PASSWORD/13095.ts
etc...

Now I want to be an IPTV provider, so the m3u playlist file that I provide should be like this:

#EXTM3U
#EXTINF:-1,CHANNEL NAME 1
http://example.com/viewchannel.php?username=User&password=test&channelid=13094
#EXTINF:-1,CHANNEL NAME 2
http://example.com/viewchannel.php?username=User&password=test&channelid=13095
etc...

What should I write in the viewchannel.php file to broadcast to the TS file stream?

So http://example.com/viewchannel.php?username=User&password=test&channelid=13095 needs to be redirected to http: // XXXX: 15000 / live / USERNAME / PASSWORD / 13095.ts and it should be played on players ...

I tried using http://codesamplez.com/programming/php-html5-video-streaming-tutorial :

<?php
include("streamclass.php");
$filePath = "http://X.X.X.X:15000/live/USERNAME/PASSWORD/13094.ts";
$stream = new VideoStream($filePath);
$stream->start();
?>

but it doesn’t work for streaming from a URL (or maybe it doesn’t work for live streaming).

+3
source share

Source: https://habr.com/ru/post/1673235/


All Articles