Question

i am preparing a website, about social media,

http://www.precisetech.co.uk/simon/socialMedia/

Now i have prepared script to upload video like facebook etc on my own server. But what i want is to capture an image from uploaded video, Like splash screen or whatever, Like Youtube video shows an image before being played, THAT KINDA IMAGE, how to extract that or set that in PHP and HTML.

e.g.enter image description here

Was it helpful?

Solution

You will have to use ffmpeg or similar tools on the server with PHP exec function.

exec("ffmpeg -ss 00:03:00 -i VideoFile.avi -frames:v 1 out1.jpg");

This example will produce one image frame (out1.jpg) somewhere around the third minute from the beginning of the movie

Then you can use the generated image to show as preview image (use flowplayer or any similar video players which support showing a preview image)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top