我想尝试GStreamer使用RTSP流连接到远程IP摄像机。 因此,我已经下载并安装了最新版本。
在Using GStreamer页上说: GStreamer还提供了playbin,这是一个基本的媒体播放插件,可以自动处理大多数播放细节 因此,我尝试使用以下命令连接到摄像机:
gst-launch-1.0 playbin uri=rtsp://192.168.1.2:554/av0_0
不幸的是我得到了错误:
错误:来自元素 / GstPlayBin:playbin0 / GsturiDecodeBin:uridecodebin0:您的GStreamer 安装缺少插件。其他调试信息: ../gst/playback/gsturidecodebin.c(988):no_more_pads_full(): / GstPlayBin:playbin0 / GsturiDecodeBin:uridecodebin0:不适用 找到的插件:../ gst / playback / gstdecodebin2.c(4679): gst_decode_bin_expose(): / GstPlayBin:playbin0 / GsturiDecodeBin:uridecodebin0 / GstDecodeBin:decodebin0: 找不到合适的插件:缺少解码器:H.264(主要配置文件) (视频/ x-h264,流格式=(字符串)字节流, 对齐方式=(string)au,level =(string)3.1,profile =(string)main, 宽度=(整数)1280,高度=(整数)720,帧率=(分数)0/1, 隔行扫描模式=(字符串)逐行,色度格式=(字符串)4:2:0, bit-depth-luma =(uint)8,bit-depth-chroma =(uint)8, parsed =(boolean)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