MediaRecorder: MP4 blob export has corrupted audio

RESOLVED DUPLICATE of bug 963238

Status

()

Core
Audio/Video: Recording
P1
normal
Rank:
15
RESOLVED DUPLICATE of bug 963238
3 years ago
3 years ago

People

(Reporter: ladybenko, Unassigned)

Tracking

({DevAdvocacy})

44 Branch
x86_64
Mac OS X
DevAdvocacy
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
When creating a new MediaRecorder with mimetype set to video/mp4, the audio is corrupted when downloading the blob as *.mp4. Image is fine. Changing the mimetype to webm, and then downloading the blob as *.webm works properly.

See http://jsfiddle.net/gdjytgqb/2/

This is how the MediaRecorder instance is created: 

var recorder = new MediaRecorder(stream, { mimeType: 'video/mp4' });
(Reporter)

Updated

3 years ago
Keywords: DevAdvocacy
Rank: 15
Priority: -- → P1

Comment 1

3 years ago
Hello,
I had some experiments about this bug with the following results:
(ENV: x86_64 mac osx 10.10.5)

Recorded video/mp4:
  Chrome 46: video & audio are fine
  Nightly 45: video can't be played
  (MP4Box.js parsed with nothing output)

Recorded video/webm:
  Chrome 46: video & audio are fine
  Nightly 45: video & audio are fine

Comment 2

3 years ago
recorded mp4 is actually vp8 & vorbis encoded.

Comment 3

3 years ago
Created attachment 8688266 [details] [diff] [review]
MediaRecorder constructor should throw exception when target mime isn't supported.

Current spec says "If the UA does not support the format or any of the parameters specified, it must raise an UnsupportedOption Exception." and now we don't.
https://w3c.github.io/mediacapture-record/MediaRecorder.html#widl-ctor-MediaRecorder--MediaStream-stream-DOMString-mimeType

Although our implementation is a little different from current spec (second arg of constructor should be simply a string to indicate mime type ..etc), we may implement canRecordMimeType() and make constructor throw when mimetype is video/mp4.
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 963238
You need to log in before you can comment on or make changes to this bug.