0
当运行此脚本,将图像保存到文件:如何使用avconv和php与exec显示流的屏幕截图?
<?php
$url = "rtmp://109.71.162.112:1935/live/sd.jasminchannel.stream";
exec('avconv -i "'.$url.'" -ss 00:00:01 -t 1 -r 1 -f image2 "screenshot.jpg" 2>&1', $output, $status);
header("Content-type: image/png");
readfile("screenshot.jpg");
我想这是在屏幕上回(飞意味着,写变量,无需而不是保存到文件,并随后阅读,显示,删除此文件):
<?php
$url = "rtmp://109.71.162.112:1935/live/sd.jasminchannel.stream";
exec('avconv -i "'.$url.'" -ss 00:00:01 -t 1 -r 1 -f image2 $variable 2>&1', $output, $status);
header("Content-type: image/png");
echo $variable;
我该怎么做?