Closed Bug 1359854 Opened 8 years ago Closed 8 years ago

WebRTC in v53.0 is not recognizing TIAS bitrates (bitrates shoot up to very high numbers)

Categories

(Core :: WebRTC, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 --- unaffected
firefox53 --- wontfix
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: fpodlaha, Assigned: drno)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0 Build ID: 20170413192749 Steps to reproduce: Live broadcasting from webcam with WebRTC. We made no change in code to our website; in v52 bitrates were matching those set in b=TIAS. As of v53.0, the broadcast bitrates to do not adhere to TIAS settings and skyrocket. Actual results: Broadcasting bitrates as high as 8000+kpbs. This is happening to various users on our website (most people, actually). It is easily reproducible. b=AS:750 b=CT:750 b=TIAS:768000 Expected results: We normally set our AS/TIAS to be around 750~900kpbs which is reflected so on our Wowza video server. Typical camera settings used on the site: 640x480, 15fps, 750kbps 1280x720, 15fps, 900kbps
Nils: can you check the TIAS code in 53, and verify it's not getting an extra *1000 applied (Kbps vs bps). Please check that TIAS values are ending up correctly in the maxbitrate in the codec params (debugger should do). Note that Spark uses TIAS, but it could trivially be inserted into the SDP in an answer in pc_test.html
Flags: needinfo?(drno)
Whiteboard: [needinfo to drno 4/27]
Adding the SDP from the browser's about:webrtc. Show's avg bit rate of 4.54mbps, with TIAS/AS set to 900kbps
Added a screenshot from Wowza showing the bitrate on the vid server. Thanks everyone!
I have the same problem, TIAS seems not working. tried everything, always send ~800 - 1200 kbit/s for a 640p 30fps stream
FYI, problem still exists and is repeatable in v53.0.2 (32bit)
(In reply to Frank from comment #5) > FYI, problem still exists and is repeatable in v53.0.2 (32bit) Also, this problem does NOT exist in FF Developer Ed. v54.0a2 (2017-04-18) (64-bit)
Lets start with the confirmed facts: Firefox 53 has a bug in interpreting the TIAS numbers. And it's already fixed in 54. Because this is not a security relevant issue it also means we won't be able to do anything about it. But the good news is: there is a workaround which works for 53. If you simply multiply the TIAS number with 1000 Firefox 53 will stick to the TIAS rate in bps (even though you just provided it in mbps (aka milli bits per second ;) ). The bug was caused by bug 1320101 landing in 53 and dividing the bps provided through the TIAS parameter here: https://dxr.mozilla.org/mozilla-release/rev/5ccc87d83d8546e1254294eafe7c57f126f56dec/media/webrtc/signaling/src/media-conduit/VideoConduit.cpp#518 through an additional 1000 (probably assuming we are dealing with AS instead of TIAS, even though Firefox does not support AS). That additional divider got removed by landing bug 1342727 in Firefox 54. The sad news is: this could have easily been prevented if we would have had a simply mochitest trying to use TIAS, because when executed in a debug build this bug actually trips over an assert down in the webrtc.org code which complains that it makes no sense to try to set a video codec bitrate to a three digit bps number. I'm going to write a simple mochitest (even if we can't measure the actual bitrate properly in our test enviroments).
Depends on: 1320101, 1342727
Flags: needinfo?(drno)
Keywords: regression
Assignee: nobody → drno
Status: UNCONFIRMED → NEW
Ever confirmed: true
Confirmed the workaround: Multiplying the TIAS by 1000 in v53 when setting up the SDP does make FF stream in the intended bitrate. Thank you, all.
Comment on attachment 8867042 [details] Bug 1359854: added test with b=TIAS. https://reviewboard.mozilla.org/r/138646/#review142148 File a followup to test throughput. Though doing so in automation will be ... iffy at best
Attachment #8867042 - Flags: review?(rjesup) → review+
Blocks: 1364522
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
I'm going to land this test on Beta too a=test-only.
Flags: in-testsuite+
Whiteboard: [needinfo to drno 4/27] → [checkin-needed-beta]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: