WebRTC receive only question
Matthew Waters
ystreet00 at gmail.com
Wed Dec 4 23:39:57 UTC 2019
If you only want receive-only, then you do not need to create any
transceivers yourself.
For the bundle problem, sounds like you need to play with the
bundle-policy option on webrtcbin which works just like the JS counterpart.
On 5/12/19 2:19 am, Nazar Mokrynskyi wrote:
> 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.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191205/001e7383/attachment.sig>
More information about the gstreamer-devel
mailing list