技术问题:
1. 知道文件大小如何计算播放时间
播放时间 = 文件大小 乘以 8 除以 码率
2. m3u8文件格式
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8
+++++++++++++++++++++++++++++
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:15,
http://xxx.com/pvideo/phpts.ts?slice=1&auth=aabbcd&mtime=1111&fname=xxxd
#EXTINF:15,
http://xxx.com/pvideo/phpts.ts?slice=1&auth=aabbcd&mtime=1111&fname=xxxd
#EXT-X-ENDLIST
3. 分片文件处理的PHP文件
http://xxx.com/pvideo/phpts.ts
4. nginx服务器连接重定向
http://xxx.com/pvideo/phpts.ts ===> http://xxx.com/pvideo/phpts.php
5. phpts.php文件内容, 动态读取文件流
$sliceLength = 64000;
$filesize = ?;
$start = ($slice - 1)*$sliceLength;
$obj.read(filename, length, start);
?>