Unexpectedly got a grayscale video on ffmpeg

When I encode a video from jpeg to avi or something, I get this message:

% ffmpeg -f image2 -i foo-%03d.jpg foo.avi
Input Stream #0.0 frame size changed to 680x420, yuvj444p

and the video will be grayscale unexpectedly.

When I make jpeg images from png with ‘convert’ (which is ImageMagick command) a blank/black image becomes gray as its color space. It should be RGB if you want to make it colored. It seems ffmpeg chooses its encoding mode from the beginning of frames even the rest of images are colored.

I don’t see an option to encode as colored forcefully on ffmpeg, so here is the command to make images RGB with convert.

% convert foo-*.png -type TrueColor foo-*.jpg
This entry was posted in Tweak. Bookmark the permalink. Both comments and trackbacks are currently closed.