我买了一个IPTV经销商账号,我得到了这样的链接:
#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...现在,我想成为一名网络电视提供商,所以我提供的m3u播放列表文件应该是这样的:
#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...我应该在viewchannel.php文件中写入什么来实时流式传输TS文件?
所以http://example.com/viewchannel.php?username=User&password=test&channelid=13095必须重定向到http://X.X.X.X:15000/live/USERNAME/PASSWORD/13095.ts,并且它应该可以在播放器上播放……
我试着这样使用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();
?>但它不适用于来自URL的流(或者它可能不适用于直播流)。
发布于 2019-03-18 17:29:36
最好的选择是从可靠的主机提供商那里获得VPS主机,并注册为IPTV streams提供商的回流合作伙伴。
https://stackoverflow.com/questions/43030104
复制相似问题