我想尝试使用GStreamer流连接到远程IP摄像机。所以我下载并安装了最后一个版本。
在使用GStreamer页面上说: GStreamer还提供了播放桶,这是一个基本的媒体播放插件,自动处理大部分播放细节,因此我尝试使用以下命令连接到摄像机:
gst-launch-1.0 playbin uri=rtsp://192.168.1.2:554/av0_0
不幸的是,我遇到了错误:
错误:在元素/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:中,您的GStreamer安装缺少一个插件。更多调试信息:../gst/byte/gsturidecodebin.c(988):/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:():no_more_pads_full ():没有找到合适的插件:../gst/byte/gstdecdebin2.c(4679):gst_decode_bin_expose ():/GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0: no插件找到:缺少解码器: H.264 (主配置文件)(视频/x 264,流格式=(字符串)字节流,alignment=(字符串)au,level=(string)3.1,profile=(string)main,width=(int)1280,height=(int)720,framerate=(分数)0/1,交错模式=(字符串)渐进,色-格式=(字符串)4:2:0,位深度-luma=(Uint)8,位深度-chroma=(Uint)8,parsed=(布尔值)true
这是否意味着我的安装错过了h264的解码器?怎么可能是这样?我想h264是最流行的编解码器。我做错什么了吗?
更新:
./gst-inspect-1.0 | grep h264
videoparsersbad: h264parse: H.264 parser
typefindfunctions: video/x-h264: h264, x264, 264
rtp: rtph264pay: RTP H264 payloader
rtp: rtph264depay: RTP H264 depayloader
openh264: openh264enc: OpenH264 video encoder
openh264: openh264dec: OpenH264 video decoder
发布于 2020-09-15 16:50:41
您安装了带有“完整”选项的GStreamer MSI吗?如果它是在典型模式下安装的,那么libav插件就不会安装。您可以更改安装并选择附加功能或重新安装。
当您在完整模式下安装时,您应该能够找到avdec_h264。或者,您可以选择自定义模式,然后启用"GStreamer 1.0 libav包装器“。
$ gst-inspect-1.0.exe libav | grep h264
avdec_h264: libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
https://stackoverflow.com/questions/58712503
复制相似问题