Page 1 of 1

How to specify number of frames when conveting YCbCr to bmp

Posted: 2009-12-30T17:45:58-07:00
by sweet-town
I have a large YCbCr file, I only want to convert the first N frames to bmp files. How to do that?

if I use
convert -colorspace yuv -size 1920x1080 src.yuv dest.bmp
it takes a long long time, and I have to delete all the unused bmp files.

Alternatively, Is there a way to extract the first N frames of the large YUV files, and save them to a separte short YUV files? Then I can use the above command to convert the short YCbCr file to BMP.

I checked the convert options, there is adjoin. combine etc. but I did not find an option to split the file.

Help please!

Re: How to specify number of frames when conveting YCbCr to bmp

Posted: 2009-12-30T17:50:49-07:00
by fmw42
see http://www.imagemagick.org/Usage/files/#read_mods

convert image.yuv[0-9] ... image.bmp

converts the first 10 frames, but if bmp does not support multiple frames, then you will get image-0.bmp, image-1.bmp, etc. So you may want to convert to some image type such as .gif or .png to have a 10-frame image.

Re: How to specify number of frames when conveting YCbCr to bmp

Posted: 2009-12-30T18:40:02-07:00
by sweet-town
Great. It works.
Thanks a lot.