我試圖從視頻幀保存圖像並將其保存爲jpeg。 此功能適用於較小的視頻文件,但如果視頻超過10分鐘,則不會保存jpeg圖像。在轉換之前出現錯誤。FFMPEG無法取幀並保存爲圖像
public function VideoToJpeg($localVideoPath, $localOutImgPath)
{
$Name = dirname(__FILE__) . "/ffmpeg";
$Str = "$Name -i \"$localVideoPath\" -an -ss 00:00:03 -an -r 1 -vframes 1 -y \"$localOutImgPath\"";
exec($Str);
}
下面是我從FFmpeg的
[NULL @ 0370e760] Unable to find a suitable output format for 'path'
: Invalid argument
出現什麼錯誤? – 2013-02-21 14:25:11
'出現錯誤'?那個錯誤會是...? – LittleBobbyTables 2013-02-21 14:25:20
該腳本的另一部分是將任何視頻fromat(例如mp4)編碼到flv容器,並將其發送到red5的流文件。這樣可以看到圖像和視頻正常播放。當視頻超過10分鐘圖像未轉換,並且在流目錄中flv.beforetrans出現在視頻流下 – alex 2013-02-21 14:29:30