linux - How to display a screenshot of a stream using avconv and php with exec? -


when script run, image saved file:

<?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"); 

i wish returned on screen (on fly means it, write variable, instead without saving file , afterwards reading, display, deleting file):

<?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; 

how can this?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -