dongyou5098 2017-02-16 14:03
浏览 246

写入目标文件时的HTTP RANGE

I want to organize a live video streaming via HTTP RANGE (HLS isn't suitable for my purposes) from files on my streaming server are recorded at the time of the request. On the server side I use the following header:

header('HTTP/1.1 206 Partial Content');
header("Content-Type: video/mpeg");
header('Content-Length: '.($seek_end - $seek_start));
header('Content-Range: bytes '.$seek_start.'-'.$seek_end.'/'.$size);

When I requested a file via ffplay or vlc it's playing good, but stoped at the moment when file has been requested. I tried artificially increase a $size, but situation has not changed, only saw Stream ends prematurely errors in ffplay log:

[http @ 0x7f30a40079e0] Stream ends prematurely at 34156620, should be 35180908
[http @ 0x7f30a40079e0] Stream ends prematurely at 33656620, should be 35443052
[http @ 0x7f30a40079e0] Stream ends prematurely at 32656620, should be 35705196

How can I organized a live video streaming via http from files on my streaming server are recorded at the time of the request? Any suggestion will be helpful.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号
    • ¥15 基于单片机的靶位控制系统
    • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度