Ask Your Question

SunPuzzle's profile - activity

2015-12-04 10:55:35 -0500 received badge  Famous Question (source)
2015-07-09 14:56:31 -0500 received badge  Good Question (source)
2015-04-23 20:54:10 -0500 received badge  Notable Question (source)
2015-01-05 05:45:01 -0500 received badge  Popular Question (source)
2014-11-10 14:05:09 -0500 received badge  Nice Question (source)
2014-05-24 08:15:34 -0500 received badge  Student (source)
2014-05-24 06:54:42 -0500 received badge  Editor (source)
2014-05-24 06:46:00 -0500 asked a question ip camera h264 error while decoding

Capture video from network camera.

VideoCapture cam0("rtsp://admin:12345@192.168.1.65/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 image description