0

I'm trying to execute the sdm.devices.commands.CameraLiveStream.GenerateWebRtcStream command with the following offer SDP:

v=0
o=- 10573278 0 IN IP4 0.0.0.0
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=extmap-allow-mixed
a=msid-semantic:WMS *
m=video 9 UDP/TLS/RTP/SAVPF 98
c=IN IP4 0.0.0.0
a=ice-ufrag:01d9
a=ice-pwd:fb02a52adddf38d05c378c
a=ice-options:trickle
a=fingerprint:sha-256 32:CA:61:06:04:0C:44:9A:2A:D7:FA:0C:B8:E9:96:C2:A0:89:8B:FE:C1:E1:28:9E:BE:5B:EA:CA:25:92:C3:C4
a=setup:actpass
a=recvonly
a=mid:0
a=msid:1c72a97e-aeb7-4f89-b1c4-c43627b476db 149a8188-7ef3-4c64-b0d3-1d5d3a3b7932
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-mux
a=ssrc:943509072 cname:368b5f4b-b283-4cc1-81da-86c52cdb80a4
a=rtpmap:98 VP8/90000
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=rtcp-fb:98 goog-remb
m=audio 9 UDP/TLS/RTP/SAVPF 96 97
c=IN IP4 0.0.0.0
a=ice-ufrag:01d9
a=ice-pwd:fb02a52adddf38d05c378c
a=ice-options:trickle
a=fingerprint:sha-256 32:CA:61:06:04:0C:44:9A:2A:D7:FA:0C:B8:E9:96:C2:A0:89:8B:FE:C1:E1:28:9E:BE:5B:EA:CA:25:92:C3:C4
a=setup:actpass
a=recvonly
a=mid:1
a=msid:454576d9-018b-4569-a88d-63b07a75ebe8 b1fdbce8-a745-422e-abf8-d5bf0b18ad37
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-mux
a=ssrc:1597697832 cname:368b5f4b-b283-4cc1-81da-86c52cdb80a4
a=rtpmap:96 opus/48000/2
a=rtpmap:97 PCMU/8000
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:01d9
a=ice-pwd:fb02a52adddf38d05c378c
a=ice-options:trickle
a=fingerprint:sha-256 32:CA:61:06:04:0C:44:9A:2A:D7:FA:0C:B8:E9:96:C2:A0:89:8B:FE:C1:E1:28:9E:BE:5B:EA:CA:25:92:C3:C4
a=setup:actpass
a=mid:2
a=sctp-port:5000
a=max-message-size:65536

The response I get back is

{
  message: 'Request contains an invalid argument.',
  domain: 'global',
  reason: 'badRequest'
}

But why? The SDP contains an offer to receive video and audio, along with a data channel. What's missing? The documentation does not specify any requirements other than that the audio be recvonly, which it is.

Ted
  • 83
  • 8

1 Answers1

1

Looks like the issue was because the video section came before the audio section. Apparently Google expects the audio section first, I have no idea if that's part of the spec or not.

Ted
  • 83
  • 8
  • I don't know about the spec, but I can confirm that the offer SDP for WebRTC on the Nest cameras using Device Access must be in the order of audio, video, application. – Gothic Jan 27 '22 at 04:46
  • Following up on this for anyone having a similarissue, the documentation has been updated to provide more detail on creating valid SDP offers: https://developers.google.com/nest/device-access/traits/device/camera-live-stream#generatewebrtcstream – Gothic Feb 09 '22 at 06:19