thumbnail of video in php while uploading [duplicate]
Possible Duplicate:
How to create thumbnails or preview for videos?
I have made video gallery . i want thumbnail of that video like youtube. how can i get that while uploading in php.
http://ffmpeg-php.sourceforge.net/
Use below two lines for creating image from video using ffmpeg
$str_command= $ffmpeg ." -i " . $image_source_path . $image_cmd .$dest_image_path;
shell_exec($str_command);
Please find variable explanation at below:
$ffmpeg ="Document path to your ffmpeg";
$image_source_path = "Document path to your video"
$image_cmd = " -r 1 -ss 00:00:10 -t 00:00:01 -s ".ALL_PLACE_WIDTH."x".ALL_PLACE_HEIGHT." -f image2 " ;
Where ALL_PLACE_WIDTH ="width of the image you want"
ALL_PLACE_HEIGHT ="heoght of the image you want"
$dest_image_path = "Document path to your image which is going to create"
This will capture image from your video after 10 second.
FFMPEG
Hope this helps.
精彩评论