How to take screen shot of video size by ffmpeg
I want to take screen shot of size of the video. How can if take it , as now i can take the screen shot of this size like 120x90 by following code.
$cmd = "$ffmpeg -i $video -deinterlace -an -ss $second -t 00:00:01 -开发者_如何学Pythonr 1 -y -s 120x90 -vcodec mjpeg -f mjpeg $image 2>&1";
Please suggest .
Thanks
This is not a complete answer because I haven't use the ffmpeg library in a while, but the general idea is
- use ffmpeg to get the dimensions of the video before calling the command
- string substitute the correct values instead of 120x90
- call the command
精彩评论