I have read this but didnt help too much.
I have a folder called videos and another folder called thumbnails. I have many mp4 videos in video folder and want to catch thumbnails at 4th second to the thumbnails folder using ffmpeg and php.
- I am using Wamp server 2.2 on windows whit php 5.3.8 and Apache 2.2.21
- I downloaded ffmpeg from FFmpeg Windows Builds section of ffmpeg download page and the static 32 build from this link.
-
I extracted the 7z file to my website root
here is my php code:$ffmpeg = "includes/ffmpeg/bin/ffmpeg"; foreach(glob('files/videos/*.mp4') as $pathname){ $filename = substr($pathname,13,strripos($pathname,'.mp4')-13); $thumbnail = 'files/thumbnails/'.$filename.'.jpg'; exec("ffmpeg -i $pathname -an -y -f mjpeg -ss 00:00:04 -vframes 1 $thumbnail"); }
but nothing happens and the thumbnails folder is always empty!
- How can I find out is ffmpeg installed on my server or not?
- How can I get my script to work?
Please help