WebRTC receive only question

Nazar Mokrynskyi nazar at restream.io
Wed Dec 4 15:19:08 UTC 2019


Hi, first of all thanks to Gstreamer community for quickly answers to a 
noob like me before :)

I'm trying to adjust WebRTC demo to only receive video. I've 
commented-out creation of sending audio/video streams (that implied 
sendrecv transceiver creation) and trying to create appropriate 
transceivers myself.

Essentially I do this (Rust):

>         {
>             let caps = 
> gst::Caps::from_string(&"application/x-rtp,media=video,encoding-name=VP8/9000,payload=96");
>             self.0.webrtcbin.emit(
>                 "add-transceiver",
> &[&gst_webrtc::WebRTCRTPTransceiverDirection::Recvonly, &caps]
>             ).unwrap();
>         }
>         {
>             let caps = 
> gst::Caps::from_string(&"application/x-rtp,media=audio,encoding-name=OPUS/48000/2,payload=97");
>             self.0.webrtcbin.emit(
>                 "add-transceiver",
> &[&gst_webrtc::WebRTCRTPTransceiverDirection::Recvonly, &caps]
>             ).unwrap();
>         }
> //        self.add_video_source()?;
> //        self.add_audio_source()?;

However, it doesn't seem to create correct transceivers.
Offer:

> v=0
> o=- 10905641701256758 0 IN IP4 0.0.0.0
> s=-
> t=0 0
> a=ice-options:trickle
> a=group:BUNDLE video0 audio1
> m=video 9 UDP/TLS/RTP/SAVPF 96
> c=IN IP4 0.0.0.0
> a=setup:actpass
> a=ice-ufrag:XOGQBgsSppieHCz2aEdBz2szfvv7y4Qx
> a=ice-pwd:pEJXrbPdxbQ7cUwveuEKijqO5WJeS3+U
> a=rtcp-mux
> a=rtcp-rsize
> a=recvonly
> a=rtpmap:96 VP8/9000/1677742808
> a=rtcp-fb:96 nack pli
> a=mid:video0
> a=fingerprint:sha-256 
> DD:EC:43:29:03:88:43:61:A3:34:C6:0B:ED:91:0A:E8:BC:30:DF:1A:C9:07:F1:AF:20:13:95:97:CB:94:FA:16
> m=audio 0 UDP/TLS/RTP/SAVPF 97
> c=IN IP4 0.0.0.0
> a=setup:actpass
> a=ice-ufrag:XOGQBgsSppieHCz2aEdBz2szfvv7y4Qx
> a=ice-pwd:pEJXrbPdxbQ7cUwveuEKijqO5WJeS3+U
> a=bundle-only
> a=rtcp-mux
> a=rtcp-rsize
> a=recvonly
> a=rtpmap:97 OPUS/48000/2/1544092536
> a=rtcp-fb:97 nack pli
> a=mid:audio1
> a=fingerprint:sha-256 
> DD:EC:43:29:03:88:43:61:A3:34:C6:0B:ED:91:0A:E8:BC:30:DF:1A:C9:07:F1:AF:20:13:95:97:CB:94:FA:16
`VP8/9000/1677742808` instead of `VP8/9000` and 
`OPUS/48000/2/1544092536` instead of `OPUS/48000/2` look suspicious.

Answer:
> v=0
> o=mozilla...THIS_IS_SDPARTA-73.0a1 2069502179852509946 0 IN IP4 0.0.0.0
> s=-
> t=0 0
> a=sendrecv
> a=fingerprint:sha-256 
> B6:BA:E7:07:EC:8E:0D:2F:C5:E0:90:2E:AA:EB:73:C2:FD:9E:E6:22:43:8D:D4:E3:0A:56:94:C8:73:F9:04:E7
> a=group:BUNDLE audio1
> a=ice-options:trickle
> a=msid-semantic:WMS *
> m=video 0 UDP/TLS/RTP/SAVPF 120
> c=IN IP4 0.0.0.0
> a=inactive
> a=mid:video0
> a=rtpmap:120 VP8/90000
> m=audio 9 UDP/TLS/RTP/SAVPF 97
> c=IN IP4 0.0.0.0
> a=sendonly
> a=fmtp:97 maxplaybackrate=48000;stereo=1;useinbandfec=1
> a=ice-pwd:d7d791108e05869a12106d2e8b49fed8
> a=ice-ufrag:4e8a522a
> a=mid:audio1
> a=msid:{d23d7ca6-ac17-47fc-9376-6e768f55a33c} 
> {8c9b7a0e-3190-4ab6-aff2-acdc989921b0}
> a=rtcp-mux
> a=rtpmap:97 opus/48000/2
> a=setup:active
> a=ssrc:1311089261 cname:{36a4bd3e-084f-46d4-8b16-7c4799db3532}
And here `group:BUNDLE audio1` should have been `group:BUNDLE video0 
audio1` I think and there is only one `ice-ufrag` and Gstreamer complains:
> 0:00:29.797034347 30870 0x7f1664004800 ERROR              webrtcbin 
> gstwebrtcbin.c:3540:_set_description_task:<webrtcbin0> media 0 is 
> missing or contains an empty 'ice-ufrag' attribute

Did anyone work with something like this?
I guess I'm missing something here, but not sure what exactly.

-- 
Sincerely, Nazar Mokrynskyi



More information about the gstreamer-devel mailing list