i use this code for getting preview of videos in a directory/folder..but i m getting error
error i m getting
Strict Standards: Only variables should be passed by reference in H:\xampp\htdocs\ffmpeg.php on line 13
..
Strict Standards: Only variables should be passed by reference in H:\xampp\htdocs\ffmpeg.php on line 13
pls help....i want to generate thumbnails from videos with same name..i.e girl.mp4 to girl.mp4.jpg
Code:
<?php
$dir = "/full path to directory/";
$thumb_dir = "/full path to directory for thumbnails/";
if (is_dir($dir)) {
if ($dh = opendir($dir)) {
while (($file = readdir($dh)) !== false) {
$file=str_replace(" ", "\ ", $file);
$file=str_replace("-", "\-", $file);
$file=str_replace("(", "\(", $file);
$file=str_replace(")", "\)", $file);
echo $file."<br/>";
//$file=str_replace("'", "\ ", $file);
$ext = strtolower(end(explode('.', $file)));
if($ext=='mp4')
exec("/usr/local/bin/ffmpeg -itsoffset -105 -i ".$dir.$file." -vcodec mjpeg -vframes 1 -an -f rawvideo -s 100x100 ".$thumb_dir.$file.".jpg");
}
closedir($dh);
}
}
?>
Strict Standards: Only variables should be passed by reference in H:\xampp\htdocs\ffmpeg.php on line 13
..
Strict Standards: Only variables should be passed by reference in H:\xampp\htdocs\ffmpeg.php on line 13
pls help....i want to generate thumbnails from videos with same name..i.e girl.mp4 to girl.mp4.jpg
Comment