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

标签 webrtc gstreamer

我已经从源代码安装了 GStreamer-1.18.0 以及基本的、好的、坏的和丑陋的插件。
我不熟悉 WebRTC,所以我决定从演示开始,看看它是如何工作的。我在 https://github.com/centricular/gstwebrtc-demos/tree/master/sendonly 找到了一个小演示.
不幸的是,当运行演示并浏览到该位置时,我在终端中收到以下错误:

WebRTC page link: http://127.0.0.1:57778/
Processing new websocket connection 0x6d14c0
** (webrtc-unidirectional-h264:168870): ERROR **: Could not create WebRTC pipeline: could not link payloader to webrtcbin, webrtcbin can't handle caps application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)96

Trace/BPT trap (core dumped)
这是演示应用程序尝试的管道命令:
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.
这对我来说似乎很奇怪,因为当我检查 webrtcbin 时,它确实说它具有 application/x-rtp ( also in GStreamer documentation ) 的能力:
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"
  
有没有关于如何解决这个问题的建议?也许 GStreamer 包中没有正确安装某些东西?或者我在操作系统权限\设置中遗漏了什么?

最佳答案

GStreamer 缺少不错的插件。这个问题是通过确保 libgstnice.so 位于正确的位置来解决的。

关于webrtc - 尝试创建仅发送 WebRTC 管道时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63923229/

相关文章:

c++ - gstreamer 将元素添加到通过 gst_parse_launch 创建的管道中

javascript - WebRTC 性能 - 非常高的 CPU 负载

javascript - Youtube/Facebook 直播如何从网络浏览器工作

javascript - Webrtc 应用程序开发、网络和安卓

c++ - 如何使用 VideoWriter 从 OpenCV 打开 GStreamer 管道

c - gstreamer 中的声学回声消除

无法在自定义 gstreamer 插件中 Transform_caps

java - 如何将 OpenCV WebRTC Stream 导入 Java

mp3 - 通过 webRTC 进行全质量 MP3 流式传输

python - 混合视频流最佳实践