cancel
Showing results for 
Search instead for 
Did you mean: 

Generate OfferSdp For Nest Battery Camera Version

jsniff
Community Member
 
Does anyone know how to generate a valid "OfferSdp"?

It is not in the documentation below:

https://developers.google.com/nest/device-access/traits/device/camera-live-stream#generatewebrtcstre...

The only sample code response I saw was here but this is rly not straightforward and I was hoping for a simple CURL command, like all the other nest requests.

https://stackoverflow.com/questions/70360191/sdp-offer-webrtc

"OfferSDP" is a long string variable that NEST needs to be intaked to get an "AnswerSDP".

1 Recommended Answer

anishyadav
Solutions Expert
Solutions Expert

I don’t think you can generate SDP just from your terminal as it would need a set of information about your system, audio/video playing capabilities and network interfaces when building this text. Your browser has all the necessary software stacks to provide these capabilities, and that’s how it is able to generate an offer/answer SDP.  You can learn more about which information is stored in an SDP field on this WebRTC Guide, or use our WebRTC Validator Tool to generate one.

View Recommended Answer in original post

6 REPLIES 6

jsniff
Community Member

If it's helpful, I was able to do the demo to completion that google/nest lists here: https://device-access-sample.web.app/ , but now I want to run curl commands from scratch on my end and don't know how to generate the "OfferSDP".

jsniff
Community Member

I really want to be able to do this all in some python script/pipeline. No one has worked with Nest's stream from a battery operated version well then? Kind of frustrating that it's a different protocol than the wired version. Still stuck in generating the "OfferSDP" to get an "AnswerSDP".

anishyadav
Solutions Expert
Solutions Expert

I don’t think you can generate SDP just from your terminal as it would need a set of information about your system, audio/video playing capabilities and network interfaces when building this text. Your browser has all the necessary software stacks to provide these capabilities, and that’s how it is able to generate an offer/answer SDP.  You can learn more about which information is stored in an SDP field on this WebRTC Guide, or use our WebRTC Validator Tool to generate one.

jsniff
Community Member

This is good feedback and we may look further into the WebRTC/browser approach. But here's what we really want to do: We are attempting to generate a generic offer SDP through aiortc (python class: https://github.com/aiortc/aiortc). We were hoping to send the generated offer SDP in python script, received an answer SDP in python script, and then have ffmpeg record the video stream described in the answer SDP to extract frames for video analysis. We are struggling with some of the steps in the pipeline, but does this seem like a pipeline that should be achievable? @anishyadav 

 

jsniff
Community Member

 @anishyadav anyway to achieve this pipeline more through a script I run through python code or similar?

 

Srvking
Community Member

@jsniff i have similar requirements like you had above. Did you solve this problem? What solution did you implement finally?