簡體   English   中英

ffmpeg來自視頻的隨機圖像,但順序

[英]ffmpeg random images from video but in order

好的,所以我正在使用linux,並且我正在ffmpeg進行工作,編碼視頻並制作圖像

但是我想使ffmpeg最多可以從視頻中提取10張圖像。

我想知道我該怎么做。 目前,我使用以下圖像。

//execute ffmepg to get picture
    exec("/usr/bin/ffmpeg -vframes 1 -ss ".$time_in_seconds." -i converted_vids/".$name.".".$type." video_images/".$name."_%02d.jpg -y 2> log/image_".$name.".txt");

通常,以下命令用於從視頻生成圖像:

//d is number of images you create from video
ffmpeg -i video.mpg image%d.jpg

//like
ffmpeg -i video.mpg image%10.jpg
//would produce 10 images from the video

Hope it's helpful to you

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM