I am using exec() and ffmpeg to generate thumbnails from video files. ffmpeg apparently sends its output to STDERR instead of STDOUT because the output appears in my Apache error log instead of the $out array. How can I make it send the output to STDOUT? Here's my code:
This echoes:PHP Code:<?php
$out = array();
exec('path/to/ffmpeg.exe -i "path/to/some_movie.avi" -ss 00:00:10 -vframes 1 -vcodec mjpeg -f image2 "path/to/screenshot.jpg"',$out,$ret);
echo "<pre>";
print_r($out);
echo "</pre>";
echo "Return: " . $ret;
?>
Code:Array ( ) Return: 0





Bookmarks