Page 1 of 1

Can Magick++ work with YUV420P? (4:2:0)

Posted: 2017-03-29T21:04:45-07:00
by Airon65
I've found some information about supported formats by IM (https://www.imagemagick.org/script/formats.php). There's some info about YUV 4:2:2 but nothing about 4:2:0.

I want to create a video "on the fly" drawing each frame with Magick++ and encoding it with FFMPEG. The problem is FFMPEG works good with YUV420P but it seems that IM doesn't :) How to automate this process? :)

Should I generate frames in IM using RGB colorspace and then encode each frame to YUV420P manually?

I use the latest IM.

Re: Can Magick++ work with YUV420P? (4:2:0)

Posted: 2017-03-31T01:15:46-07:00
by snibgo
When I've made videos, I've used sRGB and thrown the files at ffmpeg, not really caring about colorspace conversions that ffmpeg might do.

If you want to throw YUV at ffmpeg, you can do that with IM. For both IM and ffmpeg, the default variety of YUV seems to be 4:2:0.

ffmpeg doesn't seem to like the input as one yuv file per frame with a wildcard, but wants them joined together in one file.

For example, we make a boring movie with 10 "rose:" frames. Windows BAT syntax.

Code: Select all

convert rose: -duplicate 9 r_%%04d.yuv

copy /B r_*.yuv rm.yuv

ffmpeg -video_size 70x46 -i rm.yuv -y hb1.avi