Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when trying to create a send only WebRTC pipeline

I have installed GStreamer-1.18.0 from source along with base, good, bad and ugly plugins.

I am unfamiliar with WebRTC so I decided to start with a demo and see how it works. I have found a small demo at https://github.com/centricular/gstwebrtc-demos/tree/master/sendonly.

Unfortunately when running the demo and browsing to the location I get the following error in the terminal:

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)

Here is the pipeline command attempted by the demo application:

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.

This seems wierd to me since when I inspect the webrtcbin, it does say that it has capability for 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"
  

Are there any suggestions on how to solve this? Perhaps something was not installed correctly in the GStreamer package? or maybe I am missing something in the OS permissions\setup?

like image 311
miris Avatar asked Sep 16 '20 15:09

miris


1 Answers

GStreamer was missing nice plugin. This problem was solved by making sure libgstnice.so was in the correct location.

like image 152
miris Avatar answered Nov 15 '22 11:11

miris