hi,
i am having problem in making thumbnail of video. it is not working properly here is my code plz help

$ffmpeg=$_SERVER['DOCUMENT_ROOT'].'/admin/ffmpeg';
$image=$_SERVER['DOCUMENT_ROOT'].'/admin/video/thumbs/'."$id.jpg";
$video =$_SERVER['DOCUMENT_ROOT'].'/admin/video/'."$uname";
$cmds = "$ffmpeg -i $video -deinterlace -an -ss 1 -t 00:00:01 -r 1 -y -s 100x90 -vcodec mjpeg -f mjpeg $image 2>&1"; 
	exec($cmds);

thanx in advance

What error do you get ? Did you try to execute that command line manually ?

yes i have tried to execute it manually it works fine but when i execute it in my code than it is not working

If you do

echo exec($cmds);

Do you see an error. Perhaps you don't have rights to execute that program.

Yes, i have checked by echoing

exec($cmds);

and it is giving me access is denied. Can u plz help me how can i get rid of this problem and can u tell me that on which php version ffmpeg is supported becoz i read that it didn't support php versions less than 5.2.6

Access denied is probably because php has no rights to execute ffmpeg.

how can i get rid of this problem and can u plz help me that why this code is not creating thumbnails thanx

See your webserver documentation, or ask in the Apache forum how to set the right permissions for your group.

can u plz tell me why the code is not creating thumbnails properly

thanks for being patient and replying me i have got the problem solved it was hosting issue

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.