[FFmpeg-user] Extract N-frames sequence from input file to output with specified framerate.

Vasiliy Volkov volk.vasiliy at gmail.com
Sun Mar 22 13:59:54 CET 2015


Is it possible with ffmpeg to extract normally distributed N-frames (about
1000) sequence (normal distributed sample) from some file and pack it into
another file with specified framerate?
In more detail I need it in my encoding process: I need a way to get some
sort of estimation of video content in input file which I can use next
while I'll adjust encoding parameters. Also I want to be able to rapidly
view this sequence in media player to understand how it looks like (that's
why I need to specify output framerate).

The point here is to rapidly adjust parameters and understand how they
affect into whole video based on this sample sequence.

I can do the crf encoding of whole video and look what bitrate it shows,
but it gets long time and also I need to view the result with my eyes. And
when it's long file - the more time it requires.

I try to make such things by myself but have no luck - the output framerate
is not as I need (I need it to be as normal like 25 fps):

ffmpeg -i source.mkv -vf "fps=fps=1/<Period>" -vframes 1000 -qp 0 -an -f
yuv4mpegpipe pipe:1 > frames.yuv

where <Period> - is video duration/num of frames in sequence.

Here I use yuv to force not encode, just decode frames.

Any suggestions?

Thanks in advance!

More information about the ffmpeg-user mailing list