Live muted video in inactive tab is getting paused
Reported by
evo...@gmail.com,
Oct 31 2017
|
||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36 Example URL: https://www.twitch.tv/ Steps to reproduce the problem: 1. Open some live stream on twitch 2. Mute video and go to other tab 3. After some time switch back to twitch tab What is the expected behavior? The live video is not delayed What went wrong? The live video is way behind the actual time Did this work before? Yes 62.0.3202.75 (last stable version) Is it a problem with Flash or HTML5? HTML5 Does this work in other browsers? Yes Chrome version: 64.0.3254.0 (Official Build) canary (64-bit) (cohort: Clang-64) Channel: canary OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Contents of chrome://gpu: Note: To properly save this page, select the "Webpage, Complete" option in the Save File dialog. Graphics Feature Status Canvas: Hardware accelerated CheckerImaging: Disabled Flash: Hardware accelerated Flash Stage3D: Hardware accelerated Flash Stage3D Baseline profile: Hardware accelerated Compositing: Hardware accelerated Multiple Raster Threads: Enabled Native GpuMemoryBuffers: Software only. Hardware acceleration disabled Rasterization: Software only, hardware acceleration unavailable Video Decode: Hardware accelerated Video Encode: Hardware accelerated WebGL: Hardware accelerated WebGL2: Hardware accelerated Driver Bug Workarounds clear_uniforms_before_first_program_use decode_encode_srgb_for_generatemipmap disable_accelerated_vpx_decode disable_direct_composition disable_discard_framebuffer disable_dxgi_zero_copy_video disable_framebuffer_cmaa disable_nv12_dxgi_video exit_on_context_lost force_cube_complete scalarize_vec_and_mat_constructor_args texsubimage_faster_than_teximage Problems Detected GPU rasterization should only be enabled on NVIDIA and Intel DX11+, and AMD RX-R2 GPUs for now.: 643850 Disabled Features: gpu_rasterization Some drivers are unable to reset the D3D device in the GPU process sandbox Applied Workarounds: exit_on_context_lost TexSubImage is faster for full uploads on ANGLE Applied Workarounds: texsubimage_faster_than_teximage Clear uniforms before first program use on all platforms: 124764, 349137 Applied Workarounds: clear_uniforms_before_first_program_use Always rewrite vec/mat constructors to be consistent: 398694 Applied Workarounds: scalarize_vec_and_mat_constructor_args ANGLE crash on glReadPixels from incomplete cube map texture: 518889 Applied Workarounds: force_cube_complete Framebuffer discarding can hurt performance on non-tilers: 570897 Applied Workarounds: disable_discard_framebuffer Direct composition flashes black initially on Win <10: 588588 Applied Workarounds: disable_direct_composition Zero copy DXGI video hangs on shutdown on Win < 8.1: 621190 Applied Workarounds: disable_dxgi_zero_copy_video Use GL_INTEL_framebuffer_CMAA on ChromeOS: 535198 Applied Workarounds: disable_framebuffer_cmaa Disable KHR_blend_equation_advanced until cc shaders are updated: 661715 Applied Workarounds: disable(GL_KHR_blend_equation_advanced), disable(GL_KHR_blend_equation_advanced_coherent) Decode and Encode before generateMipmap for srgb format textures on Windows: 634519 Applied Workarounds: decode_encode_srgb_for_generatemipmap Zero-copy DXGI video hangs or displays incorrect colors on AMD drivers: 623029 Applied Workarounds: disable_dxgi_zero_copy_video NV12 DXGI video displays incorrect colors on older AMD drivers: 644293 Applied Workarounds: disable_nv12_dxgi_video VPx decoding isn't supported well before Windows 10 creators update.: 616318, 667532 Applied Workarounds: disable_accelerated_vpx_decode Native GpuMemoryBuffers have been disabled, either via about:flags or command line. Disabled Features: native_gpu_memory_buffers Checker-imaging has been disabled via finch trial or the command line. Disabled Features: checker_imaging Version Information Data exported 10/31/2017, 9:13:40 AM Chrome version Chrome/64.0.3254.0 Operating system Windows NT 6.1.7601 SP1 Software rendering list URL https://chromium.googlesource.com/chromium/src/+/3283564498d2ffcd4fea36d656fb6fda51e6581a/gpu/config/software_rendering_list.json Driver bug list URL https://chromium.googlesource.com/chromium/src/+/3283564498d2ffcd4fea36d656fb6fda51e6581a/gpu/config/gpu_driver_bug_list.json ANGLE commit id 163965d5ce2b 2D graphics backend Skia/64 45d6303f6e8403db9499ab28494f672b2bcd034e- Command Line "C:\Users\Administrator\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --flag-switches-begin --flag-switches-end Driver Information Initialization time 23 In-process GPU false Passthrough Command Decoder true Supports overlays false Sandboxed false GPU0 VENDOR = 0x1002, DEVICE= 0x6739 Optimus false Optimus false AMD switchable false Desktop compositing Aero Glass Diagonal Monitor Size of \\.\DISPLAY1 22.0" Driver vendor Advanced Micro Devices, Inc. Driver version 15.200.1062.1004 Driver date 8-3-2015 Pixel shader version 5.0 Vertex shader version 5.0 Max. MSAA samples 8 Machine model name Machine model version GL_VENDOR Google Inc. GL_RENDERER ANGLE (AMD Radeon HD 6800 Series Direct3D11 vs_5_0 ps_5_0) GL_VERSION OpenGL ES 3.0 (ANGLE 2.1.0.163965d5ce2b) GL_EXTENSIONS GL_ANGLE_client_arrays GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_multiview GL_ANGLE_pack_reverse_row_order GL_ANGLE_program_cache_control GL_ANGLE_request_extension GL_ANGLE_robust_client_memory GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_CHROMIUM_bind_generates_resource GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_color_buffer_float_rgb GL_CHROMIUM_color_buffer_float_rgba GL_CHROMIUM_copy_compressed_texture GL_CHROMIUM_copy_texture GL_CHROMIUM_sync_query GL_EXT_blend_minmax GL_EXT_color_buffer_float GL_EXT_color_buffer_half_float GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_disjoint_timer_query GL_EXT_draw_buffers GL_EXT_frag_depth GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_read_format_bgra GL_EXT_robustness GL_EXT_sRGB GL_EXT_shader_texture_lod GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_s3tc_srgb GL_EXT_texture_filter_anisotropic GL_EXT_texture_format_BGRA8888 GL_EXT_texture_norm16 GL_EXT_texture_rg GL_EXT_texture_storage GL_EXT_unpack_subimage GL_KHR_debug GL_NV_EGL_stream_consumer_external GL_NV_fence GL_NV_pack_subimage GL_NV_pixel_buffer_object GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth32 GL_OES_element_index_uint GL_OES_get_program_binary GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_surfaceless_context GL_OES_texture_float GL_OES_texture_float_linear GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_npot GL_OES_vertex_array_object Disabled Extensions GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent Window system binding vendor Google Inc. (adapter LUID: 0000000000009fd5) Window system binding version 1.4 (ANGLE 2.1.0.163965d5ce2b) Window system binding extensions EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_d3d_texture_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_create_context_webgl_compatibility EGL_CHROMIUM_create_context_bind_generates_resource EGL_EXT_pixel_format_float EGL_KHR_surfaceless_context EGL_ANGLE_display_texture_share_group EGL_ANGLE_create_context_client_arrays EGL_ANGLE_program_cache_control EGL_ANGLE_robust_resource_initialization Direct rendering Yes Reset notification strategy 0x8252 GPU process crash count 0 Compositor Information Tile Update Mode One-copy Partial Raster Enabled GpuMemoryBuffers Status ATC Software only ATCIA Software only DXT1 Software only DXT5 Software only ETC1 Software only R_8 Software only R_16 Software only RG_88 Software only BGR_565 Software only RGBA_4444 Software only RGBX_8888 GPU_READ, SCANOUT RGBA_8888 GPU_READ, SCANOUT BGRX_8888 Software only BGRX_1010102 Software only BGRA_8888 Software only RGBA_F16 Software only YVU_420 Software only YUV_420_BIPLANAR Software only UYVY_422 Software only Display(s) Information Info Display[2528732444] bounds=0,0 1680x1050, workarea=0,0 1680x1020, scale=1, external Color space information {primaries:BT709, transfer:IEC61966_2_1, matrix:RGB, range:FULL, icc_profile_id:0} Bits per color component 8 Bits per pixel 24 Diagnostics 0 b3DAccelerationEnabled true b3DAccelerationExists true bAGPEnabled true bAGPExistenceValid true bAGPExists true bCanRenderWindow true bDDAccelerationEnabled true bDriverBeta false bDriverDebug false bDriverSigned false bDriverSignedValid false bNoHardware false dwBpp 32 dwDDIVersion 11 dwHeight 1050 dwRefreshRate 60 dwWHQLLevel 0 dwWidth 1680 iAdapter 0 lDriverSize 1445224 lMiniVddSize 0 szAGPStatusEnglish Enabled szAGPStatusLocalized Enabled szChipType AMD Radeon Graphics Processor (0x6739) szD3DStatusEnglish Enabled szD3DStatusLocalized Enabled szDACType Internal DAC(400MHz) szDDIVersionEnglish 11 szDDIVersionLocalized 11 szDDStatusEnglish Enabled szDDStatusLocalized Enabled szDXVAHDEnglish Not Supported szDXVAModes ModeMPEG2_A ModeMPEG2_C szDescription AMD Radeon HD 6800 Series szDeviceId 0x6739 szDeviceIdentifier {D7B71EE2-2479-11CF-AE72-0A04BEC2C535} szDeviceName \\.\DISPLAY1 szDisplayMemoryEnglish 754 MB szDisplayMemoryLocalized 754 MB szDisplayModeEnglish 1680 x 1050 (32 bit) (60Hz) szDisplayModeLocalized 1680 x 1050 (32 bit) (60Hz) szDriverAssemblyVersion 15.200.1062.1004 szDriverAttributes Final Retail szDriverDateEnglish 8/4/2015 08:28:34 szDriverDateLocalized 04.08.2015 8:28:34 szDriverLanguageEnglish English szDriverLanguageLocalized English szDriverModelEnglish WDDM 1.1 szDriverModelLocalized WDDM 1.1 szDriverName aticfx64.dll,aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,aticfx32,atiumd64.dll,atidxx64.dll,atidxx64.dll,atiumdag,atidxx32,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll szDriverNodeStrongName oem14.inf:ATI.Mfg.NTamd64.6.1:ati2mtag_NI:15.200.1062.1004:pci\ven_1002&dev_6739 szDriverSignDate szDriverVersion 8.17.0010.1404 szKeyDeviceID Enum\PCI\VEN_1002&DEV_6739&SUBSYS_24001462&REV_00 szKeyDeviceKey \Registry\Machine\System\CurrentControlSet\Control\Video\{9042A132-C4BE-4B30-8779-A8885E8DF4AF}\0000 szManufacturer Advanced Micro Devices, Inc. szMiniVdd n/a szMiniVddDateEnglish n/a szMiniVddDateLocalized n/a szMonitorMaxRes szMonitorName Generic PnP Monitor szNotesEnglish No problems found. szNotesLocalized No problems found. szOverlayEnglish Not Supported szRankOfInstalledDriver 00E62001 szRegHelpText szRevision szRevisionId 0x0000 szSubSysId 0x24001462 szTestResultD3D7English Not run szTestResultD3D7Localized Not run szTestResultD3D8English Not run szTestResultD3D8Localized Not run szTestResultD3D9English Not run szTestResultD3D9Localized Not run szTestResultDDEnglish Not run szTestResultDDLocalized Not run szVdd n/a szVendorId 0x1002 Log Messages GpuProcessHostUIShim: The GPU process exited normally. Everything is okay.
,
Oct 31 2017
Since no audio is being played and the tab is in the background it's given a low priority; which on your system seems to be insufficient for maintaining the live edge. In this case we'll pause and buffer as necessary to try and keep our audio buffer filled. Over time this leads to falling further and further behind the live edge. I feel this is working as intended / a minor issue, but resolving issue 764133 in a way that keeps a clock running instead of pausing for no selected tracks would make the experience here better. +mlamouri, johnpallett since this has some UX implications.
,
Oct 31 2017
(Thanks for the great bug report with media-internals included!)
,
Oct 31 2017
Thanks for your reply. But when I watch live stream I suppose video is always in actual state without any delay when I didn't pause it myself. So when I switching back to it I want to see it in the same actual state as other people (and chat) see it. It was working as intended in latest stable version, skipping video track and lowering CPU usage because of that. And it was working fine. But in current beta/canary Chrome is pausing muted live stream so watching several live streams in different tabs is nearly impossible. I hope it will be fixed before next stable release.
,
Oct 31 2017
The log you provide don't indicate that there's any real pausing; only pausing for when the audio decoder runs out of buffers. This is something that can happen even if you had the tab in the foreground and the machine becomes overloaded or the page does something too expensive on the main thread. Are you seeing any cases where the stream is completely paused and requires you to play it again when you return?
,
Oct 31 2017
I tested both versions and both have kind of similar CPU load when twitch live stream is playing in the background. Also the live stream is delayed exactly for the time the tab was inactive minus ~5 sec. So when tab was inactive for 1 min, twitch live stream was delayed for ~55 sec. And if tab was inactive for 2 mins, live video was behind for ~115 sec. So seems like it's not because some random CPU overloads are causing this pauses, live video is just paused totally in background muted tab in latest beta/canary. Youtube live streams behave the same, but it's not so frustrating there because at least youtube have "live" indicator with ability to seek forward to the actual time.
,
Oct 31 2017
Hmm, something weird is happening there. There is repeated play/pause without any buffering events in between... Will see where those events are coming from.
,
Oct 31 2017
Twitch seems to have a bunch of issues with muted background streams. Because there's no active audio it does not get enough CPU time to run effectively; we thus underflow the audio renderer and by the time we are about to come out of it Twitch invokes a seek to try and catch back up to the live head. I'm not sure how to reconcile this behavior with your report evolgr@, every time my playback falls behind the live head Twitch starts issuing seeks to catch back up. Are you using any extensions which might effect this?
,
Oct 31 2017
Actually I just noticed that you said this is occurring on canary and not stable; which has all the code I've been investigating. Do you see this on Chrome Beta (63)? Can you paste the contents of the variations field in chrome://version/ ?
,
Nov 1 2017
Finally you have read my report :) I had beta version which was using user data from regular Chrome. I removed it yesterday and installed regular Chrome as it was impossible to watch live streams in that beta. Now after I installed current beta I see it's using separate user data storage and seems like I got other variations in it. That's good, it will be easier to test stable/beta versions now (without reinstalling). In current beta original bug happens not so often, but still after few tries I can reproduce it. Also in current beta live stream sometimes is not resumed at all (another bug). So at the moment I have beta and canary versions which have this bug, but it happens more often in canary. My current beta version with original bug and not-resuming-at-all-bug: Google Chrome 63.0.3239.18 (Official Build) beta (64-bit) (cohort: Beta) Revision 975787a36cf8dbe16eaf42134aaee20fe9504ba2-refs/branch-heads/3239@{#188} OS Windows JavaScript V8 6.3.292.15 Flash 24.0.0.189 internal-not-yet-present User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.18 Safari/537.36 Command Line "C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe" --flag-switches-begin --flag-switches-end Executable Path C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe Profile Path C:\Users\Administrator\AppData\Local\Google\Chrome Beta\User Data\Default Variations c134752e-b8b72c88 1e528f0f-f23d1dea 38eb801c-3f4a17df 7c1bc906-f55a7974 47e5d3db-3d47f4f4 1210a805-ecd831c 776de70c-e0278d3d 79616653-f23d1dea 9e201a2b-38d7ffb9 b21cf1cf-803f8fc4 68812885-4d2fac87 5e3a236d-59e286d0 f347910c-3d47f4f4 9773d3bd-f23d1dea 99144bc3-dc4a3f77 9e5c75f1-1ece8db1 f79cb77b-3f4a17df d92562a9-ca7d8d80 447469ba-13d9f35f 7aa46da5-c946b150 25fc488a-3f4a17df 1bced4a3-d61b43f8 ad6d27cc-15e2aa9a b2f0086-93053e47 ef25c1eb-f23d1dea 4bc337ce-77afc4fd 1354da85-f34af386 3ac60855-486e2a9c f296190c-45641d72 4442aae2-6e597ede ed1d377-e1cc0f14 75f0f0a0-a5822863 e2b18481-bca011b3 e7e71889-e1cc0f14 94e68624-803f8fc4 f141d4bc-f23d1dea da4aaa01-3f4a17df Compiler MSVC 2017 (PGO) My canary version with original bug only: Google Chrome 64.0.3254.1 (Official Build) canary SyzyASan (32-bit) (cohort: ASAN) Revision 547684c177a5db734e35d3a6e258b1e51da7fbdf-refs/branch-heads/3254@{#1} OS Windows JavaScript V8 6.4.168 Flash 24.0.0.189 internal-not-yet-present User Agent Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3254.1 Safari/537.36 Command Line "C:\Users\Administrator\AppData\Local\Google\Chrome SxS\Application\chrome.exe" --flag-switches-begin --flag-switches-end Executable Path C:\Users\Administrator\AppData\Local\Google\Chrome SxS\Application\chrome.exe Profile Path C:\Users\Administrator\AppData\Local\Google\Chrome SxS\User Data\Default Variations c134752e-f23d1dea da89714-5e283afd 1e528f0f-3b7f37f3 b130ecb8-1410f10 6025934e-3f4a17df 7c1bc906-b5809d46 47e5d3db-3d47f4f4 1210a805-ecd831c 41e765a5-3f4a17df 776de70c-e0278d3d 34d450b1-f23d1dea 79616653-3f4a17df 19c1fdaf-3d47f4f4 f9884634-a3b30566 3042ad4b-ca7d8d80 9e201a2b-38d7ffb9 591576c8-ace4e138 44c96c7b-92bf7ff7 57f575bb-f23d1dea 2e5ffa4b-3f4a17df e4e9ce8f-3f4a17df b72f69e9-3f4a17df 4b61504a-a8ff754b 5485fc4d-ca7d8d80 9773d3bd-7c7ea110 8fa604e0-dac4d430 99144bc3-c3f822de 9e5c75f1-77b2f434 f79cb77b-3f4a17df 47edb3-566ebc9b 4ea303a6-2108e188 d92562a9-ca7d8d80 447469ba-13d9f35f 7aa46da5-c946b150 2b33233e-62e2c3f0 25fc488a-f23d1dea 1aecb842-f23d1dea ad6d27cc-7075cd8 757a5d98-f23d1dea f3ea30a0-84708353 23496387-4ea78229 796ee5fe-f23d1dea b2f0086-3f907e47 ef25c1eb-3f4a17df 4bc337ce-77afc4fd 3ac60855-486e2a9c f296190c-6e3b1976 4442aae2-e1cc0f14 ed1d377-e1cc0f14 75f0f0a0-d7f6b13c e2b18481-d7f6b13c e7e71889-e1cc0f14 f5fff3a2-3f4a17df f141d4bc-f23d1dea e9ce63c1-5bda69fd 9cade933-fbb4ab19 da4aaa01-3f4a17df Compiler MSVC 2017
,
Nov 1 2017
Can you try with --disable-features=BackgroundVideoTrackOptimization and then with --disable-features=BackgroundVideoPauseOptimization to see if either has any effect on M63? To be clear the original bug is when playback resumes but it's far behind the live edge?
,
Nov 2 2017
Right, the original bug is when playback resumes but it's far behind the live edge. Tested next on updated beta version "63.0.3239.30 (Official Build) beta (64-bit) (cohort: Beta)": With "--disable-features=BackgroundVideoTrackOptimization" flag result is the same: playback resumes but it's far behind the live edge. With command line (because I can't find the flag) '"C:\Program Files (x86)\Google\Chrome Beta\Application\chrome.exe" --disable-features=BackgroundVideoPauseOptimization --flag-switches-begin --flag-switches-end' result is still the same: playback resumes but it's far behind the live edge. With both result is still the same: playback resumes but it's far behind the live edge. Maybe if this switches didn't make any difference this could mean it's not related to media/video/audio part but instead related to some increased background JS optimizations?
,
Nov 2 2017
Hmm, yes this is strange. Can you try disabling hardware video decode in chrome://flags and see if that changes anything?
,
Nov 2 2017
Tried in beta and result is still the same: playback resumes but it's far behind the live edge.
,
Nov 2 2017
Are you using any extensions in your beta profile? I'm not able to reproduce the same behavior as you with M63 beta. I just get constant seeking to live edge in the background.
,
Nov 2 2017
From logging locally it looks like muted streams don't get enough JS time to buffer enough audio. [1:27:1102/135101.417747:ERROR:renderer_impl.cc(801)] OnBufferingStateChange audio BUFFERING_HAVE_NOTHING -> BUFFERING_HAVE_ENOUGH [1:27:1102/135101.417829:ERROR:renderer_impl.cc(914)] StartPlayback [1:27:1102/135101.417903:ERROR:audio_renderer_impl.cc(114)] StartTicking [1:27:1102/135101.417972:ERROR:audio_renderer_impl.cc(132)] StartRendering_Locked [1:1:1102/135101.420699:ERROR:webmediaplayer_impl.cc(1308)] OnPipelineSeeked [1:1:1102/135101.421092:ERROR:webmediaplayer_impl.cc(1588)] OnBufferingStateChange(1) 34.6438 s [1:1:1102/135101.421262:ERROR:webmediaplayer_impl.cc(946)] Buffered ranges #0, [0 s, 34.6987 s] [1:30:1102/135103.812098:ERROR:audio_renderer_impl.cc(1103)] SetBufferingState_Locked : 1 -> 0 [1:27:1102/135103.812423:ERROR:renderer_impl.cc(801)] OnBufferingStateChange audio BUFFERING_HAVE_ENOUGH -> BUFFERING_HAVE_NOTHING [1:27:1102/135103.812604:ERROR:renderer_impl.cc(879)] PausePlayback [1:27:1102/135103.812685:ERROR:audio_renderer_impl.cc(146)] StopTicking [1:1:1102/135103.812846:ERROR:webmediaplayer_impl.cc(1588)] OnBufferingStateChange(0) 36.9817 s [1:1:1102/135103.812972:ERROR:webmediaplayer_impl.cc(946)] Buffered ranges #0, [0 s, 34.8317 s] I'm still unable to reproduce the lag from the live edge, but I did figure out the never resumes issue and filed that as issue 781010 , which I'll land a fix to M63 for.
,
Nov 2 2017
Sometimes I can't reproduce the bug too, in this case restarting Chrome helps. Recorded next screencast with 2nd try (on first try video resume worked just fine). I added CPU load graph so you could see there is not 100% CPU load. Also CPU load without recording would be much less, so please ignore slightly higher values.
,
Nov 2 2017
Thanks for the video, that helped a lot. I didn't realize you were specifically referring to the "latency to broadcaster" bit. The root cause here seems to be us throttling background no-audio renderers so significantly in M63 that they underflow repeatedly and cause Twitch to start buffering more data to avoid the underflow. +Scheduling folks to see if they've changed throttling for renderers in M63 from M62. I'll forward this thread to our Twitch contacts to see if they can make some changes to their code to improve this. Triggering a pause from the pause-button on the player seems to correctly jump you back to live edge after pressing play again, but if we internally pause and then play on the page becoming visible again you still get the long delay. I don't think there's anything we can do on our end besides throttle less, but Chrome is under a lot of pressure to not waste resources in background tabs like this. So I think we'll need Twitch to do something on their side when they detect page visible changes here.
,
Nov 2 2017
Please note that this is not only the Twitch problem, the same happens with Youtube live streams too. I didn't test Youtube lately though.
,
Nov 2 2017
+strobe for the YouTube side of things. See video in c#17 for the problem description on Twitch and c#6 for the description on YouTube.
,
Nov 2 2017
If it's can't be fixed and this is the only way Chrome can go then it would be nice to have a flag to disable this unneeded hardcore throttling on desktops.
,
Nov 2 2017
Try flipping #expensive-background-timer-throttling in chrome://flags to see if that helps.
,
Nov 2 2017
Hmm, none of the throttling/background interventions seem to do anything to make this better, so not sure which one it is. +altimin in case he has ideas.
,
Nov 2 2017
I don't think we made any changes to throttling between M62 and M63. You could try using --disabled-background-timer-throttling to see if it makes anything any better. Traces could be useful too (with renderer.scheduler and disabled-by-default-renderer.scheduler categories).
,
Nov 3 2017
Command line option "--disabled-background-timer-throttling" didn't help. Tried to do tracing on current beta with URL chrome://tracing/ with next steps: 1) started twitch live stream and turned on video stats 2) switched to tracing tab and started recording with options like on the attached files "tracing1.png" and "tracing2.png" 3) switched to twitch tab, muted playing video 4) switched to chrome://media-internals/ tab and waited for "suspicious" messages 5) switched back to twitch tab and noticed stats show that playback resumed but it's behind the live edge 6) switched to tracing tab and stopped recording (buffer usage was at 50%), got error like on the attached "error.png" file, seems to be the same error when you try to load saved trace 7) saved trace as "trace_trace.json.gz" with "Save" button Please let me know if I should record trace in different way to avoid error message on trace open.
,
Nov 7 2017
Canary, 64.0.3261.0 should fix the issues where the stream never resumes. Let me know if you can still reproduce that issue. I'll merge that back to M63 shortly. Still unable to figure out what has changed in terms of scheduling time though.
,
Nov 7 2017
+brucedawson for the issue in c#25, not sure why tracing is complaining in EtwImporter.
,
Nov 8 2017
I haven't actually worked on this aspect of ETW and chrome tracing. The area I worked on was Chrome emitting ETW events (to be recorded externally), and this is Chrome recording ETW events (to be recorded in a chrome trace). My understanding, from looking at third_party\catapult\tracing\tracing\extras\importer\etw\etw_importer.html, is that the ETW events are recorded when System Tracing is enabled and when Chrome is elevated. System Tracing seems to default to being checked, but does nothing (that I can tell) when Chrome is not elevated. Or, at least, this bug is avoided. I was able to reproduce a similar failure in Chrome canary by running it elevated and recording a trace. So, to avoid the problem one should either not run Chrome elevated (always a wise idea anyway) or uncheck System tracing, or both. I'll file a catapult bug.
,
Nov 8 2017
If it helps, here is tracing without "System Tracing" checked in canary "64.0.3262.0 (Official Build) canary (64-bit) (cohort: Clang-64)".
,
Nov 8 2017
Thanks for the trace, altimin@ can you take a look? The render thread seems to be only waking up every ~2 seconds. Is that expected for a background tab these days?
,
Nov 8 2017
evolgr@ are you able to confirm that on canary you don't see permanent pauses on Twitch anymore? I'd like to get external confirmation before I merge to M63 for issue 781010
,
Nov 8 2017
Re #30: Could you also include toplevel categories into the trace — it is need to identify tasks (disabled-by-default-renderer.scheduler.debug can be useful, but it might be too verbose)? Re #31: It looks to me that the timers are running once a second, which is expected in a background tab without audio. I need toplevel category to understand what's going on.
,
Nov 8 2017
dalecurtis@ tried 5 times to reproduce that bug and wasn't able to do it. Seems like issue 781010 is fixed now. Good job! altimin@ attaching similar trace with "toplevel" and "disabled-by-default-toplevel.flow" categories added.
,
Nov 8 2017
altimin@ and previous trace + "disabled-by-default-renderer.scheduler.debug". Also here is the link to the similar trace in stable version with no bug (if it helps): https://mega.nz/#!eZdx1KZa!4xhQUcARt_zWz5Io1vDngn06O4wjvzq1Vx4Ego8vJ84
,
Dec 10 2017
Looks like this bug is now in stable version 63.0.3239.84 (Official Build) (64-bit) (cohort: 63_win_84).
,
Dec 10 2017
Also this bug is happening not only with manually muted video. It also happens with normal video when it's playing in background and then audio in it got quiet enough for Chrome to think there is nothing playing in that tab anymore. So when you see speaker icon disappeared from background tab, there is a good chance live video became paused in that tab, so you will not hear it anymore until you switch back to that tab.
,
Dec 11 2017
This definitely sounds like the scheduler deprioritizing more than it should. altimin@ did you ever look over the traces provided above?
,
Dec 11 2017
Sorry, I assumed that this bug is fixed per #34. :( --disable-background-timer-throttling not having an effect suggests that it's not scheduler throttling. If dalecurtis@ thinks that it's scheduler, could you double-check that this bug is reproducible with this flag? If it is reproducible, that means that it's not scheduler. The page is backgrounded without audio, so timers on this page are throttled. However, there is only a handful of them and all other tasks are running without restrictions.
,
Dec 11 2017
Running Chrome with "--disable-background-timer-throttling" fixes the issue (tested few times in Stable and Canary version).
,
Dec 11 2017
That's interesting, thanks. So that it is a scheduling issue indeed, I'll take a closer look at traces to understand what's going wrong.
,
Dec 12 2017
I believe that I have a working theory - AsyncMethodRunner at the moment uses default timer queue and gets throttled. I'm not 100% sure, but I'll fix it first and we'll see if it makes any difference on Canary.
,
Dec 15 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0755c943610259ed719e3759428970e282dc79c9 commit 0755c943610259ed719e3759428970e282dc79c9 Author: Alexander Timin <altimin@chromium.org> Date: Fri Dec 15 02:15:57 2017 [blink] Use per-frame task runner in AsyncMethodRunner Posting async tasks to the default timer queue can lead to media tasks being throttled, which may lead to videos being stopped in background. R=haraken@chromium.org,hajimehoshi@chromium.org BUG= 779962 , 786332 Change-Id: Ic50890f909ed824a9d8048d5ef5af590b3cd086b Reviewed-on: https://chromium-review.googlesource.com/822931 Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Alexander Timin <altimin@chromium.org> Cr-Commit-Position: refs/heads/master@{#524292} [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/core/css/FontFaceSet.h [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/mediastream/MediaDevices.h [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/notifications/Notification.cpp [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/platform/AsyncMethodRunner.h [modify] https://crrev.com/0755c943610259ed719e3759428970e282dc79c9/third_party/WebKit/Source/platform/Timer.cpp
,
Dec 16 2017
Tested in Canary "65.0.3296.0 (Official Build) canary (64-bit) (cohort: Clang-64) 7c13674631f0a3ae331faceb6df9168afacf155d-refs/heads/master@{#524554}": seems like the issue is fixed now. Thanks!
,
Dec 18 2017
Looping M-63 release owners for confirmation if this needs to be merged back to M-63 as well.
,
Dec 18 2017
We're not planning any further M63 releases. Pls target fix for M64 and request a merge.
,
Dec 19 2017
,
Dec 19 2017
This bug requires manual review: M64 has already been promoted to the beta branch, so this requires manual review Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 19 2017
What's the impact of not including in M64? Is this a confirmed regression?
,
Dec 19 2017
Yes, this is a confirmed regression. The impact is that twitch (and maybe some other media websites) may be paused when the page is in background.
,
Dec 20 2017
Approving merge to M64 Chrome OS.
,
Jan 2 2018
altimin@, reminder to please merge CL to M64 branch 3282.
,
Jan 3 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c0fdddca6a341d664241c1563e0f4d5c61c5dc95 commit c0fdddca6a341d664241c1563e0f4d5c61c5dc95 Author: Alexander Timin <altimin@chromium.org> Date: Wed Jan 03 15:41:55 2018 [blink] Use per-frame task runner in AsyncMethodRunner Posting async tasks to the default timer queue can lead to media tasks being throttled, which may lead to videos being stopped in background. R=hajimehoshi@chromium.org, haraken@chromium.org TBR=altimin@chromium.org BUG= 779962 , 786332 (cherry picked from commit f841a10836c67904024381b00419de87cb406423) Change-Id: Ic50890f909ed824a9d8048d5ef5af590b3cd086b Reviewed-on: https://chromium-review.googlesource.com/822931 Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Alexander Timin <altimin@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#524292} Reviewed-on: https://chromium-review.googlesource.com/849003 Reviewed-by: Alexander Timin <altimin@chromium.org> Cr-Commit-Position: refs/branch-heads/3282@{#397} Cr-Branched-From: 5fdc0fab22ce7efd32532ee989b223fa12f8171e-refs/heads/master@{#520840} [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/core/css/FontFaceSet.h [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/gamepad/NavigatorGamepad.cpp [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/mediastream/MediaDevices.cpp [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/mediastream/MediaDevices.h [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/notifications/Notification.cpp [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/platform/AsyncMethodRunner.h [modify] https://crrev.com/c0fdddca6a341d664241c1563e0f4d5c61c5dc95/third_party/WebKit/Source/platform/Timer.cpp
,
Jan 3 2018
Thanks for the reminder! |
||||||||||||||||
►
Sign in to add a comment |
||||||||||||||||
Comment 1 by evo...@gmail.com
, Oct 31 201760.0 KB
60.0 KB View Download
76.9 KB
76.9 KB View Download