Really struggling with gstreamer + webrtc

I am running this example from here

gst-launch-1.0 videotestsrc ! videoconvert ! openh264enc ! rtph264pay ! \
'application/x-rtp,media=video,encoding-name=H264,payload=97,clock-rate=90000' ! \
whip.sink_0 audiotestsrc ! audioconvert ! opusenc ! rtpopuspay ! \
'application/x-rtp,media=audio,encoding-name=OPUS,payload=96,clock-rate=48000,encoding-params=(string)2' ! \
whip.sink_1 whipsink name=whip auth-token=$WHIP_TOKEN whip-endpoint=$WHIP_ENDPOINT

it gives me this error:

WARNING: erroneous pipeline: could not link rtph264pay0 to whip, whip can't handle caps application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)97, clock-rate=(int)90000

I am very new to gstreamer, I have no idea how to fix it and haven’t slept all night… would really appreciate any help!!

1 Like

Just to confirm, you did set the TOKEN and ENDPOINT values?

meet@meet:~$ GST_DEBUG=3 gst-launch-1.0 videotestsrc ! videoconvert ! openh264enc ! rtph264pay ! 'application/x-rtp,media=video,encoding-name=H264,payload=9
7,clock-rate=90000' ! whip.sink_0 audiotestsrc ! audioconvert ! opusenc ! rtpopuspay ! 'application/x-rtp,media=audio,encoding-name=OPUS,payload=96,clock-ra
te=48000,encoding-params=(string)2' ! whip.sink_1 whipsink name=whip auth-token="$WHIP_TOKEN" whip-endpoint="$WHIP_ENDPOINT"
0:00:00.706516728  2142 0x5563da5e0290 WARN                whipsink net/webrtchttp/src/whipsink/imp.rs:364:<gstwebrtchttp::whipsink::imp::WhipSink as glib::subclass::object::ObjectImpl>::constructed:<whipsink0> whipsink will be deprecated in the future, it is recommended that whipclientsink be used instead
Setting pipeline to PAUSED ...
0:00:00.757660119  2142 0x5563da5e9b00 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.765997752  2142 0x5563da5e9b60 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<audiotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
New clock: GstSystemClock
Redistribute latency...
Redistribute latency...
0:00:01.151217932  2142 0x5563da5e0290 WARN    webrtctransportsendbin transportsendbin.c:457:gst_transport_send_bin_element_query:<transportsendbin0> did not really configure latency of 0:00:00.000000000
0:00:01.153900698  2142 0x7f02900019e0 FIXME                default gstutils.c:4025:gst_pad_create_stream_id_internal:<nicesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:01.155886692  2142 0x7f02900019e0 WARN                GST_PADS gstpad.c:4351:gst_pad_peer_query:<nicesrc0:src> could not send sticky events
ERROR: from element /GstPipeline:pipeline0/GstWhipSink:whip: GStreamer encountered a general resource error.
Additional debug info:
net/webrtchttp/src/whipsink/imp.rs(532): gstwebrtchttp::whipsink::imp::WhipSink::raise_error (): /GstPipeline:pipeline0/GstWhipSink:whip:
Unexpected response: 502 -
Execution ended after 0:00:00.941457303
Setting pipeline to NULL ...
0:00:01.707530057  2142 0x7f0274001cd0 WARN                whipsink net/webrtchttp/src/whipsink/imp.rs:538:gstwebrtchttp::whipsink::imp::WhipSink::handle_future_error:<whip> Future aborted
Freeing pipeline ...

I tried whipsink but i recv error

Use whipclientsink instead, that will solve the problem most likely.