Closed Bug 1523563 Opened 6 years ago Closed 5 years ago

MediaRecorder cannot record audio-only webm

Categories

(Core :: Audio/Video: Recording, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(6 files)

The EbmlComposer that writes webm clusters refuses to flush a cluster unless a VP8 keyframe has been encoded, even if we're doing an audio-only recording.

Depends on D35169

Somewhere along the way this must have gotten broken.
Until this, passing mime type to MediaRecorder has had no effect.

This patch does two things:

  1. Passes the mime type through from MediaRecorder to MediaEncoder
  2. Gives preference to the mime type when passed, wrt picking codecs,
    however, we still yield to a video mime type when given a video track
    since that's how both Firefox and Chromium function today.

Proper spec handling of mime type will be fixed in bug 1512175.

Depends on D35170

From the previous patch, if ogg is disabled we'll fallback on video/webm.
So some tests relying on errors need it disabled too, in order to pass.

Depends on D35171

This does two things:

  • Makes the code for how flushing works actually readable (seriously).
  • Allows audio-only webms.

Depends on D35172

Depends on D35173

Blocks: 1014393
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e431e395e20e Modernize test_mr_record_audionode.html. r=jib https://hg.mozilla.org/integration/autoland/rev/944da9f033e8 Test all mime types with audio node recording. r=jib https://hg.mozilla.org/integration/autoland/rev/7c42061bf905 Pass in mime type to MediaEncoder and give preference to it when passed. r=jib https://hg.mozilla.org/integration/autoland/rev/f5a1371cca6e Make mochitests pass with new video/webm fallback. r=jib https://hg.mozilla.org/integration/autoland/rev/6c52ecd21b30 Make sense of EbmlComposer. r=bryce https://hg.mozilla.org/integration/autoland/rev/d9f2bc3dd281 Modernize test_gUM_audioCapture.html somewhat. r=jib
Blocks: 1563520
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: