Opencv – Library for decoding H.264 RTSP stream

ffmpegh.264opencvrtspvlc

I was planning to decode H.264 based RTSP stream using FFMPEG in OpenCV but, when I tried so it gave some errors. Later, I found that many people have faced issues while decoding H.264 stream using ffmpeg (libavcodec). Typically the below mentioned error messages pop-up while using libavcodec:

"[h264 @ 0xa766dd0]concealing 1200 DC, 1200 AC, 1200 MV errors"

Has anyone used any other library successfully for decoding H.264 based RTSP. If so, which is the library (I have heard of live555 which is used within vlc player for decoding such streams). I would also like to know the output format and how it can be made compatible with OpenCV (typically within opencv we can use cvQueryFrame to directly extract a frame from a video stream, but in case we are using a library other than ffmpeg how to go about it).

Thanks in advance.

Regards,

Saurabh Gandhi

Best Answer

VLC is using ffmpeg to decode h.264. the problem can happen when you have the wrong SPS PPS, or don't have. You need to extract it from the RTSP protocol and pass it to the ffmpeg before trying to decode video.

Related Topic