Disable background video track for SRC= content to save resources. |
||||||||||||||||||||||
Issue descriptionThe (internal) doc is here: https://docs.google.com/document/d/1p40W4XXDB6VkxqPd4aRpR9oLP_SCdMuTVsr9P0NOauE/edit# The idea is to do the analogue of: document.getElementsByTagName('video')[0].videoTracks[0].selected = false whenever the video is in the background to stop decoding it. We want to launch this on Android and on desktop but desktop might require some heuristics to avoid breaking the user expectations too much w.r.t. video coming to the foreground.
,
Nov 23 2016
Should we merge this to M56 so people could enable it on Beta?
,
Nov 28 2016
,
Dec 1 2016
,
Dec 6 2016
,
Dec 16 2016
,
Jan 9 2017
,
Jan 11 2017
,
Jan 13 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc commit c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc Author: avayvod <avayvod@chromium.org> Date: Fri Jan 13 01:07:01 2017 [Video] Disable bg optimization if avg keyframe distance is >10s Just picked 10s arbitratily before we have a way to set this value via Finch. Sending this out to see if collecting the average keyframe distance and passing it via PipelineStatistics sounds reasonable. BUG=663999 TEST=manual Review-Url: https://codereview.chromium.org/2611333003 Cr-Commit-Position: refs/heads/master@{#443424} [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/base/pipeline_impl.cc [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/base/pipeline_status.h [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/blink/webmediaplayer_impl.h [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/blink/webmediaplayer_impl_unittest.cc [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/filters/decoder_stream.cc [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/filters/decoder_stream_traits.cc [modify] https://crrev.com/c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc/media/filters/decoder_stream_traits.h
,
Jan 17 2017
Verified this issue on chrome latest #57.0.2984.0 on win 7,Ubuntu 14.04 & Mac 10.12.2 by following steps mentioned as below. 1.Load a video that includes audio (Youtube Red,Vimeo & Amazon Video) 2.Switch that tab to background, then foreground quickly and check the video & audio. 3.After 1m, switch tab to foreground. check the video appear quickly and playback continue without interruption. Please find the screen shot for reference. @avayvod : Could you please let us know the expected behavior of the issue. Thank You!
,
Jan 18 2017
@avayvod: Unable to upload the video in chromium.So providing the video link.Could you please look in to this and update. https://drive.google.com/a/google.com/file/d/0Bx0w4BGmWEIqdGlxWGl3aEZzOWs/view?usp=sharing Note: Unable to capture the audio. Thank you!
,
Jan 18 2017
Hey, sorry, this is a feature issue, not a bug so no need to verify it as a fix, thanks! The feature is behind the feature flag (search for background video track in chrome://flags) so I don't think you were testing Chrome with the feature enabled in your video.
,
Jan 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/590011e3f3b68faf7f68592b3b931181e0cb4672 commit 590011e3f3b68faf7f68592b3b931181e0cb4672 Author: avayvod <avayvod@chromium.org> Date: Fri Jan 20 02:01:00 2017 [Video] Set the max keyframe distance for background optimization via FieldTrials. Get a field trial variations param as the time in milliseconds. Pass it from RenderViewHostImpl in the browser process to the renderer's RenderFrameImpl via WebPreferences. Set the value in WebMediaPlayerParams when WebMediaPlayerImpl is created. BUG=663999 TEST=manually with chrome --enable-features="BackgroundVideoTrackOptimization<Study" --force-fieldtrials=Study/Group1 --force-fieldtrial-params=Study.Group1:max_keyframe_distance_ms/1000 Review-Url: https://codereview.chromium.org/2628313002 Cr-Commit-Position: refs/heads/master@{#444946} [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/content/browser/renderer_host/render_view_host_impl.cc [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/content/public/common/common_param_traits_macros.h [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/content/public/common/web_preferences.cc [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/content/public/common/web_preferences.h [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/content/renderer/render_frame_impl.cc [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/media/blink/webmediaplayer_impl.h [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/media/blink/webmediaplayer_impl_unittest.cc [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/media/blink/webmediaplayer_params.cc [modify] https://crrev.com/590011e3f3b68faf7f68592b3b931181e0cb4672/media/blink/webmediaplayer_params.h
,
Apr 13 2017
,
Apr 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e85ec428376cf7d6f281ace33f1a8b440dc601c3 commit e85ec428376cf7d6f281ace33f1a8b440dc601c3 Author: avayvod <avayvod@chromium.org> Date: Fri Apr 14 00:11:33 2017 [Media] Add a finch trial param for background MediaSource videos Added a new finch trial parameter to set the max average keyframe distance that allows disabling of the video track or pausing MediaSource videos when in the background. WMPI now uses the right parameter according to the |load_type_|. Parametrized unit tests test for both load types. BUG=663999 TEST=unittests+manual Review-Url: https://codereview.chromium.org/2818823002 Cr-Commit-Position: refs/heads/master@{#464619} [modify] https://crrev.com/e85ec428376cf7d6f281ace33f1a8b440dc601c3/content/renderer/render_frame_impl.cc [modify] https://crrev.com/e85ec428376cf7d6f281ace33f1a8b440dc601c3/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/e85ec428376cf7d6f281ace33f1a8b440dc601c3/media/blink/webmediaplayer_impl.h [modify] https://crrev.com/e85ec428376cf7d6f281ace33f1a8b440dc601c3/media/blink/webmediaplayer_impl_unittest.cc [modify] https://crrev.com/e85ec428376cf7d6f281ace33f1a8b440dc601c3/media/blink/webmediaplayer_params.cc [modify] https://crrev.com/e85ec428376cf7d6f281ace33f1a8b440dc601c3/media/blink/webmediaplayer_params.h
,
Apr 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0120133fb866f23b66a32b39def84ed41d26d69b commit 0120133fb866f23b66a32b39def84ed41d26d69b Author: avayvod <avayvod@chromium.org> Date: Fri Apr 14 00:27:15 2017 [Media] Add a feature flag to pause bg video only players. BUG=663999 TEST=manual+unittests Review-Url: https://codereview.chromium.org/2818013002 Cr-Commit-Position: refs/heads/master@{#464624} [modify] https://crrev.com/0120133fb866f23b66a32b39def84ed41d26d69b/media/base/media_switches.cc [modify] https://crrev.com/0120133fb866f23b66a32b39def84ed41d26d69b/media/base/media_switches.h [modify] https://crrev.com/0120133fb866f23b66a32b39def84ed41d26d69b/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/0120133fb866f23b66a32b39def84ed41d26d69b/media/blink/webmediaplayer_impl_unittest.cc
,
May 16 2017
,
Jun 19 2017
Moving to 61, pending resolution to Issue 709302 at this point.
,
Jun 26 2017
What happened with the MSE launch? I thought we decided to only hold back the SRC launch due to that bug?
,
Jun 27 2017
John might have better memory than me but I think we decided offline not to launch anything until M60 because of the src= issue and I simply punted to the next release seeing it won't be resolved in M60.
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/df848adb8eb6bf9be13ed82e1b2156b8ae93615a commit df848adb8eb6bf9be13ed82e1b2156b8ae93615a Author: Dale Curtis <dalecurtis@chromium.org> Date: Wed Jul 19 22:39:46 2017 Enable background video track optimization for MSE content. While src= track change still suffer from http://crbug.com/709302, MSE based track changes work fine. This change enables both pausing and disable track for MSE content with a keyframe distance < 5s. The experiment data suggests that in the 95th percentile we might end up waiting ~980ms when disabling a track before the next video frame is shown. The 25th percentile is ~66ms, 50th is ~155ms, and 75th is ~325ms. For pausing, the percentiles results are ~10ms, ~32ms, ~116ms, and ~255ms. These compare favorably with control values. A later CL will cleanup chrome://flags and switches entries once we are confident in this release. Notably this has been launch approved since M58 and experiments have been running since then at 75% of dev, canary, beta. The discovery of issue 70302 blocked launch for all playbacks, so this pieces out the MSE portion which works properly. BUG=663999,703411 TEST=experiment data looks good. Change-Id: I07dfebb96d4a2c9147909bb7cdf96fa02469f801 Reviewed-on: https://chromium-review.googlesource.com/576488 Reviewed-by: Anton Vayvod <avayvod@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#488017} [modify] https://crrev.com/df848adb8eb6bf9be13ed82e1b2156b8ae93615a/content/renderer/media/media_factory.cc [modify] https://crrev.com/df848adb8eb6bf9be13ed82e1b2156b8ae93615a/media/base/media_switches.cc
,
Sep 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3f4935b98ff638e8f3332c70bf476d3e8d1b5102 commit 3f4935b98ff638e8f3332c70bf476d3e8d1b5102 Author: Dale Curtis <dalecurtis@chromium.org> Date: Sat Sep 09 00:11:59 2017 Always pause background video-only media on desktop too. Android has had this behavior for some time now. As of M62 we've launched background optimizations for MSE, we can also enable background pause support for video-only clips for src=. BUG=663999,703411 TEST=experiment data looks good; ~98% of resume < 1s. Change-Id: I8a2435579c7c996702c08f22ea398abc28e46cdf Reviewed-on: https://chromium-review.googlesource.com/651237 Reviewed-by: Yuri Wiitala <miu@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#500749} [modify] https://crrev.com/3f4935b98ff638e8f3332c70bf476d3e8d1b5102/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/3f4935b98ff638e8f3332c70bf476d3e8d1b5102/media/blink/webmediaplayer_impl_unittest.cc
,
Oct 18 2017
Assigning all my bugs to Mounir for him to triage and close/reassign later.
,
Oct 24 2017
Re-assigning to dalecurtis@ as his team took over this project.
,
Oct 25 2017
,
Oct 30 2017
as per c#22, this bug is fixed.
,
Dec 14 2017
Was wondering where this went, still needs enabling for MSE.
,
Dec 14 2017
Err, I mean SRC; it's already enabled for MSE.
,
Dec 15 2017
,
Jan 12 2018
,
Apr 13 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/664c3ca7b7e7ca3bf634226663256a18df7552ec commit 664c3ca7b7e7ca3bf634226663256a18df7552ec Author: François Beaufort <beaufort.francois@gmail.com> Date: Fri Apr 13 07:24:51 2018 [Picture-in-Picture] Disable background video tracks optimization. This CL makes sure a video player in Picture-in-Picture doesn't get paused because of background video tracks optimization. Bug: 806249 , 663999 Change-Id: Ia3453000a9107d28974428c1ab004227370dc28f Reviewed-on: https://chromium-review.googlesource.com/1008082 Reviewed-by: apacible <apacible@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Cr-Commit-Position: refs/heads/master@{#550534} [modify] https://crrev.com/664c3ca7b7e7ca3bf634226663256a18df7552ec/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/664c3ca7b7e7ca3bf634226663256a18df7552ec/media/blink/webmediaplayer_impl_unittest.cc
,
Apr 17 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/664c3ca7b7e7ca3bf634226663256a18df7552ec commit 664c3ca7b7e7ca3bf634226663256a18df7552ec Author: François Beaufort <beaufort.francois@gmail.com> Date: Fri Apr 13 07:24:51 2018 [Picture-in-Picture] Disable background video tracks optimization. This CL makes sure a video player in Picture-in-Picture doesn't get paused because of background video tracks optimization. Bug: 806249 , 663999 Change-Id: Ia3453000a9107d28974428c1ab004227370dc28f Reviewed-on: https://chromium-review.googlesource.com/1008082 Reviewed-by: apacible <apacible@chromium.org> Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Commit-Queue: François Beaufort <beaufort.francois@gmail.com> Cr-Commit-Position: refs/heads/master@{#550534} [modify] https://crrev.com/664c3ca7b7e7ca3bf634226663256a18df7552ec/media/blink/webmediaplayer_impl.cc [modify] https://crrev.com/664c3ca7b7e7ca3bf634226663256a18df7552ec/media/blink/webmediaplayer_impl_unittest.cc
,
Aug 23
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d5a6baab5a827dd0d3a87ce445adf4dc30f8fce2 commit d5a6baab5a827dd0d3a87ce445adf4dc30f8fce2 Author: Ted Meyer <tmathmeyer@chromium.org> Date: Thu Aug 23 18:25:55 2018 Seek video track only when it is re-enabled PipelineController (closure) <----- calling this closure allows the rest of the track switch | and seek queue to continue to happen. ^ | | v | FFmpegDemuxer::OnSelectedVideoTrackChanged | (closure) <----- closure is passed down, but this function | | toggles some stream bits and then passes | | the closure down to the seek. | | | v | FFmpegDemuxer::SeekAnyEnabledVideoFrame | (closure) <----- If there are no tracks to enable, we're | | done, and can call the closure -----------| | | v | FFmpegDemuxer::SeekInternal | (closure) <----- Otherwise, we keep state that we're enabling | | a track and seeking it. This state lets us | | know later that we should drop some audio | | frames. | v | FFMPEG MAGIC | (closure) <----- Push the callback into an ffmpeg callback | | | | | v | FFmpegDemuxer::FFmpegAfterSeekCallback | (closure) <----- FFmpeg has moved it's file cursor back to | wherever the seek point was, and is now | reading the interleaved data from all | streams. The state set in | SeekAnyEnabledVideoFrame lets us keep track | of which of these frames are actually | worth re-rendering; we drop the audio, play | the video, and since in-band text isn't | displayed, we just ignore it and let it | go out of sync. | At this point, the closure is also called | and the pipeline is free do whatever. ---------| Bug: 663999 Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel Change-Id: I30897e3f7daddd2a818af47475e20f049665236d Reviewed-on: https://chromium-review.googlesource.com/1132678 Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#585553} [modify] https://crrev.com/d5a6baab5a827dd0d3a87ce445adf4dc30f8fce2/media/filters/ffmpeg_demuxer.cc [modify] https://crrev.com/d5a6baab5a827dd0d3a87ce445adf4dc30f8fce2/media/filters/ffmpeg_demuxer.h [modify] https://crrev.com/d5a6baab5a827dd0d3a87ce445adf4dc30f8fce2/media/filters/ffmpeg_demuxer_unittest.cc
,
Oct 2
I'm putting together some statistics for how the experiment has affected playback: Battery drain on chromeos has a noticeable improvement: https://uma.googleplex.com/variations?sid=27e68b5e0ce31dc0128d44227553765e MTBR and Pipeline Status both look good/unchanged: https://uma.googleplex.com/variations?sid=c14ba6f7204cbcf412cbde678af816e6 TimeToFirstFrame shows a ~15% regression: https://uma.googleplex.com/variations?sid=7084bb97b4bb1ad9fb7979a7b6288a29
,
Jan 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9a041b9f3c8b8a530d77e6a53b56bca3db3186b2 commit 9a041b9f3c8b8a530d77e6a53b56bca3db3186b2 Author: Ted Meyer <tmathmeyer@chromium.org> Date: Fri Jan 11 21:32:58 2019 Enable src= background track switching by default Bug: 663999 Change-Id: Ib83d981bbb6cefa3de9f3af0ea50c2a99b8d6876 Reviewed-on: https://chromium-review.googlesource.com/c/1406149 Reviewed-by: Dale Curtis <dalecurtis@chromium.org> Commit-Queue: Ted Meyer <tmathmeyer@chromium.org> Cr-Commit-Position: refs/heads/master@{#622157} [modify] https://crrev.com/9a041b9f3c8b8a530d77e6a53b56bca3db3186b2/media/base/media_switches.cc
,
Jan 14
|
||||||||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||||||||
Comment 1 by bugdroid1@chromium.org
, Nov 23 2016