New issue
Advanced search Search tips

Issue 615057 link

Starred by 0 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

WebRTC video problem

Reported by d...@anyvpn.ru, May 26 2016

Issue description

Steps to reproduce the problem:
PC1 Android Chrome 50.0.2661.89
1. Call to getUserMedia with audio and video = true.
2. Create a PeerConnection and attach the local MediaStream to it.
3. Send SDP offer:
v=0
o=- 2593618451842855133 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS 32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO
a=group:BUNDLE audio video
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 0 8 126
c=IN IP4 0.0.0.0
a=rtpmap:111 opus/48000/2
a=rtpmap:103 ISAC/16000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:111 minptime=10; useinbandfec=1
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:111 transport-cc
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=setup:actpass
a=mid:audio
a=maxptime:60
a=sendrecv
a=ice-ufrag:zBKdIGFXr/094A4I
a=ice-pwd:mOy5bhDkL7GnW0SgrMQtPU4X
a=fingerprint:sha-256 92:F1:FE:B1:0C:8D:5A:F4:D1:F4:24:88:B8:5B:70:2A:C0:95:BC:1E:5D:1E:99:B9:44:B1:EA:78:64:76:1B:51
a=ssrc:1190331052 cname:qtKCIZ/SsECB2P0a
a=ssrc:1190331052 msid:32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO 70bf4981-986b-4926-9672-903f3c51fdbe
a=ssrc:1190331052 mslabel:32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO
a=ssrc:1190331052 label:70bf4981-986b-4926-9672-903f3c51fdbe
a=rtcp-mux
m=video 9 UDP/TLS/RTP/SAVPF 100 101 116 117 96 97 98
c=IN IP4 0.0.0.0
a=rtpmap:100 VP8/90000
a=rtpmap:101 VP9/90000
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=rtpmap:96 rtx/90000
a=rtpmap:97 rtx/90000
a=rtpmap:98 rtx/90000
a=fmtp:96 apt=100
a=fmtp:97 apt=101
a=fmtp:98 apt=116
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 transport-cc
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=setup:actpass
a=mid:video
a=sendrecv
a=ice-ufrag:zBKdIGFXr/094A4I
a=ice-pwd:mOy5bhDkL7GnW0SgrMQtPU4X
a=fingerprint:sha-256 92:F1:FE:B1:0C:8D:5A:F4:D1:F4:24:88:B8:5B:70:2A:C0:95:BC:1E:5D:1E:99:B9:44:B1:EA:78:64:76:1B:51
a=ssrc:2621258039 cname:qtKCIZ/SsECB2P0a
a=ssrc:2621258039 msid:32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO c8e272ea-d956-4bf8-a599-212e8dd1803d
a=ssrc:2621258039 mslabel:32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO
a=ssrc:2621258039 label:c8e272ea-d956-4bf8-a599-212e8dd1803d
a=ssrc:4271731956 cname:qtKCIZ/SsECB2P0a
a=ssrc:4271731956 msid:32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO c8e272ea-d956-4bf8-a599-212e8dd1803d
a=ssrc:4271731956 mslabel:32ROvsdIzmNR4821gtlXccDHWxT0MZPPUScO
a=ssrc:4271731956 label:c8e272ea-d956-4bf8-a599-212e8dd1803d
a=ssrc-group:FID 2621258039 4271731956
a=rtcp-mux

PC2 Windows7 51.0.2704.63 m
1. Call to getUserMedia with audio = true and video = false.
2. Create a PeerConnection and attach the local MediaStream to it.
3. Send SDP answer:
v=0
o=- 4298686960247340165 2 IN IP4 127.0.0.1
s=-
t=0 0
a=msid-semantic: WMS t2ZDQVvOFABvYttsU3JCCUlsaoC7jM3PNWLX
a=group:BUNDLE audio
m=audio 9 UDP/TLS/RTP/SAVPF 111 103 9 0 8 126
c=IN IP4 0.0.0.0
a=rtpmap:111 opus/48000/2
a=rtpmap:103 ISAC/16000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:126 telephone-event/8000
a=fmtp:111 minptime=10;useinbandfec=1
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:111 transport-cc
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=setup:active
a=mid:audio
a=maxptime:60
a=sendrecv
a=ice-ufrag:L1SQ26gpmO6FhdpZ
a=ice-pwd:9lmGxQqw5d1TDRfl0y+Uggi/
a=fingerprint:sha-256 DF:BF:45:18:D5:61:77:67:45:FC:C9:CE:6A:99:88:BE:E7:75:A8:C2:A6:81:C6:85:59:8A:75:55:3F:D3:E4:B8
a=ssrc:2161241640 cname:nA7g8ij0QuKJmumk
a=ssrc:2161241640 msid:t2ZDQVvOFABvYttsU3JCCUlsaoC7jM3PNWLX 1afba7bb-86e1-4d4b-83ee-639f43df653a
a=ssrc:2161241640 mslabel:t2ZDQVvOFABvYttsU3JCCUlsaoC7jM3PNWLX
a=ssrc:2161241640 label:1afba7bb-86e1-4d4b-83ee-639f43df653a
a=rtcp-mux
m=video 0 UDP/TLS/RTP/SAVPF 100 101 116 117 96 97 98
c=IN IP4 0.0.0.0
a=rtpmap:100 VP8/90000
a=rtpmap:101 VP9/90000
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=rtpmap:96 rtx/90000
a=rtpmap:97 rtx/90000
a=rtpmap:98 rtx/90000
a=fmtp:96 apt=100
a=fmtp:97 apt=101
a=fmtp:98 apt=116
a=rtcp:9 IN IP4 0.0.0.0
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:101 ccm fir
a=rtcp-fb:101 nack
a=rtcp-fb:101 nack pli
a=rtcp-fb:101 goog-remb
a=rtcp-fb:101 transport-cc
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 urn:3gpp:video-orientation
a=mid:video
a=recvonly
a=rtcp-mux

What is the expected behavior?
PC2 must receive video&audio from PC1

What went wrong?
PC2 got only audio stream, no video track at all.
Result of getTracks():
[MediaStreamTrack
enabled: true
id: "70bf4981-986b-4926-9672-903f3c51fdbe"
kind: "audio"
label: "70bf4981-986b-4926-9672-903f3c51fdbe"
muted: false
onended: null
onmute: null
onunmute: null
readyState: "live"
remote: true
__proto__: MediaStreamTrack]

Result of getVideoTracks():
[]

Did this work before? No 

Chrome version: 50.0.2661.89  Channel: n/a
OS Version: 6.0.1;Nexus 5X Build/MTC19T
Flash Version: 

Same result on Chrome 49.0.2623.112 m
 
pc2.png
82.9 KB View Download

Comment 1 by d...@anyvpn.ru, May 26 2016

And it`s no difference who create Offer or Answer in this scheme.
No difference what is the device, mobile or computer.
Result is always the same. 
I can provide any other information if needed.

P.S. Firefox (45 or 46) works properly. PC2 got audio&video from PC1.
pc2.FF.png
108 KB View Download
Components: Blink>WebRTC>Video
Owner: tnakamura@chromium.org
Status: Assigned (was: Unconfirmed)
Owner: jansson@chromium.org
jansson@, can you take a look?

Comment 4 by d...@anyvpn.ru, Jun 6 2016

Hi,
If any info or testing needed, I'm always ready.
Thanks.
Could you please try https://webrtc.github.io/samples/src/content/peerconnection/pc1/ and see if it works for you?

What android device and camera are you using? Have you allowed use of the camera on the android device?
Labels: Needs-Feedback

Comment 7 by d...@anyvpn.ru, Jun 16 2016

>see if it works for you?
Yes, it works.

>What android device
Device: Nexus 5X
Camera: front or rear not metter

>Have you allowed use of the camera
Yes of course I do. I told that all works fine if Firefox is used. It don`t works in Chrome when PC2 don`t have camera and so video=false is used for PC2.

Chrome versions on devices changed since my first post. Now they are:
PC1 (android): Chrome version 51.0.2704.81
PC2 (windows7 SP1 32-bit): Chrome version 51.0.2704.84 m
But above problem still remains.
webrtc.test.jpg
521 KB View Download

Comment 8 Deleted

Comment 9 by d...@anyvpn.ru, Jun 16 2016

Same test but Firefox 46 is used.
As you can see at the photo PC2(windows) get video (and audio too) from PC1(android).
webrtc.test.FF.jpg
602 KB View Download

Comment 10 Deleted

Comment 11 by d...@anyvpn.ru, Jun 16 2016

I do not know how important this is for you for analysis but today I got the idea
to do reversed test, when PC1(windows) use video&audio=true and PC2(android) video=false audio=true. And it works fine (as expected).
So, I could be wrong that it`s android Chrome version bug. Now it looks like Chrome desktop version bug.
But, of course, make conclusions is to you.

Thanks.
webrtc.test.reverse.jpg
584 KB View Download
Have you set offerToReceiveVideo = 1 ?

https://github.com/webrtc/samples/blob/gh-pages/src/content/peerconnection/pc1/js/main.js#L49

It does this automatically if you have video locally.

Comment 13 by d...@anyvpn.ru, Jun 20 2016

offerToReceiveVideo was set to "true". I try to set to 1
But above problem still remains.

I attach photo with my debug info on PC2 side.
pc2.debug.png
747 KB View Download
Could you confirm that you have set it to 1 on both sides, not true?

Comment 15 by d...@anyvpn.ru, Jun 20 2016

I confirm that on PC1 it is now certainly set to 1 (see screen above). 
On PC2 it can`t be set to 1 because PC2 has no video input device, so it was set to false (see screen above). Now I also change it from "false" to "0" and IT`S WORKING !
OMG... how can this be... why I had no idea about this earlier...

Can you confirm that only "0/1" must be used and not true/false ?


Cc: hta@chromium.org
The standard changed at one point so that OfferToReceive* became the _number of  streams to accept_ rather than yes or no (https://www.w3.org/TR/webrtc/). True or false should still work I reckon, a quick google search shows this style used to be supported.

dn, can you write up a small demo page that shows that OfferToReceive* = false is broken? If so that's probably a bug.

With all this said, I think OfferToReceive* is going away. hta@, comments?
phoglund@ the type has changed in the spec to long hence I do not see how a bool should continue to work. However regardless of the spec it seems like we have added back the bool style anyway but it just landed a couple of days ago in: https://codereview.chromium.org/2077323003/

Comment 18 by hta@webrtc.org, Jun 23 2016

The problem is in the SDP answer:

m=video 0 UDP/TLS/RTP/SAVPF 100 101 116 117 96 97 98

The 0 here means "I refuse your offer".

This code path is triggered when you explicitly set "OfferToReceiveVideo: false" in the Create*Answer* call - you can see the "false" in the red circle marked PC2 above. This behavior is not well defined in the specs (and has never been), but I checked the code yesterday.

When PC2 sends OfferToReceiveVideo=false it means that PC2 refuses to receive video. This is not what you want, so you shouldn't do it. Just don't set it.

Note: Javascript's type magic will auto-convert between booleans and integers. So "true" should still work if "1" was intended.





> Note: Javascript's type magic will auto-convert between booleans and integers. So "true" should still work if "1" was intended.
Right, forgot about that ;)

Comment 20 Deleted

Comment 21 by d...@anyvpn.ru, Jun 24 2016

Thanks for your work and comments.

So, Hmm... I`am again misunderstanding and very confused...
In my mind, when PC2 answer to PC1 "Offer" + "To" + "Receive" + "Video" sounds like "Hey PC1, I`m (PC2) heard your offer and my offer to you is to receive(true)/not to recieve(false) my video from me" (value true/false means will I (PC2) send my video or not).
According to hta`s comment it`s not so and means exactly the opposite and sounds like "OfferToTransmitVideo" param :) But in fact, everything is happening exactly as described by hta in his comment above ("OfferToTransmitVideo" = false)

Comment 22 by d...@anyvpn.ru, Jun 24 2016

But next. If "0" is "false" and "false" is "0" plus my situation above decribed in "Comment 15" when OfferToReceiveVideo = 0 (I refuse your offer) and why PC2 successfully got video from PC1 in that case ?
Now I have thinking only about "Where is the truth is ?". I don`t understand when + where(on which side) + what value I need to use.
Example - webinar. When video from broadcaster (lecturer) must recieve all participants but broadcaster (lecturer) himself not interested to recieve video from participants. In that case my opinion was:
- broadcaster send offer OfferToReceive* = true
- participants send answer OfferToReceive* = false

phoglund, according to hta`s comment, demo page still needed ? If so I need some time to do it.

Comment 23 by hta@chromium.org, Jun 24 2016

OfferToReceiveVideo is a parameter that controls how the SDP is generated.
It is not, itself, part of the SDP offer or answer.

The specs don't help here, since the parameters have been removed from the specs.

Just don't set OfferToReceiveVideo on the answer, let the defaults kick in. Things will Just Work.

Comment 24 by d...@anyvpn.ru, Jun 24 2016

I understand that it`s only for SDP generation, a=video + a=audio sections and it`s is not sended anywhere.

If parameters was removed than how to control sending or not sending video or audio now ? Need to modify SDP by myself after it`s generation by createOffer() ?

Comment 25 by d...@anyvpn.ru, Jul 7 2016

Any comments ?

Thanks.
Status: WontFix (was: Assigned)
Read up on .muted, .enabled etc. Also, on the sending side, if you don't want to send audio for instance, just don't add audio tracks to the peer connection.

Closing this bug since it isn't about a bug. If you have any further questions, webrtc-discuss is the place to go.

Sign in to add a comment