webrtc rust sample problem

Jun Xiao xiaojuntime at gmail.com
Wed Nov 9 12:52:13 UTC 2022


Hi Mathieu,

Following is the log with the patch, if you need more debug patches let me know.

gst-plugins-rs$ GST_DEBUG=webrtcsink:6 gst-launch-1.0 webrtcsink
name=ws videotestsrc ! ws. audiotestsrc ! ws.
Setting pipeline to PAUSED ...
0:00:00.124050809 10519 0x55cdb072a190 DEBUG             webrtcsink
net/webrtc/src/webrtcsink/imp.rs:1192:gstrswebrtc::webrtcsink::imp:<ws>
preparing
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
0:00:00.125241154 10519 0x55cdb0973180 INFO              webrtcsink
net/webrtc/src/webrtcsink/imp.rs:2281:gstrswebrtc::webrtcsink::imp:<ws:video_0>
Received caps event Caps(Event { ptr: 0x55cdb0979560, type: "caps",
seqnum: Seqnum(45), structure: Some(GstEventCaps { caps: (GstCaps)
video/x-raw, format=(string)ABGR64_LE, width=(int)320,
height=(int)240, framerate=(fraction)30/1,
multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1,
interlace-mode=(string)progressive }) })
New clock: GstSystemClock
0:00:00.125881460 10519 0x55cdb09731e0 INFO              webrtcsink
net/webrtc/src/webrtcsink/imp.rs:2281:gstrswebrtc::webrtcsink::imp:<ws:audio_0>
Received caps event Caps(Event { ptr: 0x7fb74c003470, type: "caps",
seqnum: Seqnum(55), structure: Some(GstEventCaps { caps: (GstCaps)
audio/x-raw, format=(string)S16LE, layout=(string)interleaved,
rate=(int)44100, channels=(int)1 }) })
Redistribute latency...
0:00:00.128845016 10519 0x7fb744024290 DEBUG             webrtcsink
net/webrtc/src/webrtcsink/imp.rs:2218:gstrswebrtc::webrtcsink::imp:<ws>
Looked up codecs {96: Codec { encoder: ElementFactory { inner:
TypedObjectRef { inner: 0x55cdb059e2a0, type: GstElementFactory } },
payloader: ElementFactory { inner: TypedObjectRef { inner:
0x55cdb06cab40, type: GstElementFactory } }, caps:
Caps(audio/x-opus(memory:SystemMemory)), payload: 96 }}
0:00:00.129043362 10519 0x7fb744024290 DEBUG             webrtcsink
net/webrtc/src/webrtcsink/imp.rs:2086:gstrswebrtc::webrtcsink::imp:<ws>
Running discovery pipeline for caps audio/x-raw, format=(string)S16LE,
layout=(string)interleaved, rate=(int)44100, channels=(int)1 with
codec Codec { encoder: ElementFactory { inner: TypedObjectRef { inner:
0x55cdb059e2a0, type: GstElementFactory } }, payloader: ElementFactory
{ inner: TypedObjectRef { inner: 0x55cdb06cab40, type:
GstElementFactory } }, caps: Caps(audio/x-opus(memory:SystemMemory)),
payload: 96 }
Redistribute latency...
0:00:00.137439122 10519 0x7fb744024290 DEBUG             webrtcsink
net/webrtc/src/webrtcsink/imp.rs:2149:gstrswebrtc::webrtcsink::imp:<ws>
Codec discovery pipeline for caps audio/x-raw, format=(string)S16LE,
layout=(string)interleaved, rate=(int)44100, channels=(int)1 with
codec Codec { encoder: ElementFactory { inner: TypedObjectRef { inner:
0x55cdb059e2a0, type: GstElementFactory } }, payloader: ElementFactory
{ inner: TypedObjectRef { inner: 0x55cdb06cab40, type:
GstElementFactory } }, caps: Caps(audio/x-opus(memory:SystemMemory)),
payload: 96 } succeeded: application/x-rtp, media=(string)audio,
clock-rate=(int)48000, encoding-name=(string)OPUS,
sprop-stereo=(string)0, encoding-params=(string)2,
sprop-maxcapturerate=(string)48000, payload=(int)96,
extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01;
0:00:00.138044111 10519 0x7fb744024290 ERROR             webrtcsink
net/webrtc/src/webrtcsink/imp.rs:2319:gstrswebrtc::webrtcsink::imp:<ws>
error: No caps found for stream video_0
ERROR: from element /GstPipeline:pipeline0/GstWebRTCSink:ws: There is
no codec present that can handle the stream's type.
Additional debug info:
net/webrtc/src/webrtcsink/imp.rs(2320): gstrswebrtc::webrtcsink::imp
(): /GstPipeline:pipeline0/GstWebRTCSink:ws:
Failed to look up output caps: No caps found for stream video_0
Execution ended after 0:00:00.013297770
Setting pipeline to NULL ...
0:00:00.138701195 10519 0x55cdb072a190 INFO              webrtcsink
net/webrtc/src/webrtcsink/imp.rs:1207:gstrswebrtc::webrtcsink::imp:<ws>
unpreparing
Freeing pipeline ...

Thanks,
Jun

On Wed, Nov 9, 2022 at 8:05 PM Mathieu Duponchelle
<mathieu at centricular.com> wrote:
>
> Hey, unfortunately webrtcsink needs a few more logs on the codec
> discovery code path to be useful her, can you apply
> https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/972/
> and try again?
>
> On Wed, 2022-11-09 at 00:11 +0800, Jun Xiao via gstreamer-devel wrote:
> > Thanks Mathieu,
> >
> > Following is the message with debug log:
> > gst-plugins-rs$ GST_DEBUG=webrtcsink:6 gst-launch-1.0 webrtcsink
> > name=ws videotestsrc ! ws. audiotestsrc ! ws.
> > Setting pipeline to PAUSED ...
> > 0:00:00.017416246  7466 0x55655b56c2d0 DEBUG             webrtcsink
> > net/webrtc/src/webrtcsink/imp.rs:1192:gstrswebrtc::webrtcsink::imp:<w
> > s>
> > preparing
> > Pipeline is live and does not need PREROLL ...
> > Pipeline is PREROLLED ...
> > Setting pipeline to PLAYING ...
> > New clock: GstSystemClock
> > 0:00:00.018513516  7466 0x55655b5fc580 INFO              webrtcsink
> > net/webrtc/src/webrtcsink/imp.rs:2260:gstrswebrtc::webrtcsink::imp:<w
> > s:video_0>
> > Received caps event Caps(Event { ptr: 0x55655b603150, type: "caps",
> > seqnum: Seqnum(50), structure: Some(GstEventCaps { caps: (GstCaps)
> > video/x-raw, format=(string)ABGR64_LE, width=(int)320,
> > height=(int)240, framerate=(fraction)30/1,
> > multiview-mode=(string)mono, pixel-aspect-ratio=(fraction)1/1,
> > interlace-mode=(string)progressive }) })
> > Redistribute latency...
> > 0:00:00.028336475  7466 0x55655b5fc5e0 INFO              webrtcsink
> > net/webrtc/src/webrtcsink/imp.rs:2260:gstrswebrtc::webrtcsink::imp:<w
> > s:audio_0>
> > Received caps event Caps(Event { ptr: 0x7f77680034a0, type: "caps",
> > seqnum: Seqnum(61), structure: Some(GstEventCaps { caps: (GstCaps)
> > audio/x-raw, format=(string)S16LE, layout=(string)interleaved,
> > rate=(int)44100, channels=(int)1 }) })
> > Redistribute latency...
> > 0:00:00.095827060  7466 0x7f776c05aea0 ERROR             webrtcsink
> > net/webrtc/src/webrtcsink/imp.rs:2298:gstrswebrtc::webrtcsink::imp:<w
> > s>
> > error: No caps found for stream video_0
> > ERROR: from element /GstPipeline:pipeline0/GstWebRTCSink:ws: There is
> > no codec present that can handle the stream's type.
> > Additional debug info:
> > net/webrtc/src/webrtcsink/imp.rs(2299): gstrswebrtc::webrtcsink::imp
> > (): /GstPipeline:pipeline0/GstWebRTCSink:ws:
> > Failed to look up output caps: No caps found for stream video_0
> > Execution ended after 0:00:00.077864232
> > Setting pipeline to NULL ...
> > 0:00:00.101370102  7466 0x55655b56c2d0 INFO              webrtcsink
> > net/webrtc/src/webrtcsink/imp.rs:1207:gstrswebrtc::webrtcsink::imp:<w
> > s>
> > unpreparing
> > Freeing pipeline ...
> >
> > On Tue, Nov 8, 2022 at 11:59 PM Mathieu Duponchelle
> > <mathieu at centricular.com> wrote:
> > >
> > > Do you have video encoders available on your system? Perhaps try to
> > > run
> > > with GST_DEBUG=webrtcsink:6 to get more information.
> > >
> > > On Tue, 2022-11-08 at 23:54 +0800, Jun Xiao via gstreamer-devel
> > > wrote:
> > > > Hi,
> > > >
> > > > When I tried to run webrtc rust sample in ubuntu 22.04 VM by
> > > > following
> > > > https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/tree/main/net/webrtc
> > > > ,
> > > > I met following problem:
> > > >
> > > > $gst-launch-1.0 webrtcsink name=ws videotestsrc ! ws.
> > > > audiotestsrc !
> > > > ws.
> > > > Setting pipeline to PAUSED ...
> > > > Pipeline is live and does not need PREROLL ...
> > > > Pipeline is PREROLLED ...
> > > > Setting pipeline to PLAYING ...
> > > > New clock: GstSystemClock
> > > > Redistribute latency...
> > > > Redistribute latency...
> > > > 0:00:00.052590872  7339 0x7fb29006b8a0 ERROR
> > > > webrtcsink
> > > > net/webrtc/src/webrtcsink/imp.rs:2298:gstrswebrtc::webrtcsink::im
> > > > p:<w
> > > > s>
> > > > error: No caps found for stream video_0
> > > > ERROR: from element /GstPipeline:pipeline0/GstWebRTCSink:ws:
> > > > There is
> > > > no codec present that can handle the stream's type.
> > > > Additional debug info:
> > > > net/webrtc/src/webrtcsink/imp.rs(2299):
> > > > gstrswebrtc::webrtcsink::imp
> > > > (): /GstPipeline:pipeline0/GstWebRTCSink:ws:
> > > > Failed to look up output caps: No caps found for stream video_0
> > > > Execution ended after 0:00:00.036349323
> > > > Setting pipeline to NULL ...
> > > > Freeing pipeline ...
> > > >
> > > > Could anyone share any suggestions?
> > > > Thanks,
> > > > Jun


More information about the gstreamer-devel mailing list