I'm trying to compare 3 videos that are encoded by H.264, H.265, and VP9. All of them are made by a same YUV video.
I want to use OpenCV's function to read each frame of the video and do some comparison:
VideoCapture vCap1, vCap2, vCap3;
vCap1.open("h264.mp4");
vCap2.open("h265.mp4");
vCap3.open("vp9.webm");
Mat frame1, frame2, frame3;
while (vCap1.read(frame1) && vCap2.read(frame2) && vCap3.read(frame3))
{
//do something
}
The vCap1
opened successfully, but vCap2
and vCap3
won't open.
Did I miss something to include to make it work?
Or OpenCV even not support the other 2 formats?