Search code examples
videoopencvyuv

OpenCV: Save video in IYUV


I'm trying to save a video that have been captured by a camera. It works well when I try with DIVX fourcc but what I'm trying to do is to save with IYUV fourcc but it gives awful results: colors seem to be merged, openCV seen to not do the conversion.

I've tried cv::cvtColor (src, dst, CV_BGR2YCrCb) and cv::cvtColor (src, dst, CV_BGR2YUV) ans manual conversion from RGB to YUV but the result is the same.

Have you any idea how to save a video in YUV format ?

Thanks.

Arthur.


Solution

  • See this ticket on OpenCV bugtracker. That problem looks very similar to yours.

    Also manual calling of cv::cvtColor makes no sense because it is not able to convert to yuv420p used internally by video codec.