webrtc rust sample problem

Jun Xiao xiaojuntime at gmail.com
Tue Nov 15 04:54:16 UTC 2022


Hi Mathieu,

Thanks for your help that I can run webrtcsink successfully on ubuntu 22.04.
Now when I try to build gstreamer/gst-plugins-rs on windows 10, say I use
the command `meson -Dbad=enabled -Dgst-plugins-bad:openh264=disabled
-Dgst-plugins-bad:webrtc=enabled -Dgst-plugins-bad:srtp=enabled
-Dgst-plugins-ugly:x264=enabled -Dgpl=enabled builddir`, I met a couple of
problems:
- If I build in x86 Native Tools Command Prompt for VS 2019, I cannot
install some lib dependencies, e.g. libsrtp. I guess it's not feasible to
install those libs in the Command Prompt.
- If I build in mingw64, still cannot resolve libsrtp issue.

Do you have any suggestion to build gstreamer/gst-plugins-rs on windows?
which build environment should i go after?

Thanks,
Jun

On Thu, Nov 10, 2022 at 11:15 PM Mathieu Duponchelle <
mathieu at centricular.com> wrote:

> Good :)
>
> On Thu, 2022-11-10 at 14:12 +0800, Jun Xiao via gstreamer-devel wrote:
> > Thanks Mathieu! It works after I built a gstreamer with x264enc.
> >
> > On Thu, Nov 10, 2022 at 1:07 AM Mathieu Duponchelle
> > <mathieu at centricular.com> wrote:
> > > Thanks. It looks like the only encoder available on your system is
> > > opusenc. This is not enough, make sure to at least have x264enc /
> > > vp8enc / x265enc / vp9enc.
> > >
> > > On Wed, 2022-11-09 at 20:52 +0800, Jun Xiao via gstreamer-devel
> > > wrote:
> > > > 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::im
> > > > p:<w
> > > > s>
> > > > 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::im
> > > > p:<w
> > > > s: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::im
> > > > p:<w
> > > > s: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::im
> > > > p:<w
> > > > s>
> > > > 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::im
> > > > p:<w
> > > > s>
> > > > 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::im
> > > > p:<w
> > > > s>
> > > > 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::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(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::im
> > > > p:<w
> > > > s>
> > > > 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
> > > > > > ::im
> > > > > > p:<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
> > > > > > ::im
> > > > > > p:<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
> > > > > > ::im
> > > > > > p:<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
> > > > > > ::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.077864232
> > > > > > Setting pipeline to NULL ...
> > > > > > 0:00:00.101370102  7466 0x55655b56c2d0 INFO
> > > > > > webrtcsink
> > > > > > net/webrtc/src/webrtcsink/imp.rs:1207:gstrswebrtc::webrtcsink
> > > > > > ::im
> > > > > > p:<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::webrtc
> > > > > > > > sink
> > > > > > > > ::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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221115/22be47b9/attachment-0001.htm>


More information about the gstreamer-devel mailing list