Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to read yuv video?

Hi

I have a problem reading yuv UHD video. It is 4K 10bit YUV RAW video.

My goal is to extract all frames of video to 10-bit depth images.

I tried with following code.

char* source = "UHD.yuv";

VideoCapture InputVideo(source);
if (!InputVideo.isOpened())
{
    cout << "Could not open the input video << endl;

    return -1;
}

But here comes the error message.

[IMGUTILS @ 000000000013f4b0] Picture size 0x0 is invalid

[IMGUTILS @ 000000000013ef40] Picture size 0x0 is invalid

[IMGUTILS @ 000000000013ef90] Picture size 0x0 is invalid

warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:548)

Could not open the imput video

Thanks for help in advance.