2
votes

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

2
I am facing the similar error as reported by you. I am decoding RTSP stream using FFMPEG and displaying using OpenCV. Did you find solution to your problem?Tariq

2 Answers

0
votes

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.

0
votes

To Decode your RTSP stream , The best libraries are FFMPEG and Gstreamer. To decode the stream you need to feed the decoder with the right buffer for which you have to understand your H.264 stream so that you can arrange your SPS, PPS and NAL data before feeding it to the Library Decoder