Unable to Stream from Recording Server using Python WebRTC Client

We’re investigating using WebRTC to retrieve video frames from the Recording Server, and we successfully used the WebRTC_JavaScript example. However, we wanted to use Python, so we converted this example, and although we are able to successfully connect, we are not receiving any video frames.

Couple of questions:

  1. do you happen to have a running Python sample that retrieves video frames from the Recording Server?

  2. I’m attaching the Python example we converted from the sample in WebRTC_JavaScript; do you see what we might have done incorrectly?

Thank you

I don’t know the aiortc library you are using and I’m not a python developer, but I will try and help as much as I can.

You are grabing IceCandidates from the SDP and sending them to the API Gateway seperately (candidate_from_sdp). That should not be required, if the candidates are in the SDP, the API Gateway should use them.

To clarify what you mean with get connection, does that mean that peerconnection.connectionState get to “connected”. If that is the case, then all icecandidate and SDP exchange is working. You should then focus around on_track and check if that follows how aiortc describes it. I can’t pinpoint if something is of here as I don’t know aiortc.

But when peerconnection changes to connected, then API Gateway starts sending out frames on the channel, so the question is how to attach your VideoTransformer to the channel.

I hope my answer has been a bit of help.

Hi Henrik,

Thank you for your quick response!

I’m going to be out of town for a bit, so I’m CC’ing my colleague, who will be able to answer your questions.

Neil

Hi Henrik,

Sorry for the delay, I just got back into town.

To answer your question, I’ve confirmed that we didn’t actually get a successful connection. I’ll take a look at that area to see if I can determine why it’s not connecting

Connecting to WebRTC should be straightforward, but it rarely is. I would suggest to write into your own log which Ice Candidates you send and the ice Candidates you receive from the server. If you only get “Host” candidates, then check firewall settings as “Host” candidates need to have direct permission. If you onlye have “Host” candidates then you could consider to add a STUN server in the setup, this should give you srflx and prflx candidates. With a bit of luck this should enable you to get connection. (remember to both configure the STUN server on you local client and send it to the API Gateway)

I must agree w/you on it not being straighforward…

Thanks for the suggestion, I’ll take a look.