I have made video gallery . i want thumbnail of that video like youtube. how can i get that while uploading in php.
how to install it on window
rajanikant
2010-02-15 09:40:22
Don't know if this will work while uploading but I still give +1 :)
AntonioCS
2010-02-15 09:44:10
@rajanikant: Just download and copy it to the php extension dir and then on php.ini and an entry in the extension section (search for 'extension' and you will see how to do it for this extension)
AntonioCS
2010-02-15 09:47:38
then give me idea for work while uploading
rajanikant
2010-02-15 09:55:04
+2
A:
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.
Hope this helps.
Avinash
2010-02-15 10:10:32
Just download latest version from here.http://ffdshow.faireal.net/mirror/ffmpeg/ and place ffmpeg.exe in your folder structure any where you want, and give that path to above code in variable $ffmpeg. also i have added link for ffmpeg in my answer chk it.
Avinash
2010-02-15 12:01:21
i triedffmpeg -i f:\Videos\amazing_mccullum_catch.flv -r 1 -t 00:00:30 -f image2 -s 120x72 /withfr/tnails/final%01d.pngand alsoffmpeg -i f:\Videos\amazing_mccullum_catch.flv -r 1 -t 00:00:01 -ss 00:00:30 -f image2 -s 120x72 /withfr/tnails/final%01d.pngto get a single frame as a thumbnail from the 30th second of the video, but it returned more than one image..why?
kvijayhari
2010-03-18 06:52:23
No i haven't used a loopi just tried it in the command line client.But produced too many images
kvijayhari
2010-03-18 08:38:40