To intercept a picture of a 352x240 size, formatted as JPG:
The code is as follows |
Copy Code |
Ffmpeg-i test.asf-y-F image2-t 0.001-s 352x240 a.jpg |
Convert the first 30 frames of the video into a animated Gif:
The code is as follows |
Copy Code |
Ffmpeg-i test.asf-vframes 30-y-F gif a.gif |
After testing, I found this parameter:
The code is as follows |
Copy Code |
-ss Time_off Set the start time offset |
Using the-SS parameter, you can start processing a transformation task from a specified time. such as:
The code is as follows |
Copy Code |
Ffmpeg-i test2.asf-y-F image2-ss 08.010-t 0.001-s 352x240 b.jpg |
Then the problem of screenshots from any frame is solved. As long as the-ss time parameters are randomly generated, and in the video effective time, it can be.
The same effect can be achieved by specifying-SS, and-vframes.
At this point the-SS parameter is followed by two ways of writing, hh:mm:ss or direct write seconds:
code is as follows |
copy code |
Ffmpeg-i -f image2 -ss 00:01:00-vframes 1 test1.jpg or ffmpeg-i test.asf-y-f image2 test.asf-y -SS 60-vframes 1 test1.jpg |