I am trying to build my own python app based on the demo example. After facing an exception in application code, I ended up creating a command line version of the pipeline to reproduce the error.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
>gst-launch-1.0 --version
gst-launch-1.0 version 1.14.1
GStreamer 1.14.1
https://launchpad.net/distros/ubuntu/+source/gstreamer1.0
>gst-inspect-1.0 webrtcbin
Factory Details:
Rank primary (256)
Long-name WebRTC Bin
Klass Filter/Network/WebRTC
Description A bin for webrtc connections
Author Matthew Waters <[email protected]>
Plugin Details:
Name webrtc
Description WebRTC plugins
Filename /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstwebrtc.so
Version 1.14.1
License LGPL
Source module gst-plugins-bad
Source release date 2018-05-17
Binary package GStreamer Bad Plugins (Ubuntu)
Origin URL https://launchpad.net/distros/ubuntu/+source/gst-plugins-bad1.0
GObject
+----GInitiallyUnowned
+----GstObject
+----GstElement
+----GstBin
+----GstWebRTCBin
Implemented Interfaces:
GstChildProxy
Pad Templates:
SRC template: 'src_%u'
Availability: Sometimes
Capabilities:
application/x-rtp
SINK template: 'sink_%u'
Availability: On request
Capabilities:
application/x-rtp
Element has no clocking capabilities.
Element has no URI handling capabilities.
Pads:
none
Element Properties:
name : The name of the object
flags: readable, writable
String. Default: "webrtcbin0"
parent : The parent of the object
flags: readable, writable
Object of type "GstObject"
async-handling : The bin will handle Asynchronous state changes
flags: readable, writable
Boolean. Default: false
message-forward : Forwards all children messages
flags: readable, writable
Boolean. Default: false
connection-state : The overall connection state of this element
flags: readable
Enum "GstWebRTCPeerConnectionState" Default: 0, "new"
(0): new - GST_WEBRTC_PEER_CONNECTION_STATE_NEW
(1): connecting - GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTING
(2): connected - GST_WEBRTC_PEER_CONNECTION_STATE_CONNECTED
(3): disconnected - GST_WEBRTC_PEER_CONNECTION_STATE_DISCONNECTED
(4): failed - GST_WEBRTC_PEER_CONNECTION_STATE_FAILED
(5): closed - GST_WEBRTC_PEER_CONNECTION_STATE_CLOSED
signaling-state : The signaling state of this element
flags: readable
Enum "GstWebRTCSignalingState" Default: 0, "stable"
(0): stable - GST_WEBRTC_SIGNALING_STATE_STABLE
(1): closed - GST_WEBRTC_SIGNALING_STATE_CLOSED
(2): have-local-offer - GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_OFFER
(3): have-remote-offer - GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_OFFER
(4): have-local-pranswer - GST_WEBRTC_SIGNALING_STATE_HAVE_LOCAL_PRANSWER
(5): have-remote-pranswer - GST_WEBRTC_SIGNALING_STATE_HAVE_REMOTE_PRANSWER
ice-gathering-state : The collective gathering state of all ICETransport's
flags: readable
Enum "GstWebRTCICEGatheringState" Default: 0, "new"
(0): new - GST_WEBRTC_ICE_GATHERING_STATE_NEW
(1): gathering - GST_WEBRTC_ICE_GATHERING_STATE_GATHERING
(2): complete - GST_WEBRTC_ICE_GATHERING_STATE_COMPLETE
ice-connection-state: The collective connection state of all ICETransport's
flags: readable
Enum "GstWebRTCICEConnectionState" Default: 0, "new"
(0): new - GST_WEBRTC_ICE_CONNECTION_STATE_NEW
(1): checking - GST_WEBRTC_ICE_CONNECTION_STATE_CHECKING
(2): connected - GST_WEBRTC_ICE_CONNECTION_STATE_CONNECTED
(3): completed - GST_WEBRTC_ICE_CONNECTION_STATE_COMPLETED
(4): failed - GST_WEBRTC_ICE_CONNECTION_STATE_FAILED
(5): disconnected - GST_WEBRTC_ICE_CONNECTION_STATE_DISCONNECTED
(6): closed - GST_WEBRTC_ICE_CONNECTION_STATE_CLOSED
local-description : The local SDP description to use for this connection
flags: readable, writable
Boxed pointer of type "GstWebRTCSessionDescription"
remote-description : The remote SDP description to use for this connection
flags: readable, writable
Boxed pointer of type "GstWebRTCSessionDescription"
stun-server : The STUN server of the form stun://hostname:port
flags: readable, writable
String. Default: null
turn-server : The TURN server of the form turn(s)://username:password@host:port
flags: readable, writable
String. Default: null
Element Signals:
"pad-added" : void user_function (GstElement* object,
GstPad* arg0,
gpointer user_data);
"pad-removed" : void user_function (GstElement* object,
GstPad* arg0,
gpointer user_data);
"no-more-pads" : void user_function (GstElement* object,
gpointer user_data);
"on-negotiation-needed" : void user_function (GstElement* object,
gpointer user_data);
"on-ice-candidate" : void user_function (GstElement* object,
guint arg0,
gchararray arg1,
gpointer user_data);
Element Actions:
"create-offer" : void user_function (GstElement* object,
GstStructure* arg0,
GstPromise* arg1);
"create-answer" : void user_function (GstElement* object,
GstStructure* arg0,
GstPromise* arg1);
"set-local-description" : void user_function (GstElement* object,
GstWebRTCSessionDescription* arg0,
GstPromise* arg1);
"set-remote-description" : void user_function (GstElement* object,
GstWebRTCSessionDescription* arg0,
GstPromise* arg1);
"add-ice-candidate" : void user_function (GstElement* object,
guint arg0,
gchararray arg1);
"get-stats" : void user_function (GstElement* object,
GstPad* arg0,
GstPromise* arg1);
"add-transceiver" : GstWebRTCRTPTransceiver * user_function (GstElement* object,
GstWebRTCRTPTransceiverDirection arg0,
GstCaps* arg1);
"get-transceivers" : GArray * user_function (GstElement* object);
Children:
rtpbin
When I run the following pipeline it fails with error that I get from my python app.
gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! application/x-rtp, media=video, encoding-name=VP8, payload=97 ! webrtcbin
WARNING: erroneous pipeline: could not link rtpvp8pay0 to webrtcbin0, webrtcbin0 can't handle caps application/x-rtp, media=(string)video, encoding-name=(string)VP8, payload=(int)97
The following works without any problem.
gst-launch-1.0 videotestsrc pattern=ball ! videoconvert ! queue ! vp8enc deadline=1 ! rtpvp8pay ! application/x-rtp, media=video, encoding-name=VP8, payload=97 ! queue ! rtpvp8depay ! vp8dec ! autovideosink