2010-02-15 58 views

回答

3
+0

如何在窗口上安裝 – rajanikant 2010-02-15 09:40:22

+0

不知道上傳時是否可以正常工作,但我仍然給+1 :) – AntonioCS 2010-02-15 09:44:10

+0

@rajanikant:只需下載並將其複製到php擴展名dir然後在php.ini和(搜索'擴展',你會看到如何做到這一點擴展) – AntonioCS 2010-02-15 09:47:38

3

下面兩行使用使用ffmpeg的

從影像製作圖像
$str_command= $ffmpeg ." -i " . $image_source_path . $image_cmd .$dest_image_path;  
shell_exec($str_command); 

請在下面找到變量的解釋:

$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" 

這10後拍攝的圖像,從視頻第二。

FFMPEG

希望這有助於。

+0

但我如何安裝FFMPEG – rajanikant 2010-02-15 11:04:50

+0

只需從這裏下載最新版本。 http://ffdshow.faireal.net/mirror/ffmpeg/並將ffmpeg.exe放在你想要的文件夾結構中,然後在變量$ ffmpeg中給出上述代碼的路徑。我也在我的答案chk中添加了ffmpeg的鏈接。 – Avinash 2010-02-15 12:01:21

+0

我試圖 的ffmpeg -if:\畫\ amazing_mccullum_catch.flv -r 1 -t 00:00:30 -f IMAGE2 -s 120x72 /withfr/tnails/final%01d.png 並且還 FFMPEG -if :\ Videos \ amazing_mccullum_catch.flv -r 1 -t 00:00:01 -ss 00:00:30 -f image2 -s 120x72 /withfr/tnails/final%01d.png 將單個幀作爲縮略圖從視頻的第30秒開始,但它返回了多個圖像。 爲什麼? – Vijay 2010-03-18 06:52:23