New issue
Advanced search Search tips

Issue 713540 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Playback Stalls on playing certain content using MSE API

Reported by architag...@gmail.com, Apr 20 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36

Example URL:
http://de9b7h88wgj5l.cloudfront.net/static/arcagraw/PlaybackStall.html

Steps to reproduce the problem:
1. Open the HTML given in the link.

What is the expected behavior?
I am attaching two mp4 and then clearing the buffer and adding two higher quality mp4 for the same data. The browser should complete the playback after all the data is buffered.

What went wrong?
The browser remains stalled even after all the data is appeneded. The buffered range shows 0-12.223 and the current time of video tag remains at 9.83.

Did this work before? No 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? Yes

Chrome version: 57.0.2987.133  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 25.0 r0

Contents of chrome://gpu: 
Graphics Feature Status
Canvas: Hardware accelerated
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
VPx Video Decode: Software only, hardware acceleration unavailable
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
clear_uniforms_before_first_program_use
decode_encode_srgb_for_generatemipmap
disable_direct_composition
disable_discard_framebuffer
disable_dxgi_zero_copy_video
disable_framebuffer_cmaa
exit_on_context_lost
force_cube_complete
scalarize_vec_and_mat_constructor_args
texsubimage_faster_than_teximage
Problems Detected
VPx decoding isn't supported before Windows 10 anniversary update.: 616318
Disabled Features: accelerated_vpx_decode
GPU rasterization should only be enabled on NVIDIA Pascal and Maxwell, Intel Broadwell+, 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
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
Zero-copy NV12 video displays incorrect colors on NVIDIA drivers.: 635319
Applied Workarounds: disable_dxgi_zero_copy_video
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Decode and Encode before generateMipmap for srgb format textures on Windows: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Native GpuMemoryBuffers have been disabled, either via about:flags or command line.
Disabled Features: native_gpu_memory_buffers
Version Information
Data exported	20/04/2017, 12:15:23
Chrome version	Chrome/57.0.2987.133
Operating system	Windows NT 6.1.7601 SP1
Software rendering list version	12.13
Driver bug list version	9.29
ANGLE commit id	c1a5d16e964a
2D graphics backend	Skia/57 ae9cc5d3588d52f4b371b55845704b25d88cf06d
Command Line Args	Files (x86)\Google\Chrome\Application\chrome.exe" --flag-switches-begin --flag-switches-end
Driver Information
Initialization time	248
In-process GPU	false
Passthrough Command Decoder	false
Sandboxed	false
GPU0	VENDOR = 0x10de, DEVICE= 0x107c
Optimus	false
AMD switchable	false
Desktop compositing	Aero Glass
Diagonal Monitor Size of \\.\DISPLAY1	21.5"
Driver vendor	NVIDIA
Driver version	9.18.13.4788
Driver date	3-13-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 (NVIDIA NVS 315 Direct3D11 vs_5_0 ps_5_0)
GL_VERSION	OpenGL ES 3.0 (ANGLE 2.1.0.c1a5d16e964a)
GL_EXTENSIONS	GL_ANGLE_depth_texture GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_lossy_etc_decode GL_ANGLE_pack_reverse_row_order 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_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_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: 000000000000bb89)
Window system binding version	1.4 (ANGLE 2.1.0.c1a5d16e964a)
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
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
RG_88	Software only
BGR_565	Software only
RGBA_4444	Software only
RGBX_8888	Software only
RGBA_8888	Software only
BGRX_8888	Software only
BGRA_8888	Software only
YVU_420	Software only
YUV_420_BIPLANAR	Software only
UYVY_422	Software only
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	1080
dwRefreshRate	60
dwWHQLLevel	0
dwWidth	1920
iAdapter	0
lDriverSize	17258024
lMiniVddSize	0
szAGPStatusEnglish	Enabled
szAGPStatusLocalized	Enabled
szChipType	NVS 315
szD3DStatusEnglish	Enabled
szD3DStatusLocalized	Enabled
szDACType	Integrated RAMDAC
szDDIVersionEnglish	11
szDDIVersionLocalized	11
szDDStatusEnglish	Enabled
szDDStatusLocalized	Enabled
szDXVAHDEnglish	Supported
szDXVAModes	ModeMPEG2_A ModeMPEG2_C ModeVC1_C ModeWMV9_C
szDescription	NVIDIA NVS 315
szDeviceId	0x107C
szDeviceIdentifier	{D7B71E3E-533C-11CF-DA61-22301CC2C435}
szDeviceName	\\.\DISPLAY1
szDisplayMemoryEnglish	4049 MB
szDisplayMemoryLocalized	4049 MB
szDisplayModeEnglish	1920 x 1080 (32 bit) (60Hz)
szDisplayModeLocalized	1920 x 1080 (32 bit) (60Hz)
szDriverAssemblyVersion	9.18.13.4788
szDriverAttributes	Final Retail
szDriverDateEnglish	3/14/2015 01:11:47
szDriverDateLocalized	3/14/2015 1:11:47 AM
szDriverLanguageEnglish	English
szDriverLanguageLocalized	English
szDriverModelEnglish	WDDM 1.1
szDriverModelLocalized	WDDM 1.1
szDriverName	nvd3dumx.dll,nvwgf2umx.dll,nvwgf2umx.dll,nvd3dum,nvwgf2um,nvwgf2um
szDriverNodeStrongName	oem117.inf:NVIDIA_SetA_Devices.NTamd64.6.1:Section098:9.18.13.4788:pci\ven_10de&dev_107c
szDriverSignDate	
szDriverVersion	9.18.0013.4788
szKeyDeviceID	Enum\PCI\VEN_10DE&DEV_107C&SUBSYS_102F10DE&REV_A1
szKeyDeviceKey	\Registry\Machine\System\CurrentControlSet\Control\Video\{2617EAF5-DE59-47AC-A5B7-91B781D88344}\0000
szManufacturer	NVIDIA
szMiniVdd	n/a
szMiniVddDateEnglish	n/a
szMiniVddDateLocalized	n/a
szMonitorMaxRes	
szMonitorName	Generic PnP Monitor
szNotesEnglish	No problems found.
szNotesLocalized	No problems found.
szOverlayEnglish	Supported
szRankOfInstalledDriver	00E02001
szRegHelpText	
szRevision	
szRevisionId	0x00A1
szSubSysId	0x102F10DE
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	0x10DE
Log Messages
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.958:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.959:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.959:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.959:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0411/185222.959:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:9988:0412/140320.711:WARNING:ipc_message_attachment_set.cc(49)] : MessageAttachmentSet destroyed with unconsumed attachments: 0/1
[12272:5700:0412/161209.507:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2910
[12272:5700:0412/161209.508:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2188
[12272:14396:0412/161253.358:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2910
[12272:14396:0412/161253.358:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2188
[12272:9152:0412/162045.793:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2910
[12272:9152:0412/162045.793:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2188
[12272:9988:0412/162045.803:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 907
[12272:9988:0412/162045.805:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 907
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 1733
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2257
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 1733
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2257
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 1733
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2257
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 1733
[12272:15104:0413/142016.236:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 2257
[12272:15104:0413/142016.237:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 1733
[12272:15104:0413/142016.237:ERROR:mf_helpers.cc(12)] : Error in dxva_video_decode_accelerator_win.cc on line 1733
[12272:9988:0417/160013.974:ERROR:gles2_cmd_decoder.cc(17287)] : [.DisplayCompositor-0C436BD0]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(9579)] : [.DisplayCompositor-0C436BD0]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(17287)] : [.DisplayCompositor-0C436BD0]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(9579)] : [.DisplayCompositor-0C436BD0]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(17287)] : [.DisplayCompositor-0C436BD0]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(9579)] : [.DisplayCompositor-0C436BD0]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(17287)] : [.DisplayCompositor-0C436BD0]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[12272:9988:0417/160013.975:ERROR:gles2_cmd_decoder.cc(9579)] : [.DisplayCompositor-0C436BD0]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
GpuProcessHostUIShim: The GPU process exited normally. Everything is okay.

Can you fix this on priority? A lot of users are having a bad experience because of this.
 
If you are not able to repro this, please allow to use cache. If assets are taking too long to load you might not repro this. 
Labels: Needs-Milestone
Cc: chcunningham@chromium.org wolenetz@chromium.org
Components: -Internals>Media Internals>Media>Source
No errors reporting in chrome://media-internals. Repro'd the first time, but subsequent times the data from 9-12 is just delayed in being appended with 	58.0.3029.81.
You can try with Cache. It's reproable 100% then
Taking a look.
I'm not able to reproduce this, but I have a theory about what may be happening for you. Before reading further, stable just updated to 58 (which I tested with), so update your chrome and see if its still happening for you.


THEORY:
Your demo doesn't check if your SourceBuffer is still updating when you make your next append, but it still works because you have a timer for 4900 msec between fetches. Maybe that 4900 msec is not always long enough to completely process an append. If this occurred it would mostly likely occur after appending 1_h.mp4 (18.8 MB!). When you grab 2_h.mp4 (immediately when cache is enabled, maximizing repro chance) and the append may fail because 1_h.mp4 is still being processed. This would explain why current time does not advance beyond 9.83 (the end of 1_h.mp4).

The one thing I cant explain with this is why you would be seeing a buffered range up to 12 seconds at the end of the demo. For my theory to hold you really should see the buffered range end around 9.83. Can you double check that this isn't the case?


NOTE:
For others attempting repro, be careful not to confuse the momentary pause at 9 seconds with a full stop. I find that the video always pauses around that time while we wait for the timer to fire to fetch the last piece of the video.



output.mp4
2.4 MB View Download
I updated the browser to 58 version. The issue has become intermittent but it is still there. Its definitely not about buffer getting updated while we do appends as I think 4900 ms is enough time to process data when the fragment was cached. Also, the buffered range was till 12.223 and Chrome should definitely not get stuck mid buffer or atleast should throw some exception if there is some issue with the stream.
You said its now intermittent... if you run it 5 times how many times does it repro?

Dale, are you still able to reproduce?
Not waiting for updateend to append the next segment is definitely a potential source of issues here. That should be fixed before dig deeper in this.
I can repro it 2 out of 5 times.
I agree not waiting for updateend to append can be an issue, but that script was written just for the sake of this bug. Our player internally use dash.js to append segments which handles all this logic. The scipt was written so that you guys could repro it consistently. And I think 4.9 seconds is enough time for browser to append the segment.
I agree, but at least log the updateend and append calls so that we can see they are truly interleaved appropriately.
Also chcunningham@ I did just repro on ChromeOS; it always seems to happen the first try, so maybe try clearing cache?
Should I update the script to wait for updateEnd and log it? Or is it fine this way as you are able to repro it?
Script should at least log append vs updateend, waiting for be best to be sure. While we can repro, it doesn't mean the issue is not the event ordering.
Okay. I will update the script and notify here.
I have updated the script to log updateend event with current timestamps. When I try with disabled cache, the issue is 100% reproducible.
I was not able to repro after 5 tries. The playback certainly has lots of starts and stops as chunks are loaded, but ultimately currentTime always ends up around 12 seconds. Dale, are you able to repro?
I should mention, I disabled cache for all repro attempts. 
I am able to repro on 58.0.3029.81, but the ordering of updateend events is suspicious when this occurs -- logs are still not accurate on the test site. The append log is printed before the append actually starts (it should be printed from within the xhr return).

Will build a local build and see if it's busted there.
Any updates on this?
dalecurtis@ could you please update the latest observations as per comment #25

Thank You...
Cc: -chcunningham@chromium.org
Owner: chcunningham@chromium.org
Status: Assigned (was: Unconfirmed)
I won't have time to look at this before heading out of office. I'll sync with Chris to understand his repro situation on Thursday.
Is there any progress on this?
Status: WontFix (was: Assigned)
I took a look at Dale's repro and its the same behavior I was seeing earlier - there is a momentary pause around 9 seconds, but the video ultimately continues past that point to reach ~12 seconds.

In the video below you can see I've added some console logging to your demo to show when files are downloaded and appended. The code is otherwise unchanged.
http://storage.googleapis.com/chcunningham-chrome-shared/jank2.html

You'll notice that the moment the video unfreezes is the same moment the last file is downloaded (network tab and logs confirm). The freeze is expected because you've previously cleared the whole buffer when you start to download the higher resolution content. 

The end of my video shows the buffered range and current time are both around 12 seconds. This is working as intended. 
Attaching video of above repro attempt with logging/network.
jank2.mp4
2.4 MB View Download
Here's my video where playback gets stalled after 9 seconds.
May 22 2017 11-15 AM.webm
5.0 MB View Download
Can you grab a copy of log table in chrome://media-internals when this occurs? chrome://media-internals will list all your active players, so close all your other tabs (except for the repro and chrome://media-internals) to make it easy to find the right one. 


Here are the logs :

Player Properties  Copy to clipboard

Property	Value
audio_buffering_state	BUFFERING_HAVE_NOTHING
audio_codec_name	aac
audio_dds	false
audio_decoder	FFmpegAudioDecoder
debug	Video rendering in low delay mode.
duration	unknown
event	PLAY
found_audio_stream	true
found_video_stream	true
pipeline_buffering_state	BUFFERING_HAVE_NOTHING
pipeline_state	kPlaying
player_id	4
render_id	5669
url	blob:http://de9b7h88wgj5l.cloudfront.net/0b37534a-59b7-40e6-b36e-8030a4ec1014
video_buffering_state	BUFFERING_HAVE_NOTHING
video_codec_name	h264
video_dds	false
video_decoder	GpuVideoDecoder
Log 
property filter

Timestamp	Property	Value
00:00:00 00	pipeline_state	kCreated
00:00:00 00	event	WEBMEDIAPLAYER_CREATED
00:00:00 00	url	blob:http://de9b7h88wgj5l.cloudfront.net/0b37534a-59b7-40e6-b36e-8030a4ec1014
00:00:00 00	pipeline_state	kStarting
00:00:00 495	found_video_stream	true
00:00:00 495	video_codec_name	h264
00:00:00 495	found_audio_stream	true
00:00:00 495	audio_codec_name	aac
00:00:00 496	audio_dds	false
00:00:00 496	audio_decoder	FFmpegAudioDecoder
00:00:00 496	debug	Video rendering in low delay mode.
00:00:00 520	video_dds	false
00:00:00 520	video_decoder	GpuVideoDecoder
00:00:00 520	pipeline_state	kPlaying
00:00:00 520	audio_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:00 583	video_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:00 583	pipeline_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:00 495	duration	unknown
00:00:01 496	event	PLAY
00:00:01 572	video_buffering_state	BUFFERING_HAVE_NOTHING
00:00:01 572	video_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:10 553	audio_buffering_state	BUFFERING_HAVE_NOTHING
00:00:10 553	pipeline_buffering_state	BUFFERING_HAVE_NOTHING
00:00:29 181	audio_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:29 181	pipeline_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:29 196	video_buffering_state	BUFFERING_HAVE_NOTHING
00:00:30 43	audio_buffering_state	BUFFERING_HAVE_NOTHING
00:00:30 43	pipeline_buffering_state	BUFFERING_HAVE_NOTHING
Any update on this? And why the ticket is in 'Won't Fix'?
Player Properties  Copy to clipboard

Property	Value
audio_buffering_state	BUFFERING_HAVE_ENOUGH
audio_codec_name	aac
audio_dds	false
audio_decoder	FFmpegAudioDecoder
debug	Video rendering in low delay mode.
duration	unknown
event	PLAY
found_audio_stream	true
found_video_stream	true
pipeline_buffering_state	BUFFERING_HAVE_NOTHING
pipeline_state	kPlaying
player_id	58
render_id	1011
url	blob:http://localhost/eeac39af-b600-4228-97a0-dfbfa815230b
video_buffering_state	BUFFERING_HAVE_NOTHING
video_codec_name	h264
video_dds	false
video_decoder	GpuVideoDecoder
Log 
property filter

Timestamp	Property	Value
00:00:00 00	pipeline_state	kCreated
00:00:00 00	event	WEBMEDIAPLAYER_CREATED
00:00:00 00	url	blob:http://localhost/eeac39af-b600-4228-97a0-dfbfa815230b
00:00:00 00	pipeline_state	kStarting
00:00:00 505	found_video_stream	true
00:00:00 506	video_codec_name	h264
00:00:00 506	found_audio_stream	true
00:00:00 506	audio_codec_name	aac
00:00:00 507	audio_dds	false
00:00:00 507	audio_decoder	FFmpegAudioDecoder
00:00:00 507	debug	Video rendering in low delay mode.
00:00:00 526	video_dds	false
00:00:00 526	video_decoder	GpuVideoDecoder
00:00:00 526	pipeline_state	kPlaying
00:00:00 527	audio_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:00 585	video_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:00 585	pipeline_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:00 506	duration	unknown
00:00:01 506	event	PLAY
00:00:01 578	video_buffering_state	BUFFERING_HAVE_NOTHING
00:00:01 578	video_buffering_state	BUFFERING_HAVE_ENOUGH
00:00:10 594	video_buffering_state	BUFFERING_HAVE_NOTHING
00:00:11 394	audio_buffering_state	BUFFERING_HAVE_NOTHING
00:00:11 394	pipeline_buffering_state	BUFFERING_HAVE_NOTHING
00:00:15 282	audio_buffering_state	BUFFERING_HAVE_ENOUGH
I have updated the script with some more logs: 
http://de9b7h88wgj5l.cloudfront.net/static/arcagraw/PlaybackStallNew.html


These are the new logs where I could repro this issue. The repro frequency has now come down to 50%. 
New logs:
PlaybackStall.html:82 Downloading 1.mp4
17:30:38.191 PlaybackStall.html:48 Appending 1.mp4 Source buffer is not updating
17:30:38.205 PlaybackStall.html:33 UpdateEnd event : Timestamp 1496232038203
17:30:38.205 PlaybackStall.html:36 Buffered Range : 0-9.877333
17:30:43.096 PlaybackStall.html:82 Downloading 2.mp4
17:30:43.102 PlaybackStall.html:48 Appending 2.mp4 Source buffer is not updating
17:30:43.103 PlaybackStall.html:33 UpdateEnd event : Timestamp 1496232043104
17:30:43.103 PlaybackStall.html:36 Buffered Range : 0-12.223432
17:30:48.003 PlaybackStall.html:79 Removing Buffer: Source buffer is not updating
17:30:48.003 PlaybackStall.html:82 Downloading 1_h.mp4
17:30:48.005 PlaybackStall.html:33 UpdateEnd event : Timestamp 1496232048005
17:30:48.053 PlaybackStall.html:48 Appending 1_h.mp4 Source buffer is not updating
17:30:48.096 PlaybackStall.html:33 UpdateEnd event : Timestamp 1496232048097
17:30:48.097 PlaybackStall.html:36 Buffered Range : 0-9.877333
17:30:52.961 PlaybackStall.html:82 Downloading 2_h.mp4
17:30:52.970 PlaybackStall.html:48 Appending 2_h.mp4 Source buffer is not updating
17:30:52.971 PlaybackStall.html:33 UpdateEnd event : Timestamp 1496232052972
17:30:52.971 PlaybackStall.html:36 Buffered Range : 0-12.223432
Sorry, these logs don't show a reason for the stall. To get more detailed logs we'd need to use a custom build. Do you have any experience compiling chromium?

WontFix is due being unable to reproduce the issue on our end. 
I have never compiled Chromium, but I can give it a try. 

Also, as per comment 3,13 and 20,  dalecur...@chromium.org is able to repro this. 
Status: Assigned (was: WontFix)
@#27 appears to indicate there's potential for a real repro, so un-marking WontFix.
@#34 please see #25 (those repros from dalecurtis@ were not real repros, just temporary pauses around 9 seconds).

You might also consider adding a currentTime logging interval function so that it's obvious from the logs when the stall(s) occur. I was unable to repro today on about 8 quick attempts on Linux Chrome 58. There is indeed a temporary stall at about 9 seconds, which lasts until 2_h append completes, then playback resumes until about 12 seconds.
Similarly unable to repro on Windows Chrome 58.
Any updates on this bug?
Without a local repro we'll need chrome debug logs from your repro. I'm having trouble getting windows builds to produce the logs I need, but while I sort that out you might begin to familiarize yourself with syncing the sources and building compiling chromium.  

Here are the build instructions for windows
https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md

Alternatively, if you have a linux machine handy (and can repro the issue on linux), you can use these linux build instructions. IMHO the linux setup is a little simpler and I'm not having any trouble getting debug logs on linux, so this may be a faster 
path if its available to you.
https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md

When following either windows/linux instructions, after instructed to run the command "gn gen out/Default", please customize the build arguments by then running the command

gn args out/Default

Once the editor appears, delete the current contents of the file and replace with the following args:

is_debug = false 
dcheck_always_on = true 
proprietary_codecs = true
ffmpeg_branding = "Chrome" 

save and exit. Then continue with build instructions to build chrome.
Hi
We will have to work on Windows for this one. Could you get the windows build produce the required logs at your end? This is leading to production issues with our customers and we are having a tough time isolate it at our end.
A quick help would be really appreciated

Thanks
Karishma
I have updated the script which makes it 100% reproducible on my machine.
http://de9b7h88wgj5l.cloudfront.net/static/arcagraw/PlaybackStallWithCache.html

You should run the script after enabling cache and it should get reproduced the second time after the segments are cached. 

Also, I compiled Chromium but the script gives error while creating Media Source buffer. MediaSource.isTypeSupported(codec) gives false for the codecs provided in the script.
The script still does not reproduce on my machine, even on the second try with everything coming from cache. 

Thanks for compiling chromium. The isTypeSupported error likely means you don't have proprietary codecs enabled. Navigate your command line to chromium "src" directory and give the command:

gn args out/Default

Once the editor appears, delete the current contents and replace with the following:

is_debug = false 
dcheck_always_on = true 
proprietary_codecs = true
ffmpeg_branding = "Chrome" 


Save, exit, and rebuild. I'm taking another look at the debug logging issue this morning. Will give an update in a bit. 
Here the issue is reproducible on both MAC and Windows systems. Ideally, the first two segments should come from cache and the remaining two without cache. You should try throttling for the last segment.

I tried with the provided arguments but it sill gave the same error.
> Ideally, the first two segments should come from cache and the remaining two without cache. You should try throttling for the last segment.

I *might* have a repro on mac following these instructions. Still digging into it. Please avoid changing the script further. 
That's a *great* news.
Cc: dalecur...@chromium.org
I do have a consistent (over 50%) repro on my mac laptop with your latest link. Looks like the problem should go away if you call mediaSource.endOfStream() after you've appended your last chunk.

The stall around 9 seconds is caused by the audio renderer getting stuck waiting for more decoded frames to queue up. Every time the audio queue underflows we increase the size required for the queue to be considered "full". The idea being, if we buffer a little more next time it should hopefully prevent another stall. 

The demo script you've provided causes 2 number of underflows (when timing is right):
1. at the point where you remove everything from the buffer before appending 1_h.mp4
2. the point where current time reaches the end of 1_h.mp4, but 2_h.mp4 has not yet been appended

When you append the final 2_h.mp4, the buffer gets some audio, but not enough to be considered "full" given the increases from these underflows. Buuuut, if you call mediaSource.endOfStream() after your last append, the queue fullness check is short circuited because the pipeline will know it can't expect anything more to be appended and should play what it has. 


--- side issue ---

+Dale.

I've attached some debug logs. One thing I notice is the queue capacity is being increased 4x instead of 2x. I think this means we're consistently hitting the path of written < requested [0] followed by written == 0 [1]. Do you want to catch this condition and not increase queue the second time?

[0] https://cs.chromium.org/chromium/src/media/renderers/audio_renderer_impl.cc?l=909
[1] https://cs.chromium.org/chromium/src/media/renderers/audio_renderer_impl.cc?l=903
out (3).txt
3.9 MB View Download
I can see the playback resumes when I signal end of stream. But I have seen this issue with live streams as well where we do continuous appends but the playback remains stuck. Is there some other case where the queue fullness check might be failing? Also, if I nudge the current time by 0.2 seconds, the playback comes out of stall state.
The queue capacity maxes out at 3 seconds, so this should not be a source of permanent stuck-ness if you're continuously appending more media. Its possible we have a bug somewhere, but there are lots of reasons a stream can stall - I wouldn't bet on it being the same issue. Happy to look at a demo if you can reproduce it. 

The nudge-current-time trick works because seeking resets the queue's capacity to its original (smaller) size (to avoid making seeks slow to complete). 
@chcunningham, that would seem reasonable; e.g. some sort of restriction timer before allowing another increase.
Any updates here?

The behavior you're seeing in the demo is mostly working-as-intended. Underflows increase the queue size to restart playback. 

We can (and should) be a little slower about increasing the queue size (mentioned in comment 49), but this does not eliminate the possibility that a demo like yours can end up stuck forever. The best fix for your stuckness is to either 1) call end of stream or 2) append more data. 

I will still make the change to make queue-size grow more slowly. It may cause your demo to appear suddenly fixed, but this is only because the demo averages about 2 underflows. A demo that had 4 underflows would exhibit the same stuckness even after being slower to increase our queue size. 

From your other comments, I worry that your demo does not capture the same bug you're seeing with livestreaming (where more appends are expected and would eventually satisfy queue size requirements). We may have some bug, but I'd need you to provide a repro of that issue to dig further. 

Double check your append logic - make sure you don't stop appending data whenever you see buffered slightly ahead of currentTime - if playback is stopped you'll need to continue to append more. 

Sign in to add a comment