Page 1 of 1

How to specify stride through input video file?

Posted: 2014-04-07T05:11:51-07:00
by gcecil
My YUV encoded progressive video file convert s successfully into a series of bmp format frames. For processing I want to extract every 30th frame from the input video. Is there a way to specify this stride in a convert command line argument so that I don't have the overhead of generating all converted frames then deleting all but every 30th? Thank you

Re: How to specify stride through input video file?

Posted: 2014-04-07T10:07:00-07:00
by fmw42
In IM you can put a comma separate list of the frame you want using [0,29,etc] with the filename when reading the image. But there is no built in skip. Since doing the comma list would be rather long and tedious for lots of frames, the best thing would be to write a script loop to collect all the frames you want. The loop can use whatever skip factor you want.

Please identify your version of IM and what platform, since the scripting will be different for unix and windows.

see
http://www.imagemagick.org/Usage/basics/#list_ops
http://www.imagemagick.org/script/comma ... essing.php (selecting frames)