TPEPlatform/MediaRecorder: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 44: Line 44:
==Encoder framework==
==Encoder framework==
META bugs for Encoding framework:
META bugs for Encoding framework:
*{{bug|879688}}: Implement MediaEncoder
{| class="fullwidth-table sortable" style="width: 100%;"
*{{bug|842243}}: Implement Audio encoding path
|-
*{{bug|879669}}: Implement Video encoding path
| style="background: none repeat scroll 0% 0% rgb(239, 239, 239);" width="100px" | '''Bug No'''
*{{bug|888177}}: Implement ImageCapture API  
| style="background: none repeat scroll 0% 0% rgb(239, 239, 239);" | '''Description'''
|-
| {{bug|803414}}
| WebAPI: Implementation MediaRecorder API
|-
| {{bug|879688}}
| Framework: Implement MediaEncoder
|-
| {{bug|842243}}
| Framework: Implement Audio encoding path
|-
| {{bug|879669}}
| Framework: Implement Video encoding path
|-
| {{bug|888177}}
| WebAPI: Implement ImageCapture API  
|}


Dependency among modules
Dependency among modules

Revision as of 10:06, 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:

Bug No Description
bug 803414 WebAPI: Implementation MediaRecorder API
bug 879688 Framework: Implement MediaEncoder
bug 842243 Framework: Implement Audio encoding path
bug 879669 Framework: Implement Video encoding path
bug 888177 WebAPI: Implement ImageCapture API

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?

Media encoder flow.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