开发者

How to "stream" FLV using PHP?

I've a script that is supposed to "stream" a flv (for a flowplayer):

header('Content-Type: video/flv');

$realpath = base64_decode($_GET['file']);
$chunksize = 1 * 1024 * 1024;
$handle = fopen($realpath, 'rb');
$buffer = '';
while(!feof($handle))
{
    set_time_limit(600);
    $buffer = fread($handle, $chunksize);
    echo $buffer;
    ob_flush();
    flush();
}
fclo开发者_StackOverflow中文版se($handle);
exit;

it's working for small videos but for bigger ones it's required to refresh the page with the player in order for them to play...


Try this: http://stream.xmoov.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜