user735647
user735647

Reputation: 395

Does ffmpeg play the entire video file to extract image

I have a multimedia application which involves lot of videos. I use FFMPEG to generate the thumbnails from the video at a particular time duration. Now the problem is my console application which is used to extract the images from the video is consuming lot of memory when its being run.

The doubt I have now is whether FFMPEG does play the entire video file when extracting the thumbnail image.Is it possible?

Following is the parameter being passed to FFMPEG,

  -i [input video file] -an -r 0.05 -y -ss 00:00:18 -vframes 1 [output thumbnail file path]

I tried googling but with no success. Please provide your valuable thoughts.

Thanks.

Upvotes: 5

Views: 709

Answers (2)

irfanmcsd
irfanmcsd

Reputation: 6571

ffmpeg command must be like this in order to improve performance for grabbing thumbs from video.

-ss 00:00:18 -i [input video file] -vframes 1 -an -r 0.05 -y [output thumbnail file path]

This command directly seek ffmpeg to point of video from where thumbs need to be grabbed.

Hope this will help you.

Upvotes: 4

llogan
llogan

Reputation: 134013

Placement of -ss matters. See [FFmpeg-user] frame grabbing from MP4 file takes too long for more information.

Upvotes: 3

Related Questions