Firefox/Shutdown Decoders: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(→‎Methodology: update the video file link.)
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=Overview=
=Overview=
== Background ==
Suspending video element's video decoder, when the video element is in background tabs or is invisible even in the foreground tab, is a Firefox feature that reduces CPU/GPU & memory usage.
Suspending video element's video decoder, when the video element is in background tabs or is invisible even in the foreground tab, is a Firefox feature that reduces CPU/GPU & memory usage.


The mechanism is that, when a video element is invisible, we replace its original video decoder with '''blank video decoder''' which only produces white frames with right resolution and right time information. The original video decoder is released and the black video decoder is light so that we reduce CPU/GPU & memory usage.
The mechanism is that, when a video element is invisible, we replace its original video decoder with '''blank video decoder''' which only produces white frames with right resolution and right time information. The original video decoder is released and the black video decoder is light so that we reduce CPU/GPU & memory usage.


The drawback is that, while the suspended-video-element is switched back to be visible again, we should resume its original video decoder. The resuming operation must be asynchronous and might be time-consuming which depends on the resolution of the video file and whether it contains audio tracks or not.
== Trade-off ==
 
The trade-off is that, while the suspended-video-element is switched back to be visible again, we should resume its original video decoder.  
In the prototype (Phase 0), we have enabled this feature on the Firefox Nightly channel for any video element. We also add telemetry to collect needed information, especially on the resuming time. Currently (Phase 1), we are going to enable this feature on the Firefox Release channel for videos that is able to be resumed quickly and the criteria is '''1) videos without audio track''' or '''2) videos with both audio and video tracks but with low resolution (480P for now)'''. In the future (Phase 2), our goal is to enable this feature on all videos without observable latency while resuming.
The resuming operation must be asynchronous and might be time-consuming which depends on the resolution of the video file and whether it contains audio tracks or not.


== Working flow ==
The following is a step-by-step description of suspending decoder working flow.
The following is a step-by-step description of suspending decoder working flow.
# At the very beginning of the decoding framework, the raw media data is sent to demuxer.
# At the very beginning of the decoding framework, the raw media data is sent to demuxer.
Line 15: Line 17:
[[File:Fx_Shutdown_Decoder_Architecture_v2.png|800px|frameless]]
[[File:Fx_Shutdown_Decoder_Architecture_v2.png|800px|frameless]]


=Overall Project Health=


===Key Documents===
<font color="green">'''[GREEN]'''</font>
* Code: https://hg.mozilla.org/integration/mozilla-inbound/file/tip/dom/media
* Issues: Meta Bug - [https://bugzilla.mozilla.org/show_bug.cgi?id=1276556 Bug 1276556] [META] Tracking enable of background tab video decoder suspend
* Product/UX Trello Board: NA


===Other Resources===
=Target Milestone=
* [https://goo.gl/0dylCY Meeting Minute]
Firefox55


=Known Issues=
=Engineer Owner=
===Decoder resuming latency===
Tzuhao Kuo [:kaku]
While the suspended-video-element is switched back to be visible again, we should resume its original video decoder. The resuming operation '''must be asynchronous''' since we don't want to block the main thread and '''might be time-consuming''' which depends on the resolution of the video file and whether it contains audio tracks or not.


Currently, we have no way to boost the resuming time, however, we have telemetries for collecting the needed time of different resolutions on different platforms.  
=QA Contact=
Simona Badau <simona.marcu@softvision.ro><br>
Adrian Florinescu <adrian.florinescu@softvision.ro


= MVP Scope-Bug Tracking =
*{{Bug|1293963}} -[Meta] Suspend-video-decoder: phase-1 shipping
*tracking things only under the scope of phase-1 shipping.
<onlyinclude>
<bugzilla>
{
    "blocks": "1293963",
    "include_fields": "id, priority, summary, status,resolution,assigned_to, last_change_time",
    "order": "bug_id"
}
</bugzilla>
</onlyinclude>


''Related telemetries'':
*{{Bug|1352007}}-  [Meta] Suspend-video-decoder
* [https://telemetry.mozilla.org/new-pipeline/dist.html#!cumulative=0&end_date=2016-08-28&keys=All!AV%252C241-480!V%252C241-480!AV%252C481-720&max_channel_version=nightly%252F51&measure=VIDEO_SUSPEND_RECOVERY_TIME_MS&min_channel_version=null&product=Firefox&sanitize=1&sort_keys=submissions&start_date=2016-08-18&table=0&trim=1&use_submission_date=0 VIDEO_SUSPENDED_RECOVERY_TIME_MS]
*the highest level meta bug tracking all things related to the suspend-video-decoder feature.
<onlyinclude>
<bugzilla>
{
    "blocks": "1352007",
    "include_fields": "id, priority, summary, status,resolution,assigned_to, last_change_time",
    "order": "bug_id"
}
</bugzilla>
</onlyinclude>


''Related bugs'':
*{{Bug|1276556}}-[META] Tracking enable of background tab video decoder suspend
* [https://bugzil.la/1272919 Bug 1272919 - Video shows the frame that was on screen when I switched from youtube to a different tab for a fraction of a second]
*tracking basic functionalities which are all completed
 
<onlyinclude>
===Video element as content source===
<bugzilla>
The situation is about the video element itself is used as a content source and its decoder might be suspended at the same time. This issue could be split into two cases:
{
* Case 1: The decoder is suspended '''AFTER''' the {cpatureStream(), drawImage(), createImageBitmap()} is called.
    "blocks": "1276556",
* Case 2: The decoder is suspended '''BEFORE''' the {cpatureStream(), drawImage(), createImageBitmap()} is called.
    "include_fields": "id, priority, summary, status,resolution,assigned_to, last_change_time",
 
    "order": "bug_id"
'''Case 1''' is relatively easy, we could mark the video element as being a content source while {cpatureStream(), drawImage(), createImageBitmap()} is invoked and then its decoder should never be suspended.
}
 
</bugzilla>
'''Case 2''' is rather complicated. The critical issue is that resuming decoder is an async operation with latency. So, while {cpatureStream(), drawImage(), createImageBitmap()} is invoked on an already-suspended-video, there must be several "blank" frames been leaked, even though we resume the decoder immediately. To completely solve this problem, we must make "resuming decoder" a blocking operation, however, it might block the main thread; otherwise, we leak the blank frames.
</onlyinclude>
 
 
''Related bugs'':
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1284389 Bug 1284389 - Don't suspend video elements captured via mozCaptureStream()]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1295921 Bug 1295921 - Don't suspend video decoder for elements as sources to drawImage() and createImageBitmap()]
 
=Planning=
==Goals==
* Help users to reduce device resource usage (CPU & Memory)
* Finish tasks across videos
* No impact on current user flow
 
==Phases==
* 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 telemetrics
* video decode suspend in the hands of all our users
 
==Schedule==
 
===Product Milestones===
 
 
= Engineering =
Shutdown_Decoders [status: <span style="color:#0f0">Green</span>]


Current Goals:
=Signoff-Report issued on April 25 by Adrian Florinescu =
* Ship disabling video decoders for ads
==Feature testing status: COMPLETED==
* Silent, looping videos where user doesn't really care the exact point
Testing status: COMPLETED (100%).
83 passed (92%), 4 blocked (4%), 3 failed with known bugs (3%), 0 failed with new bugs (0%)


Next Milestone:
==Overall feature status after testing: GREEN==
Reason: 92% of our tests passed.


==Recommendation from QE: SHIP IT ==
Reason: 1 existing issue was reopened during testing Bug1309494
Proposed course of action: let this feature ride Fx55.


==QA Test Report  ==
*Test Report: [https://wiki.mozilla.org/QA/Shutdown_Decoders Test Report]


== Milestones ==
==Bugs tracking ==
=== Optimizations ===
* [https://bugzil.la/1282710 Bug 1282710 - Suspend and resume foreground video decoders according to visibility events]
** done.
* [https://bugzil.la/1282012 Bug 1282012 - Seek to nearest keyframe when resuming videos with no audio]
** [https://bugzil.la/1294657 Bug 1294657 - Seek to nearest keyframe when resuming videos with no audio - with audio track but muted]
*** pending, excluded from phase 1.
** [https://bugzil.la/1294658 Bug 1294658 - Seek to nearest keyframe when resuming videos with no audio - with audio track but might be silent]
*** pending, excluded from phase 1.
** [https://bugzil.la/1294656 Bug 1294656 - Seek to nearest keyframe when resuming videos with no audio - no audio track]
*** done.
* [https://bugzil.la/1274919 Bug 1274919 - Resume suspended video decoders on tab mouse hover.]
** under review.
* [https://bugzil.la/1284389 Bug 1284389 - Don't suspend video elements captured via mozCaptureStream()]
** WIP.
* [https://bugzil.la/1295921 Bug 1295921 - Don't suspend video decoder for elements as sources to drawImage() and createImageBitmap()]
** WIP.
* Resume video when keyboard is used to change tags - Needs Bug
** For example, if it's possible to detect the direction of cycling and videos are within, say, 5 tabs of the current tab, then start decoding again.
** Need to hook into the tab navigation/change code and alert media elements, like bug 1274919


=== Telemetry ===
* '''Amount of time hidden''' - measure of user value (Bucket results by resolution; i.e. are 720p videos hidden less often?)
** [http://bugzil.la/1285419 Bug 1285419 - Telemetry to support background video decoder suspend: Hidden play time]
** [https://mzl.la/2c0493i VIDEO_HIDDEN_PLAY_TIME_MS]
** [http://bugzil.la/1287987 Bug 1287987 - Telemetry to support background video decoder suspend: Percentage hidden/total play time, keyed by audio presence and height ranges]
** [https://mzl.la/2c04hQl VIDEO_HIDDEN_PLAY_TIME_PERCENTAGE]
** [http://bugzil.la/1293145 Bug 1293145 - Telemetry to support background video decoder suspend: Percentage video-decode-suspended/total play time]
** [https://mzl.la/2c07M9s VIDEO_INFERRED_DECODE_SUSPEND_PERCENTAGE]
* '''Recovery time''' - measure of user cost (separate for noisy vs silent videos) (Bucket results by resolution; i.e. do 720p videos take longer to recover?)
** [https://bugzil.la/1294349 Bug 1294349 - Telemetry to support background video decoder suspend: Recovery time from video-decode-suspended]
** [https://mzl.la/2c947Iv VIDEO_SUSPEND_RECOVERY_TIME_MS]
* '''Key frame spacing''' - distribution allows better tuning
** [http://bugzil.la/1289668 Bug 1289668 - Telemetry to support background video decoder suspend: Inter-keyframe timings]
** [https://mzl.la/2c04Utr VIDEO_INTER_KEYFRAME_AVERAGE_MS]
** [https://mzl.la/2c956bN VIDEO_INTER_KEYFRAME_AVERAGE_PERCENTAGE]
=== Mochitests ===
* [https://bugzil.la/1284177 Bug 1284177 - Add tests for video suspend in background]
** done
* [https://bugzil.la/1294358 Bug 1294358 - Add test for suspended videos still fire 'ended' event]
** done
* [https://bugzil.la/1295844 Bug 1295844 - Test suspended videos with webm files]
** done
== Logged bugs ==
{{Bug|1276556}} - [META] Tracking enable of background tab video decoder suspend
<bugzilla>
<bugzilla>
     {
     {
         "blocks":[1276556],
         "id":["1309494"],
        "status":["NEW"],
         "include_fields": "id, priority, summary, status, resolution, assigned_to, last_change_time",
         "include_fields": "id, priority, component, assigned_to, summary, status, target_milestone"
        "order": "bug_id"
     }
     }
</bugzilla>
</bugzilla>
=UX Spec=


=Team=
*UX Spec : [https://mozilla.invisionapp.com/share/K48PCVSEM UX Spec ]


Product owner:
===Decoder resuming latency===
While the suspended-video-element is switched back to be visible again, we should resume its original video decoder. The resuming operation '''must be asynchronous''' since we don't want to block the main thread and '''might be time-consuming''' which depends on the resolution of the video file and whether it contains audio tracks or not.
 
Currently, we have no way to boost the resuming time, however, we have telemetries for collecting the needed time of different resolutions on different platforms.


Eng: Alastor, Daniel, Gerald, JW, Kaku,
<br />


Program Management: Blake, Josh
=Power consumption (under experiment...)=
[https://docs.google.com/a/mozilla.com/spreadsheets/d/1gvq2BOr0GdZb7hEwDenOBYc25rpCpeHYONkDH6b7IVc/edit?usp=sharing raw data]
==Methodology==
'''Used media file:''' https://drive.google.com/a/mozilla.com/file/d/0Bwk6-CqTcXSDRlYtTjVPZUpJRUU/view?usp=sharing
* mp4, H.264
* video only
* resolution: 1280 x 720
* duration is 2:4:22
'''Test scenario:''' use a local html file to play a local video file and put it into 4 cases. <br />
* case 1: normal playback in foreground tab, full screen. <br />
* case 2: normal playback if foreground tab with video decoder suspended, full screen. <br />
* case 3: normal playback in background tab. <br />
* case 4: normal playback if background tab with video decoder suspended. <br />


UX: Mark, Morpheus
==Nexus 5==
Normal playback in background tab: 3hr 59min 22sec.<br />
Suspend playback in background tab: 6hr 10min 02sec.<br />
'''Delta: 2hr 10min 40sec, 54%.'''<br />
[[File:Nexus-5.png|1600px|frameless]]


QA: SoftVision and William
==Nexus 6==
Normal playback in background tab: 5hr 15min 19sec.<br />
Suspend playback in background tab: 8hr 21min 37sec.<br />
'''Delta: 3hr 6min 18sec, 59%.'''<br />
[[File:Nexus-6.png|1600px|frameless]]

Latest revision as of 04:44, 13 July 2017

Overview

Background

Suspending video element's video decoder, when the video element is in background tabs or is invisible even in the foreground tab, is a Firefox feature that reduces CPU/GPU & memory usage.

The mechanism is that, when a video element is invisible, we replace its original video decoder with blank video decoder which only produces white frames with right resolution and right time information. The original video decoder is released and the black video decoder is light so that we reduce CPU/GPU & memory usage.

Trade-off

The trade-off is that, while the suspended-video-element is switched back to be visible again, we should resume its original video decoder. The resuming operation must be asynchronous and might be time-consuming which depends on the resolution of the video file and whether it contains audio tracks or not.

Working flow

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

  1. At the very beginning of the decoding framework, the raw media data is sent to demuxer.
  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 are sent to audio and video decoder separately.
  3. In data decoding period, audio decoder keeps working as normal because a user may be listening to the music. But, Firefox uses a blank video decoder to replace current video decoder if the video element is invisible.

Fx Shutdown Decoder Architecture v2.png

Overall Project Health

[GREEN]

Target Milestone

Firefox55

Engineer Owner

Tzuhao Kuo [:kaku]

QA Contact

Simona Badau <simona.marcu@softvision.ro>
Adrian Florinescu <adrian.florinescu@softvision.ro

MVP Scope-Bug Tracking

  • bug 1293963 -[Meta] Suspend-video-decoder: phase-1 shipping
  • tracking things only under the scope of phase-1 shipping.
Full Query
ID Priority Summary Status Resolution Assigned to Last change time
1276556 P3 [META] Tracking enable of background tab video decoder suspend NEW 2022-10-11T18:31:13Z
1294349 -- Telemetry to support background video decoder suspend: Recovery time from video-decode-suspended RESOLVED FIXED Gerald Squelart (he/him) (not at Mozilla since 2022-09-15) 2016-08-25T07:57:28Z
1294656 -- Seek to nearest keyframe when resuming videos with no audio - no audio track RESOLVED FIXED Tzuhao Kuo [:kaku] 2016-09-05T03:51:20Z
1305338 P1 [UX] UX Spec for Shutdown Decoder Phase 1 RESOLVED FIXED Mark Liang(:mark_liang) 2017-03-10T06:42:07Z
1309492 P3 If a video element's video is suspended, make it draw black frames. RESOLVED WONTFIX Tzuhao Kuo [:kaku] 2017-03-30T08:23:32Z
1309494 P3 Use spinning loading UI if resuming video element's video decoder is longer than 250ms. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-05-17T09:08:05Z
1345403 -- Mark a video element as taint and never suspend it again if it is passed into drawImage() RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-03-30T07:46:19Z
1346116 -- Consider a video element is in tree or not to suspend its video decoder RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-03-14T13:27:37Z
1346120 -- If a video element's video is suspended, keep the last decoded video frame on the screen RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-03-30T09:00:23Z
1346235 P1 Fennec has stopped working while playing videos VERIFIED FIXED John Lin [:jhlin][:jolin] 2020-12-21T18:31:00Z
1348432 P1 Missing audio in YouTube videos that were requested within the same tab. Refreshing page fixes audio. VERIFIED FIXED Tzuhao Kuo [:kaku] 2017-04-27T07:31:42Z
1348864 P1 Black frame displayed on video decoder resume RESOLVED DUPLICATE Tzuhao Kuo [:kaku] 2020-12-21T18:31:00Z
1349456 -- Mark a video element as taint and never suspend it again if it is aptured via mozCaptureStream() RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-03-30T07:46:19Z
1349459 -- Mark a video element as taint and never suspend it again if it is passed into createImageBitmap() VERIFIED FIXED Tzuhao Kuo [:kaku] 2017-04-24T08:10:15Z
1365581 P3 [Shutdown Decoder] OGV video elements are not suspended. RESOLVED INVALID Tzuhao Kuo [:kaku] 2020-12-21T18:31:00Z
1365584 P1 [Shutdown Decoder] On WEBM video element resume the player returns a error RESOLVED DUPLICATE Tzuhao Kuo [:kaku] 2020-12-21T18:31:00Z
1369970 -- [Shutdown Decoder] enable the preference. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-06-08T14:09:25Z

17 Total; 1 Open (5.88%); 13 Resolved (76.47%); 3 Verified (17.65%);


  • bug 1352007- [Meta] Suspend-video-decoder
  • the highest level meta bug tracking all things related to the suspend-video-decoder feature.
Full Query
ID Priority Summary Status Resolution Assigned to Last change time
1274919 P1 Resume suspended video decoders on tab mouse hover. RESOLVED FIXED Alastor Wu [:alwu] 2017-11-16T00:21:17Z
1276557 P3 Disable background video suspend on nightly RESOLVED WORKSFORME 2020-11-11T19:14:40Z
1282012 P3 Seek to nearest keyframe when resuming videos with no audio NEW 2022-10-11T18:24:31Z
1284389 P3 Don't suspend video elements captured via mozCaptureStream() RESOLVED FIXED 2025-12-23T20:47:49Z
1291620 P3 Media Tracing via ETW NEW 2022-10-11T18:29:32Z
1293963 P3 [Meta] Suspend-video-decoder: phase-1 shipping NEW 2022-10-11T18:30:39Z
1295921 P3 Don't suspend video decoder for elements as sources to drawImage() NEW 2022-10-11T18:31:33Z
1308184 P1 [Meta] [Phase 1+2] Shutdown video decoders when Firefox is in the background RESOLVED WONTFIX Tzuhao Kuo [:kaku] 2020-12-21T18:31:00Z
1346705 P3 Enable suspend-video-decoder related mochitests on autophone NEW 2022-10-11T19:05:31Z
1349461 P3 Don't suspend video decoder for elements as sources to createImageBitmap() NEW 2022-10-11T19:07:24Z
1380584 -- [Shield] Pref Flip Study: Shutdown decoder RESOLVED FIXED 2017-11-16T05:00:07Z
1381114 P3 Autoplay is not disabled after restoring session with browser.sessionstore.restore_on_demand false RESOLVED WORKSFORME 2021-10-12T12:13:45Z
1381376 -- background video doesn't get resumed when turning off the pref "media.suspend-bkgnd-video.enabled" RESOLVED FIXED Alastor Wu [:alwu] 2023-05-18T19:30:11Z
1381738 P3 Resume video decoding immediately once turning off the pref "media.suspend-bkgnd-video.enabled" NEW 2022-10-11T19:29:48Z
1383610 -- [ShutdownDecoder] Turn off preference on FF55 desktop version. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-07-28T08:32:43Z
1383653 -- [Shutdown Decoder] video can only be suspended once. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-07-30T16:49:28Z
1707242 P2 Speaker icon on tab playing audio disappears at youtube.com RESOLVED FIXED Alastor Wu [:alwu] 2021-12-08T16:30:18Z
1794000 -- Videos in background tabs should stop playing NEW 2023-02-27T19:16:21Z

18 Total; 8 Open (44.44%); 10 Resolved (55.56%); 0 Verified (0%);


  • bug 1276556-[META] Tracking enable of background tab video decoder suspend
  • tracking basic functionalities which are all completed
Full Query
ID Priority Summary Status Resolution Assigned to Last change time
1224973 P2 Reduced decoder usage for background videos RESOLVED FIXED u480271 2017-01-01T11:27:27Z
1272919 P3 Video shows the frame that was on screen when I switched from youtube to a different tab for a fraction of a second VERIFIED FIXED u480271 2016-12-27T16:14:40Z
1274626 P3 video fasts forwards when it was sitting in a background tab VERIFIED FIXED Tzuhao Kuo [:kaku] 2016-12-27T16:07:09Z
1275481 P2 Suspend background video decoders on timer RESOLVED FIXED u480271 2016-10-03T15:09:44Z
1275538 P1 Crash in mozilla::MediaFormatReader::RequestVideoData RESOLVED FIXED Jean-Yves Avenard [:jya] 2016-05-30T13:37:57Z
1276495 P1 Crash in mozilla::MediaFormatReader::RequestAudioData RESOLVED FIXED u480271 2016-07-05T07:56:43Z
1282710 P2 Suspend and resume foreground video decoders according to visibility events. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-07-14T20:38:56Z
1284177 P3 Add tests for video suspend in background RESOLVED FIXED u480271 2017-02-14T08:36:51Z
1285419 P3 Telemetry to support background video decoder suspend: Hidden play time RESOLVED FIXED Gerald Squelart (he/him) (not at Mozilla since 2022-09-15) 2016-08-30T06:47:21Z
1286875 P3 Firefox Nightly play/pause on Youtube creates syncronization issue between video and audio RESOLVED INVALID 2016-07-27T06:42:46Z
1287987 -- Telemetry to support background video decoder suspend: Percentage hidden/total play time, keyed by audio presence and height ranges RESOLVED FIXED Gerald Squelart (he/him) (not at Mozilla since 2022-09-15) 2016-08-30T06:47:21Z
1289668 -- Telemetry to support background video decoder suspend: Inter-keyframe timings RESOLVED FIXED Gerald Squelart (he/him) (not at Mozilla since 2022-09-15) 2016-08-17T01:33:51Z
1293145 -- Telemetry to support background video decoder suspend: Percentage video-decode-suspended/total play time RESOLVED FIXED Gerald Squelart (he/him) (not at Mozilla since 2022-09-15) 2016-08-30T06:47:21Z
1294345 P3 Remove the TrackSet parameter from MediaDecoderStateMachine::InitiateDecodeRecoverySeek() RESOLVED FIXED JW Wang [:jwwang] [:jw_wang] 2016-08-12T16:49:06Z
1294349 -- Telemetry to support background video decoder suspend: Recovery time from video-decode-suspended RESOLVED FIXED Gerald Squelart (he/him) (not at Mozilla since 2022-09-15) 2016-08-25T07:57:28Z
1294352 P3 Merge MDSM::InitiateSeek() and MDSM::InitiateDecodeRecoverySeek() RESOLVED FIXED JW Wang [:jwwang] [:jw_wang] 2016-08-12T16:49:09Z
1294358 P3 Add test for suspended videos still fire 'ended' event RESOLVED FIXED u480271 2016-08-23T14:04:02Z
1295844 P3 Test suspended videos with webm files. RESOLVED FIXED u480271 2016-08-25T23:58:42Z
1299065 -- Telemetry to support background video decoder suspend: invisible elements in the foreground should also be recorded RESOLVED FIXED Tzuhao Kuo [:kaku] 2016-09-12T05:27:30Z
1299718 P3 Telemetry to support background video decoder suspend: the usage of a hidden video element as a content source RESOLVED FIXED u480271 2017-02-07T09:12:29Z
1301059 P3 When suspending decode, the BlankDecoder shouldn't be wrapped in a H264Converter RESOLVED FIXED Jean-Yves Avenard [:jya] 2016-09-14T10:11:53Z
1301061 P3 Background video decode will cause issue when use with EME RESOLVED INVALID 2016-10-06T06:46:24Z
1305338 P1 [UX] UX Spec for Shutdown Decoder Phase 1 RESOLVED FIXED Mark Liang(:mark_liang) 2017-03-10T06:42:07Z
1306551 P5 Intermittent dom/media/test/test_background_video_suspend.html | Assertion count 115 is greater than expected range 0-0 assertions from "ASSERTION: Clock should go forwards" RESOLVED FIXED JW Wang [:jwwang] [:jw_wang] 2017-10-30T01:14:26Z
1309492 P3 If a video element's video is suspended, make it draw black frames. RESOLVED WONTFIX Tzuhao Kuo [:kaku] 2017-03-30T08:23:32Z
1309494 P3 Use spinning loading UI if resuming video element's video decoder is longer than 250ms. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-05-17T09:08:05Z
1310140 P3 Reconcile suspend-video-decoder with the states of MDSM RESOLVED FIXED JW Wang [:jwwang] [:jw_wang] 2016-10-19T15:06:56Z
1313955 P3 Paused videos in background tabs change time position slightly when the tab is selected VERIFIED FIXED u480271 2017-02-09T14:26:35Z
1346120 -- If a video element's video is suspended, keep the last decoded video frame on the screen RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-03-30T09:00:23Z

29 Total; 0 Open (0%); 26 Resolved (89.66%); 3 Verified (10.34%);


Signoff-Report issued on April 25 by Adrian Florinescu

Feature testing status: COMPLETED

Testing status: COMPLETED (100%). 83 passed (92%), 4 blocked (4%), 3 failed with known bugs (3%), 0 failed with new bugs (0%)

Overall feature status after testing: GREEN

Reason: 92% of our tests passed.

Recommendation from QE: SHIP IT

Reason: 1 existing issue was reopened during testing Bug1309494 Proposed course of action: let this feature ride Fx55.

QA Test Report

Bugs tracking

Full Query
ID Priority Summary Status Resolution Assigned to Last change time
1309494 P3 Use spinning loading UI if resuming video element's video decoder is longer than 250ms. RESOLVED FIXED Tzuhao Kuo [:kaku] 2017-05-17T09:08:05Z

1 Total; 0 Open (0%); 1 Resolved (100%); 0 Verified (0%);

UX Spec

Decoder resuming latency

While the suspended-video-element is switched back to be visible again, we should resume its original video decoder. The resuming operation must be asynchronous since we don't want to block the main thread and might be time-consuming which depends on the resolution of the video file and whether it contains audio tracks or not.

Currently, we have no way to boost the resuming time, however, we have telemetries for collecting the needed time of different resolutions on different platforms.


Power consumption (under experiment...)

raw data

Methodology

Used media file: https://drive.google.com/a/mozilla.com/file/d/0Bwk6-CqTcXSDRlYtTjVPZUpJRUU/view?usp=sharing

  • mp4, H.264
  • video only
  • resolution: 1280 x 720
  • duration is 2:4:22

Test scenario: use a local html file to play a local video file and put it into 4 cases.

  • case 1: normal playback in foreground tab, full screen.
  • case 2: normal playback if foreground tab with video decoder suspended, full screen.
  • case 3: normal playback in background tab.
  • case 4: normal playback if background tab with video decoder suspended.

Nexus 5

Normal playback in background tab: 3hr 59min 22sec.
Suspend playback in background tab: 6hr 10min 02sec.
Delta: 2hr 10min 40sec, 54%.
Nexus-5.png

Nexus 6

Normal playback in background tab: 5hr 15min 19sec.
Suspend playback in background tab: 8hr 21min 37sec.
Delta: 3hr 6min 18sec, 59%.
Nexus-6.png