VideoCapture cam0("rtsp://admin:[email protected]/MPEG-4/ch1/main/av_stream ");
if (!cam0.isOpened()){
std::cout << "camera open faild";
return -1;
}
Mat cam_frame;
do{
cam0 >> cam_frame;
imshow("output_1", cam_frame);
if (cvWaitKey(1) == 27) break;
} while (!cam_frame.empty());
return 0;
It's work, but some frames have bug.
Console: [h264 @ 00000000030afaa0] error while decoding MB 59 10, bytestream (-9) [h264 @ 00000000055e7420] left block unavailable for requested intra4x4 mode -1 at 0 14