尝试创建仅发送WebRTC管道时出错

时间:2020-09-16 15:22:23

标签: webrtc gstreamer

我已经从源代码安装了GStreamer-1.18.0以及基本的,好的,坏的和丑陋的插件。

我不熟悉WebRTC,所以我决定从演示开始,看看它是如何工作的。我在https://github.com/centricular/gstwebrtc-demos/tree/master/sendonly找到了一个小演示。

不幸的是,在运行演示并浏览到该位置时,在终端中出现以下错误:

gst-launch-1.0 webrtcbin name=webrtcbin stun-server=stun://stun.l.google.com:19302 v4l2src ! videorate ! video/x-raw,width=640,height=360,framerate=15/1 ! videoconvert ! queue max-size-buffers=1 ! x264enc bitrate=600 speed-preset=ultrafast tune=zerolatency key-int-max=15 ! video/x-h264,profile=constrained-baseline ! queue max-size-time=100000000 ! h264parse ! rtph264pay config-interval=-1 name=payloader ! application/x-rtp,media=video,encoding-name=H264,payload=96 ! webrtcbin.

这是演示应用程序尝试的管道命令:

Prompt--> gst-inspect-1.0 webrtcbin
...
Pad Templates:
  SINK template: 'sink_%u'
    Availability: On request
    Capabilities:
      application/x-rtp
    Type: GstWebRTCBinPad
    Pad Properties:
      transceiver         : Transceiver associated with this pad
                            flags: readable
                            Object of type "GstWebRTCRTPTransceiver"
  

这对我来说似乎很奇怪,因为当我检查webrtcbin时,它确实说它具有application / x-rtp(also in GStreamer documentation)的功能:

if (~dist_on_skel_row.any(axis=0)).any():
    for empty_index in (np.where(~dist_on_skel_row.any(axis=0))[0]):
        dist_on_skel_row[:, empty_index] = dist_on_skel_column[:, empty_index]

关于如何解决此问题,有什么建议吗?也许GStreamer软件包中未正确安装某些软件?还是我在操作系统权限\设置中缺少某些内容?

1 个答案:

答案 0 :(得分:1)

GStreamer缺少漂亮的插件。通过确保libgstnice.so位于正确的位置来解决此问题。