Firefox/Shutdown Decoders

From MozillaWiki
Jump to navigation Jump to search

Overview

Suspending Video Decoders for Firefox is a feature that can reduce CPU & memory usage when a video runs in browser background. In the prototype (Phase 0), we tried to shutdown video decoder while a video element is invisible. The mechanism can save the CPU & Memory usage but it's hard for Firefox to resume video after user goes back to previous web page which contains videos since video decoders has lost necessary information. Currently (Phase 1), we devoted ourselves to implementing this feature on 1) video without audio track and 2) low resolution video (480 P), and we added a new mechanism. The new mechanism is going to switch to another video decoder (we called blank decoder) while video element is invisible and continuously send white screen (empty data) to video player. In our target release (Phase 2), our goal is to enable this feature on all videos.

The following is a step-by-step description of shutdown decoder working flow.

  1. In the beginning of the decode framework, streaming or media file is going to be sent to demuxer if Firefox detects a media element.
  2. Demuxer helps to separate a combined signal, e.g., a streaming can be separated into audio data and video data by demuxer. After that, audio and video data will be sent to audio and video decoder separately.
  3. In data decoding period, audio decoder will works as normal because user may be listening to the music. But, Firefox uses a blank video decoder to replace current video decoder If Firefox detects a invisible video element.

Fx Shutdown Decoder Architecture.png


Key Documents

Other Resources

  • Etherpad: Constructing...

Install

Stable Release

Stay tuned.

Developer Release

The developer release is updated each time code is committed to Mozilla-central in HG.

Reporting Issues

If you find a bug or have a suggestion, please submit it on Bugzilla: https://goo.gl/coRinl

Planning

Goals

  • Help users to reduce device resource usage (CPU & Memory)
  • Finish tasks across videos
  • No impact in current user flow

Feature Plan

  • Phase 0: Shutdown decoders when video element is invisible
  • Phase 1: Using a blank video decoder to replace video decoder instead of shutdown decoders directly. In this phase, the mechanism is applied to 1) Low resolution video (480P) and 2) Video film without audio track
  • Phase 2: We're going to enhance the mechanism and make sure it can apply to all video files.

Success

  • Effective cross discipline teams solving problems across platforms
  • Validation of key assumptions through telmetrics
  • video decode suspend in the hands of all our users

Schedule

Product Milestones

Engineering

Shutdown_Decoders [status: Green]

Current Goals:

Next Milestone:

Changelog:


Milestones

Cross Team Projects

Working Plan

Goals:

Approach:

Task right now:


Problem:

Solution:

Questions and Goals:


Performance

Problem:

Solution:

Team

Product owner:

Eng Leads:

Program Management:

UX Leads:

QA:

Communications

IRC:

Email:

VidyoRoom: