Gstreamer webrtcbin flow stuck at add-ice-candidate signal

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Gstreamer webrtcbin flow stuck at add-ice-candidate signal

deepanshu
Hi All,

I am working on getting a webrtc stream from Wowza Streaming Engine in the
Gstreamer pipeline using the webrtcbin plugin, and decode the stream frame
by frame. I am implementing in Python taking reference from webrtc_sendrecv
(
https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc_sendrecv.py
<https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc_sendrecv.py>
)

I am able to send and receive OFFER and ANSWER messages using the websockets
connection, set the local-description and remote-description based on the
SDP message I receive.

The final step is that I receive the remote ICE candidate, I should be able
to add it using the
self.webrtc.emit('add-ice-candidate', sdpmlineindex, candidate)

But I believe the candidate is not getting added properly because as per the
GST debug logs Peer connection state doesnot change from "connecting" to
"connected".

Following is the ICE candidate I receive from remote

candidate:0 1 UDP 50 XX.XX.XX.XX 6982 typ host generation 0

Can anyone suggest what might be the issue?

These are the logs after the 'add-ice-candidate' signal is emit

0:00:00.196992865  1833      0x1bc1280 INFO               webrtcbin
gstwebrtcbin.c:1009:_update_ice_connection_state_task:<mysendrecv> ICE
connection state change from new(0) to checking(1)
0:00:00.197004451  1833      0x1bc1280 INFO               webrtcbin
gstwebrtcbin.c:1044:_update_peer_connection_state_task:<mysendrecv> Peer
connection state change from new(0) to connecting(1)
0:00:00.383940418  1833      0x1bc1280 INFO               webrtcbin
gstwebrtcbin.c:974:_update_ice_gathering_state_task:<mysendrecv> ICE
gathering state change from gathering(1) to complete(2)

Nothing happens after this.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

Matthew Waters
Increase the webrtcbin debug level and that will show you some more
information about what is happening.


On 26/2/21 5:40 am, deepanshu wrote:

> Hi All,
>
> I am working on getting a webrtc stream from Wowza Streaming Engine in the
> Gstreamer pipeline using the webrtcbin plugin, and decode the stream frame
> by frame. I am implementing in Python taking reference from webrtc_sendrecv
> (
> https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc_sendrecv.py
> <https://github.com/centricular/gstwebrtc-demos/blob/master/sendrecv/gst/webrtc_sendrecv.py>
> )
>
> I am able to send and receive OFFER and ANSWER messages using the websockets
> connection, set the local-description and remote-description based on the
> SDP message I receive.
>
> The final step is that I receive the remote ICE candidate, I should be able
> to add it using the
> self.webrtc.emit('add-ice-candidate', sdpmlineindex, candidate)
>
> But I believe the candidate is not getting added properly because as per the
> GST debug logs Peer connection state doesnot change from "connecting" to
> "connected".
>
> Following is the ICE candidate I receive from remote
>
> candidate:0 1 UDP 50 XX.XX.XX.XX 6982 typ host generation 0
>
> Can anyone suggest what might be the issue?
>
> These are the logs after the 'add-ice-candidate' signal is emit
>
> 0:00:00.196992865  1833      0x1bc1280 INFO               webrtcbin
> gstwebrtcbin.c:1009:_update_ice_connection_state_task:<mysendrecv> ICE
> connection state change from new(0) to checking(1)
> 0:00:00.197004451  1833      0x1bc1280 INFO               webrtcbin
> gstwebrtcbin.c:1044:_update_peer_connection_state_task:<mysendrecv> Peer
> connection state change from new(0) to connecting(1)
> 0:00:00.383940418  1833      0x1bc1280 INFO               webrtcbin
> gstwebrtcbin.c:974:_update_ice_gathering_state_task:<mysendrecv> ICE
> gathering state change from gathering(1) to complete(2)
>
> Nothing happens after this.
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

deepanshu
Hi,

I increased the debug level using $ export GST_DEBUG=9,*webrtc*:9
But I am unable to understand what is not working for me.

I have attached the logs here -  https://pastebin.com/UVLCPAA2
<https://pastebin.com/UVLCPAA2>  
Logs are from the moment the ICE candidate is received from remote and
gstwebrtcbin calls the _add_ice_candidate function.

It will be of great help if you can suggest me in the right direction.

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

Matthew Waters
Are you doing a reconfiguration?

0:00:01.575922660 29377      0x1be8e80 INFO               webrtcbin
gstwebrtcbin.c:974:_update_ice_gathering_state_task:<mysendrecv> ICE
gathering state change from complete(2) to gathering(1)

Suggests you may be.  If you are trying to reuse webrtcbin for multiple
different calls, don't. That won't work.

At this stage, a full description of what you are doing complete with
source code would be necessary to be able to debug this further.

On 27/2/21 8:08 pm, deepanshu wrote:

> Hi,
>
> I increased the debug level using $ export GST_DEBUG=9,*webrtc*:9
> But I am unable to understand what is not working for me.
>
> I have attached the logs here -  https://pastebin.com/UVLCPAA2
> <https://pastebin.com/UVLCPAA2>
> Logs are from the moment the ICE candidate is received from remote and
> gstwebrtcbin calls the _add_ice_candidate function.
>
> It will be of great help if you can suggest me in the right direction.
>
> Thanks
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

OpenPGP_signature (505 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

deepanshu
Hi Matthew,

Thanks for your valuable input.

Please find the attached document containing the objective and my approach
along with the source code. problem_statement_and_source_code.zip
<http://gstreamer-devel.966125.n4.nabble.com/file/t379900/problem_statement_and_source_code.zip>  

It would be really helpful if you please guide me in getting this resolved.

Thanks in advance.
Deepanshu




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

deepanshu
Hi,

Any update on this. It will be really helpful.

Thanks
Deepanshu



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

deepanshu
I was able to get some more logs by setting export G_MESSAGES_DEBUG=all and
export NICE_DEBUG=all. If these migh t be of some help in understanding the
issue

https://pastebin.com/gKHKQZsX <https://pastebin.com/gKHKQZsX>  

The below logs keep on repeating

(python:9058): libnice-DEBUG: 23:55:45.760: Agent 0x325dbf0 : stream 1:
timer tick #51: 0 frozen, 0 in-progress, 0 waiting, 1 succeeded, 0
discovered, 0 nominated, 1 waiting-for-nom, 1 valid.
(python:9058): libnice-DEBUG: 23:55:45.761: Agent 0x325dbf0 : stream 2:
timer tick #51: 0 frozen, 0 in-progress, 0 waiting, 0 succeeded, 0
discovered, 0 nominated, 0 waiting-for-nom, 0 valid.

Thanks



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gstreamer webrtcbin flow stuck at add-ice-candidate signal

deepanshu
Can anybody suggest starting pointers on the problem i am facing.

Also, is adding and pairing of  TCP ICE candidates supported in gstreamer
webrtcbin. I am currently using ubuntu distribution version of gstreamer,
which is 14.0.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel