Closed Bug 962332 Opened 11 years ago Closed 11 years ago

[B2G][Media Recorder]Unable to simultaneously record audio in single stream/process if second recording has timeslice but first does not.

Categories

(Core :: Audio/Video: Recording, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
b2g-v1.2 --- affected
b2g-v1.3 --- affected

People

(Reporter: rkuhlman, Assigned: rlin)

Details

(Whiteboard: burirun1.3-2)

Attachments

(5 files)

Device is simultaneously creating two recordings in a single stream and content process. If the second recording has a timeslice and the first does not, then the second audio track will not record properly. Attempting to launch the Blob URL will display a warning: "Video can't be played because the file is corrupt." Repro Steps: 1) Updated Buri to BuildID: 20140121004137 2) Go to http://mozilla.github.io/qa-testcase-data/webapi/mediarecorder/index.html. 3) Select microphone checkbox, and hit setup with 2 provided in number of recorders. 4) Grant permissions. 5) Select 'start recording' on the first set of media recorder controls. 6) Select 'start recording' with a 250 timeslice in the 2nd set of media recorder controls. 7) After five seconds of generating sound, stop each active recording. 8) Examine each blob URL generated. Actual: The media from the first recorder does not display a video length. Only the current timestamp of the video is displayed. The media from the second recorder is not available. The user is presented with a warning "Video can't be played because the file is corrupt. Expected: Both audio tracks are saved properly. User can play them without issues, and the length of the clip is displayed. Environmental Variables: Device: Buri v1.3 Moz RIL BuildID: 20140121004137 Gaia: 47049555282a9a01fb60d1e1421b57e2810c96f5 Gecko: 6f7dfe36ab6c Version: 28.0a2 Firmware Version: v1.2-device.cfg Notes: This issue only occurs if the second recorder has a timeslice. If the first recorder has a timeslice, then both audio tracks function appropriately. Repro frequency: 100% Link to failed test case: https://moztrap.mozilla.org/manage/case/10170/ See attached: logcat, screenshot.
Attached image TrackScreenshots.jpg
Issue also occurs in 1.2 Environmental Variables: Device: Buri v1.2 Moz RIL BuildID: 20140114004002 Gaia: 539a25e1887b902b8b25038c547048e691bd97f6 Gecko: 42a1c35fc831 Version: 26.0 Firmware Version: v1.2-device.cfg
Assignee: nobody → rlin
I can reproduce this on desktop.
Can't reproduce on 29.0a1 (2014-01-25) nightly...=.=
(In reply to Randy Lin [:rlin] from comment #3) > Can't reproduce on 29.0a1 (2014-01-25) nightly...=.= What STR are following? I just double checked on Nightly 1/25/2014 & I was still able to reproduce.
One idea you might want to try here is to start up a debugger & playback the not working oga file. Then, identify using the debugging why decoding of that oga file failed. That could point out what failed in the Media Encoder.
I don't fill the Number of Recorders [], just click setup twice. The broken file seems miss the ogg header.
(In reply to Randy Lin [:rlin] from comment #8) > I don't fill the Number of Recorders [], just click setup twice. > The broken file seems miss the ogg header. Ah - that's the problem. You need to fill number of recorders to 2.
(In reply to Jason Smith [:jsmith] from comment #9) > (In reply to Randy Lin [:rlin] from comment #8) > > I don't fill the Number of Recorders [], just click setup twice. > > The broken file seems miss the ogg header. > > Ah - that's the problem. You need to fill number of recorders to 2. The difference btw in my test app of clicking setup twice vs. using # of recorders to 2 is that clicking setup twice would have 2 media recorder objects using separate media streams from each other, where as doing # of records to 2 would have 2 media recorder objects using the same media stream.
OK. got it. Thanks.
Attached patch test case patchSplinter Review
I have some fix with the test case. blobDataAvailable obj on 2nd onstop callback changed by others instance.
Attachment #8365832 - Flags: feedback?(jsmith)
Comment on attachment 8365832 [details] [diff] [review] test case patch Review of attachment 8365832 [details] [diff] [review]: ----------------------------------------------------------------- The intention of the patch looks right, although there's a bug in it. I'll close this out as invalid, as this isn't a bug in gecko. Feel free to open a pull request against https://github.com/mozilla/qa-testcase-data with the fix here. Otherwise, I'll probably get to this tomorrow. ::: qa/common.js @@ +28,4 @@ > > for(var i = 0; i < numberOfRecorders; i++){ > var mediaRecorder = new MediaRecorder(stream); > + mediaRecorder.blobdata = []; I don't think this is going to work, as there's a variable inconsistency. This uses mediaRecorder.blobData as a start, but later evt.target.blobdata.push is used. We should be using mediaRecorder.blobData throughout the code here.
Attachment #8365832 - Flags: feedback?(jsmith) → feedback+
Leaving needinfo on myself to ensure that the test case gets fixed here.
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(jsmith)
Resolution: --- → INVALID
Looks like this bug still reproduces with that test case fix.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
I think the mediaRecorder would reference to wrong object, so I change to use evt.target. You can dump the object send before updateBlobURLUI and found the data would be change in this case. + updateBlobURLUI(new Blob(mediaRecorder.blobData, { 'type' : mimeType })); + mediaRecorder.blobData = [];
Ah that worked. Thanks for the help.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → INVALID
No longer blocks: MediaRecording
Component: Video/Audio → Video/Audio: Recording
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: