Closed Bug 1278027 Opened 8 years ago Closed 8 years ago

In Firefox Nightly, WebRTC recording is slowed by 100%. So duration is 2x the actual duration.

Categories

(Core :: Audio/Video: MediaStreamGraph, defect, P1)

49 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox48 --- unaffected
firefox49 + fixed
firefox50 + fixed

People

(Reporter: noitidart, Assigned: ctai)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160531183335

Steps to reproduce:

Go here in nightly - https://www.webrtc-experiment.com/RecordRTC/

Pick "Audio"

Do a recording.

Press stop.

It will play it back. In nightly it will be slowed down.

Do the same in stable or beta firefox and you will hear it play back at actual speed.

I actually discovered this because I used WebRtc Mic in a song identification addon I made here, and I hit this problem - https://addons.mozilla.org/en-US/firefox/addon/songifier/


Actual results:

In Firefox Nightly, WebRTC recording is slowed by 100%. So duration is 2x the actual duration.


Expected results:

Recording should not be slowed.
Component: Untriaged → Video/Audio Controls
OS: Unspecified → Windows 10
Product: Firefox → Toolkit
Version: 47 Branch → 49 Branch
A regression window for this would be super helpful. Would you care to generate one with mozregression?

http://mozilla.github.io/mozregression/
Has Regression Range: --- → no
Has STR: --- → yes
Flags: needinfo?(noitidart)
Hi William never did one of these before, I had a question about it. I know for sure it works in Fx 47 though. And it works in 49. So should I just test 48 and say yes or no?
The mozregression tool will help determine the actual change that caused this to break, so it's much more helpful than just knowing which version of Firefox it stopped working in. It also handles downloading, unpacking, and executing each build so it's actually much faster to use mozregression than it is to download random builds manually.
Flags: needinfo?(noitidart)
I ran mozregression and narrowed this down to these two changesets,
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=0e9913cfd157075621ce869da2f73454164eb70f&tochange=eb749a28eee0decab6c333ec283569f0e924ff7f
Blocks: 1271566, 1266647
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(ctai)
Has Regression Range: no → yes
Rank: 12
Keywords: regression
Priority: -- → P1
Component: Video/Audio Controls → Audio/Video
Product: Toolkit → Core
Component: Audio/Video → Audio/Video: MediaStreamGraph
Thanks Jared for the help on that one! I'll make sure to have mozRegression understood for next time someone asks me to do it.
Bug 1266647 causes regression. Keep investigations....
Flags: needinfo?(ctai)
Roll back below line can fix the regression.
https://dxr.mozilla.org/mozilla-central/source/dom/media/TrackUnionStream.cpp#329

Keep investigations....
(In reply to Chia-hung Tai [:ctai :ctai_mozilla :cht] from comment #8)
> Created attachment 8760560 [details]
> Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in
> MediaEncoder::NotifyQueuedAudioData.
> 
> Review commit: https://reviewboard.mozilla.org/r/58134/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/58134/

I think the root cause is the mistake of keeping notify queued audio data in direct connected mode. That will cause the double of encoded data.
Attachment #8760560 - Flags: review?(rjesup) → review+
Comment on attachment 8760560 [details]
Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData.

https://reviewboard.mozilla.org/r/58134/#review54996
Comment on attachment 8760560 [details]
Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData.

Pehrsons is unavailable this week.  We shouldn't need his review.

Since this code has likely uplifted to Aurora/49, we'll probably need to nominate this for 49 once we land and verify the fix.  (Please mark the flags appropriately for what versions are affected.)
Flags: needinfo?(ctai)
Attachment #8760560 - Flags: review?(pehrsons)
Comment on attachment 8760560 [details]
Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58134/diff/1-2/
Bug 1266647 is landed in 49. Thanks for the review.
Flags: needinfo?(ctai)
OS: Windows 10 → All
Hardware: Unspecified → All
Pushed by cbook@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d13ee16778f1
Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData. r=jesup
Keywords: checkin-needed
Assignee: nobody → ctai
https://hg.mozilla.org/mozilla-central/rev/d13ee16778f1
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Hi Paul, I confirm here that yes the 1280002 was a duplicate and it works fine on Nightly. One question: in comment #11 #13 it is noted that this is also in 49/Aurora. So is it going to be fixed on the 49 before moving to stable?
[Tracking Requested - why for this release]:
Regression in MediaRecorder. See comment 0 for the details.


ctai, can you request uplift?
Flags: needinfo?(ctai)
Comment on attachment 8760560 [details]
Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData.

Approval Request Comment
[Feature/regressing bug #]:
[User impact if declined]:
[Describe test coverage new/current, TreeHerder]:
[Risks and why]: 
[String/UUID change made/needed]:

[Feature/regressing bug #]: regression bug Bug 1266647
[User impact if declined]: The duration of recorded blob/file will be 2x long. Break MediaRecorder functionality.
[Describe test coverage new/current, TBPL]: Manual test on website https://www.webrtc-experiment.com/RecordRTC/. Also in Comment 18, adifran also verified this bug. 
[Risks and why]: Low risk because it just reuse some existing code.
[String/UUID change made/needed]: none
Flags: needinfo?(ctai)
Attachment #8760560 - Flags: approval-mozilla-aurora?
Comment on attachment 8760560 [details]
Bug 1278027 - Reuse some codes of MediaEncoder::NotifyQueuedTrackChanges in MediaEncoder::NotifyQueuedAudioData.

Recent regression, let's uplift this fix! 
Thanks for catching the bug, noitidart.
Attachment #8760560 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: