Reputation: 5433
i want to display thumbnails or preview panels for videos listed on my site, i want to fetch a single frame from a video (from a particular time i.e get a frame of exactly after 1 min) and display them as thumbnails as in youtube...
Any help?
Upvotes: 8
Views: 28022
Reputation: 8849
In modern browsers you can also use the video tag and canvas to capture a frame and save it as an image.
see How can we get the screenshot of the video in html5 using canvas
Upvotes: 6
Reputation: 18390
Adding to how to use the ffmpeg answer, this is the parameters you're looking for:
ffmpeg -itsoffset -4 -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg
Upvotes: 7
Reputation: 16074
Take a look at the ffmpeg-php library. It's the only simple way to manipulate videos of different formats in PHP.
There's also a wrapper called PHP Video Toolkit, you can find it here: http://sourceforge.net/projects/phpvideotoolkit/
Upvotes: 8