TPEPlatform/MediaRecorder: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 206: Line 206:
**https://groups.google.com/forum/#!topic/mozilla.dev.media/y-KoshuUR44
**https://groups.google.com/forum/#!topic/mozilla.dev.media/y-KoshuUR44
*[http://dev.w3.org/2011/webrtc/editor/getusermedia.html GetUserMedia Spec]
*[http://dev.w3.org/2011/webrtc/editor/getusermedia.html GetUserMedia Spec]
*[http://www.w3.org/TR/2013/WD-mediastream-recording-20130205/ MediaStream Recording Spec]
*[https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html MediaStream Recording Spec]
*[https://dvcs.w3.org/hg/dap/raw-file/tip/media-stream-capture/ImageCapture.html Image Capture Spec]
*[https://dvcs.w3.org/hg/dap/raw-file/tip/media-stream-capture/ImageCapture.html Image Capture Spec]
*[http://www.w3.org/TR/html-media-capture/ HTML media capture (only supports simple capture functionalities)], associated bug {{bug|741393}}
*[http://www.w3.org/TR/html-media-capture/ HTML media capture (only supports simple capture functionalities)], associated bug {{bug|741393}}

Revision as of 08:54, 8 July 2013

Summary

We already have mozCamera for take photo or video recording. mozCamera itself is not part of any standard web spec, which means

  1. It works on Firefox platform only.
  2. Totally isolate in media world. There is no way to connect data stream from mozCamera with media processing module, such as WebAudio, or recording module, such as MediaRecorder.

MediaRecorder takes media stream, which may come from web audio or media source or user media, as input. User may process all these media streams before recording. In mozCamera, there is nothing that user can do between capturerer and recorder, except canned video effect.

The following table reveals encode and associate container format we are going to support:

Type Encoder Detailed Container
Audio Opus mono/ stereo Ogg
Vobis mono/ stereo Ogg
AAC mono/ stereo/ 5.0/ 5.1 MPEG-4
PCM 16 bit LPCM Wave
Video H.264 Baseline Profile MPEG-4
VP8 WebM

Encoder framework

META bugs for Encoding framework:

Dependency among modules

  • GetUserMedia
    • Recoderging Pipeline
      • Audio Encoding - Wav/ Opus/ Vobis/ AAC/ HEAAC
      • Video Encoding - VP8/ VP9/ H.264/ HEVC
      • Container multiplexer - MP4/ OGG/ WebM
    • ImageCapture
      • Image Encoding - JPG?

Class Diagram

The class diagram of encoder framework Class Diagram-Encoder.jpg

Sequential Diagram

The sequence diagram of receiving input source from MediaStreamGraph, and outputting final container data from MediaEncoder to MediaRecorder Sequence Diagram-Encoder.jpg

Testing Plan

Testing Coverage

  1. Audio recording(marionette test case)
    • record/ stop
      • record with defined timeslice
      • record without timeslice
    • pause/ resume
  2. Audio encoding(native test case)
    • TBD

Testing Resource

  • Audio recording: Randy Lin
  • Audio encoding: TBD.

Bug List

Bug No Description Statue Target Assigned
bug 889772 Audio Recording - Test Case Open Gecko 25 Randy Lin

Codec Support

List pros and cons for each audio/ video codec. We need more clear view to prioritize codec support sequence.

Requirements for a video codec, which is the way to we prioritize encoder support:

  1. Image quality
  2. Performance
  3. Power consumption
  4. Hardware support
  5. Licensing

Codec/ Container support

Schedule is not well define yet. All the information list bellow is not confirmed.

B2G

Type Milestone Target Issue Assignee
Audio Opus/ OGG Gecko 24 bug 842243 Shelly
LPCM/ Wav TBD
MP3 Not defined bug 884162
Video H.264/ AAC/ MP4 Gecko 28 bug 879668
VP8/ Vobis/ WebM Gecko 27 bug 881840
VP9/ Opus/ WebM ??/?? TBD

Android

Milestone Target Issue Assignee
Opus/ OGG 6/14 bug 842243 Shelly

Linux

Milestone Target Issue Assignee
Opus/ OGG 6/14 bug 842243 Shelly

Windows

Milestone Target Date Issue No Assignee
Opus/ OGG 6/14 bug 842243 Shelly

MacOS

Milestone Target Date Issue No Assignee
Opus/ OGG 6/14 bug 842243 Shelly

Reference