FFmpeg any frame picture command from video

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.