用于解码 H.264 RTSP 流的库
我计划在 OpenCV 中使用 FFMPEG 解码基于 H.264 的 RTSP 流,但是当我尝试时,它出现了一些错误。后来我发现很多人在使用ffmpeg(libavcodec)解码H.264流时遇到了问题。使用 libavcodec 时通常会弹出以下错误消息:
“[h264 @ 0xa766dd0]隐藏 1200 DC、1200 AC、1200 MV 错误”
有没有人成功使用任何其他库来解码基于 H.264 的内容实时传输协议。如果是这样,哪个是库(我听说过 live555,它在 vlc 播放器中用于解码此类流)。我还想知道输出格式以及如何使其与 OpenCV 兼容(通常在 opencv 中,我们可以使用 cvQueryFrame 直接从视频流中提取帧,但如果我们使用 ffmpeg 以外的库,该怎么办关于它)。
提前致谢。
问候,
索拉布·甘地
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
VLC 使用 ffmpeg 解码 h.264。
当您有错误的 SPS PPS 或没有 SPS PPS 时,可能会出现此问题。
在尝试解码视频之前,您需要从 RTSP 协议中提取它并将其传递给 ffmpeg。
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.
要解码 RTSP 流,最好的库是 FFMPEG 和 Gstreamer。
要解码流,您需要为解码器提供正确的缓冲区,您必须了解您的 H.264 流,以便您可以在将 SPS、PPS 和 NAL 数据馈送到库解码器之前安排您的 SPS、PPS 和 NAL 数据
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