Color problems with OpenCV and VideoWriter


I am using a TX1 with a Zed camera and opencv to do some video processing, I have encountered an issue where I cannot seem to write a video using opencv’s VideoWriter in any color setting except for gray. I have tried several different types of videos including mjpg h264 and others. I only get about 5.7k of headers in the file no matter how many frames are written to the file and none of the actual frames are there.

What am I missing to get videos to write in color?


Could you try AVI format?

cv::VideoWriter  out  = cv::VideoWriter("result.avi", CV_FOURCC('P','I','M','1'), 30, cv::Size(1920, 1080));

Hi ckocsis,

Have you tried above suggestion?
Any further update can be shared?