webrtc example: feeding video data from a pipeline

Guennadi Liakhovetski g.liakhovetski at gmx.de
Sat Oct 10 10:19:56 UTC 2020


Hi Anton,

Sorry about a delayed response - was a rather busy week.

On Mon, 5 Oct 2020, Anton Pryima wrote:

> Hello Guennadi,
>
> Did you manage to run sendonly or sendrecv examples with videotestsrc on
> the RPI target?

The sendonly / unidirectional app works with a firefox version, that comes
with ubuntu 20.04 (80.0) but self-installed firefox on a Debian machine
(80.0.1) shows a static image. Similar with the sendrecv. Although there
are error messages in both cases.

I should also note, that the R-Pi isn't happy with that kind of a load -
it reboots after a few seconds of running, say, sendrecv, even if I modify
the example to ignore the incoming video stream.

I attached two files with error messages from respective test programs and
the browser web console.

Thanks
Guennadi

> First of all, you should ensure that examples work. This confirms that you
> have all the required plugins at the RPI platform.
>
> After, you should proceed with changing the pipeline.
>
> Best regards,
> Anton.
>
> On Sun, Oct 4, 2020 at 10:21 PM Guennadi Liakhovetski <g.liakhovetski at gmx.de>
> wrote:
>
> > Hi,
> >
> > I'm trying to run webrtc examples on a Raspberry Pi by feeding video input
> > to gstreamer from a pipeline, written to by a raspivid process. I have
> > first tried to run a simple RTP streaming by first starting a listener on
> > a PC, then creating a named pipe at /tmp/cam and starting gstreamer per
> >
> > gst-launch-1.0 -v filesrc location=/tmp/cam ! h264parse ! rtph264pay !
> > udpsink host=192.168.1.16 port=9001
> >
> > and then in a different window
> >
> > raspivid -t 0 -h 480 -w 640 -fps 25 -hf -b 2000000 -o /tmp/cam
> >
> > This workd. Gstreamer launches, waiting for data on the pipe and then once
> > the camera process starts, streaming kicks off.
> >
> > Next I tried to achieve the same with sendonly and sendrecv gstreamer
> > examples. First I tried to only modify the pipeline command in the source
> > by replacing videotestsrc with filesrc like above, this didn't work. I
> > also tried integrating starting of the raspivid process from the examples
> > by adding a fork() and exec() calls to them. I see that both succeed, but
> > streaming doesn't start. What could be the problem and how can I fix it?
> >
> > Thanks
> > Guennadi
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
>
-------------- next part --------------
application console:

(webrtc-unidirectional-h264:1079): GLib-CRITICAL **: 12:01:52.188: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
Received ICE candidate with mline index 0; candidate: candidate:0 1 UDP 2122252543 70945764-89b1-45ca-9732-501e90a11cc4.local 41276 typ host

(webrtc-unidirectional-h264:1079): GLib-CRITICAL **: 12:01:52.204: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
Received ICE candidate with mline index 0; candidate: candidate:2 1 TCP 2105524479 70945764-89b1-45ca-9732-501e90a11cc4.local 9 typ host tcptype active

(webrtc-unidirectional-h264:1079): GLib-CRITICAL **: 12:01:52.205: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
Received ICE candidate with mline index 0; candidate: candidate:1 1 UDP 1686052863 212.8.151.182 41276 typ srflx raddr 0.0.0.0 rport 0

(webrtc-unidirectional-h264:1079): GLib-CRITICAL **: 12:01:52.226: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed
Received ICE candidate with mline index 0; candidate: 

(webrtc-unidirectional-h264:1079): GLib-CRITICAL **: 12:01:52.227: g_atomic_ref_count_dec: assertion 'g_atomic_int_get (arc) > 0' failed

(webrtc-unidirectional-h264:1079): libnice-CRITICAL **: 12:01:52.325: nice_agent_parse_remote_candidate_sdp: assertion 'sdp != NULL' failed

(webrtc-unidirectional-h264:1079): GLib-CRITICAL **: 12:01:52.327: g_str_has_prefix: assertion 'str != NULL' failed
0:00:13.475405281  1079   0xbb13b0 ERROR              webrtcice gstwebrtcice.c:623:get_candidate_address: candidate "(null)" does not start with "a=candidate:"
-------------- next part --------------
application console:

data channel opened
data channel opened
Received data channel message: Hi! (from browser)
Received data channel message: Hi! (from browser)
incoming stream
Received data channel message: Hi! (from browser)
Received data channel message: Hi! (from browser)
Trying to handle stream with audioconvert ! autoaudiosinkincoming stream
0:00:13.384858164  1233 0x6bfde520 ERROR         v4l2bufferpool gstv4l2bufferpool.c:684:gst_v4l2_buffer_pool_streamon:<v4l2vp8dec0:pool0:sink> error with STREAMON 3 (No such process)
0:00:13.386106862  1233 0x6bfde520 ERROR         v4l2bufferpool gstv4l2bufferpool.c:2110:gst_v4l2_buffer_pool_process:<v4l2vp8dec0:pool0:sink> failed to start streaming

browser web console:

WebRTC: ICE failed, add a TURN server and see about:webrtc for more details


More information about the gstreamer-devel mailing list