views:

1050

answers:

2

hi

im using this script link text

but im not able to create the image

my file is http://sahu.vipin.googlepages.com/thumb.php

plz help

+1  A: 

Your PHP-Program basically calls /usr/bin/ffmpeg twice. Try that on the command line first! You can

echo "<pre>$cmd</pre>"

to find out what exaclty your php script is doing and then try exaclty that command on the command line.

Thee first command should look something like

/usr/bin/ffmpeg -i /var/www/beta/clock.avi 2>&1

This is where you place the echos:

// get the duration and a random place within that
$cmd = "$ffmpeg -i $video 2>&1";
echo "<pre>$cmd</pre>"

if (preg_match('/Duration: ((\d+):(\d+):(\d+))/s', `$cmd`, $time)) {
    $total = ($time[2] * 3600) + ($time[3] * 60) + $time[4];
    $second = rand(1, ($total - 1));
}

// get the screenshot
$cmd = "$ffmpeg -i $video -an -ss $second -t 00:00:01 -r 1 -y -vcodec mjpeg -f mjpeg $image 2>&1";
echo "<pre>$cmd</pre>"
$return = `$cmd`;
bjelli
+2  A: 
Evan Plaice
very very thanks 2 u
vipinsahu
could also use `system()`, among few other options
Cawas