Issue metadata
Sign in to add a comment
|
Video playback does not drop decoded frames marked for discard by ffmpeg demuxer.
Reported by
samuelho...@gmail.com,
Jun 1 2017
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Example URL:
Steps to reproduce the problem:
1. Take the attached file and open it in Chrome such that a video player element wraps it (can just be dragged and dropped into Chrome)
2. Observe that it does not work
3. (With FFMPEG installed) run `ffprobe -report bad-file.mp4` and observe the line "Duration: 00:00:02.84, start: -3.142500, bitrate: 1998 kb/s"
4. Run `ffmpeg -i bad-file.mp4 -avoid_negative_ts make_zero fixed-file.mp4` and repeat the above steps. Notice the start time is now 0 and the browser correctly plays back the video.
What is the expected behavior?
MP4s should decode properly, no error is found when error checking, just a negative start time which (in my limited knowledge of the spec) appears to be acceptable.
What went wrong?
File does not play.
Did this work before? Yes
Is it a problem with Flash or HTML5? HTML5
Does this work in other browsers? Yes
Chrome version: 58.0.3029.110 Channel: stable
OS Version: OS X 10.11.6
Flash Version:
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: Hardware accelerated
Rasterization: Hardware accelerated
Video Decode: Hardware accelerated
Video Encode: Hardware accelerated
VPx Video Decode: Hardware accelerated
WebGL: Hardware accelerated
WebGL2: Hardware accelerated
Driver Bug Workarounds
add_and_true_to_loop_condition
adjust_src_dst_region_for_blitframebuffer
decode_encode_srgb_for_generatemipmap
disable_framebuffer_cmaa
disable_multimonitor_multisampling
disable_webgl_rgb_multisampling_usage
emulate_abs_int_function
get_frag_data_info_bug
init_one_cube_map_level_before_copyteximage
msaa_is_slow
pack_parameters_workaround_with_pack_buffer
rebind_transform_feedback_before_resume
regenerate_struct_names
remove_invariant_and_centroid_for_essl3
reset_base_mipmap_level_before_texstorage
rewrite_float_unary_minus_operator
rewrite_texelfetchoffset_to_texelfetch
scalarize_vec_and_mat_constructor_args
set_zero_level_before_generating_mipmap
unfold_short_circuit_as_ternary_operation
unpack_alignment_workaround_with_unpack_buffer
unpack_image_height_workaround_with_unpack_buffer
use_intermediary_for_copy_texture_image
use_shadowed_tex_level_params
use_unused_standard_shared_blocks
Problems Detected
Multisampling is buggy on OSX when multiple monitors are connected: 237931
Applied Workarounds: disable_multimonitor_multisampling
Unfold short circuit on Mac OS X: 307751
Applied Workarounds: unfold_short_circuit_as_ternary_operation
Always rewrite vec/mat constructors to be consistent: 398694
Applied Workarounds: scalarize_vec_and_mat_constructor_args
Mac drivers handle struct scopes incorrectly: 403957
Applied Workarounds: regenerate_struct_names
On Intel GPUs MSAA performance is not acceptable for GPU rasterization: 527565
Applied Workarounds: msaa_is_slow
glGenerateMipmap fails if the zero texture level is not set on some Mac drivers: 560499
Applied Workarounds: set_zero_level_before_generating_mipmap
Pack parameters work incorrectly with pack buffer bound: 563714
Applied Workarounds: pack_parameters_workaround_with_pack_buffer
Alignment works incorrectly with unpack buffer bound: 563714
Applied Workarounds: unpack_alignment_workaround_with_unpack_buffer
copyTexImage2D fails when reading from IOSurface on multiple GPU types.: 581777
Applied Workarounds: use_intermediary_for_copy_texture_image
Multisample renderbuffers with format GL_RGB8 have performance issues on Intel GPUs.: 607130
Applied Workarounds: disable_webgl_rgb_multisampling_usage
Mac Drivers store texture level parameters on int16_t that overflow: 610153
Applied Workarounds: use_shadowed_tex_level_params
Limited enabling of Chromium GL_INTEL_framebuffer_CMAA: 535198
Applied Workarounds: disable_framebuffer_cmaa
glGetFragData{Location|Index} works incorrectly on Max: 638340
Applied Workarounds: get_frag_data_info_bug
glResumeTransformFeedback works incorrectly on Intel GPUs: 638514
Applied Workarounds: rebind_transform_feedback_before_resume
glTexStorage* are buggy when base mipmap level is not 0: 640506
Applied Workarounds: reset_base_mipmap_level_before_texstorage
Result of abs(i) where i is an integer in vertex shader is wrong: 642227
Applied Workarounds: emulate_abs_int_function
Rewrite texelFetchOffset to texelFetch for Intel Mac: 642605
Applied Workarounds: rewrite_texelfetchoffset_to_texelfetch
Rewrite condition in for and while loops for Intel Mac: 644669
Applied Workarounds: add_and_true_to_loop_condition
Do TexImage2D first before CopyTexImage2D for cube map texture on Intel Mac 10.11: 648197
Applied Workarounds: init_one_cube_map_level_before_copyteximage
Decode and encode before generateMipmap for srgb format textures on macosx: 634519
Applied Workarounds: decode_encode_srgb_for_generatemipmap
Insert statements to reference all members in unused std140/shared blocks on Mac: 618464
Applied Workarounds: use_unused_standard_shared_blocks
Tex(Sub)Image3D performs incorrectly when uploading from unpack buffer with GL_UNPACK_IMAGE_HEIGHT greater than zero on Intel Macs: 654258
Applied Workarounds: unpack_image_height_workaround_with_unpack_buffer
adjust src/dst region if blitting pixels outside read framebuffer on Mac: 644740
Applied Workarounds: adjust_src_dst_region_for_blitframebuffer
Mac driver GL 4.1 requires invariant and centroid to match between shaders: 639760, 641129
Applied Workarounds: remove_invariant_and_centroid_for_essl3
Disable KHR_blend_equation_advanced until cc shaders are updated: 661715
Rewrite -float to 0.0 - float for Intel Mac: 672380
Applied Workarounds: rewrite_float_unary_minus_operator
Version Information
Data exported 6/1/2017, 5:05:44 PM
Chrome version Chrome/58.0.3029.110
Operating system Mac OS X 10.11.6
Software rendering list version 12.20
Driver bug list version 9.36
ANGLE commit id 461d9a3060e3
2D graphics backend Skia/58 4c81ba6ba3a3270db809bf7d4c3bc782694a56a4
Command Line Args Chrome.app/Contents/MacOS/Google Chrome -psn_0_158779235 --flag-switches-begin --flag-switches-end
Driver Information
Initialization time 1081
In-process GPU false
Passthrough Command Decoder false
Sandboxed true
GPU0 VENDOR = 0x8086, DEVICE= 0x0a2e *ACTIVE*
Optimus false
Optimus false
AMD switchable false
Driver vendor
Driver version 10.14.73
Driver date
Pixel shader version 4.10
Vertex shader version 4.10
Max. MSAA samples 8
Machine model name MacBookPro
Machine model version 11.1
GL_VENDOR Intel Inc.
GL_RENDERER Intel Iris OpenGL Engine
GL_VERSION 4.1 INTEL-10.14.73
GL_EXTENSIONS GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier
Disabled Extensions GL_KHR_blend_equation_advanced GL_KHR_blend_equation_advanced_coherent
Window system binding vendor
Window system binding version
Window system binding extensions
Direct rendering Yes
Reset notification strategy 0x0000
GPU process crash count 0
Compositor Information
Tile Update Mode Zero-copy
Partial Raster Enabled
GpuMemoryBuffers Status
ATC Software only
ATCIA Software only
DXT1 Software only
DXT5 Software only
ETC1 Software only
R_8 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
RG_88 Software only
BGR_565 Software only
RGBA_4444 Software only
RGBX_8888 Software only
RGBA_8888 GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE
BGRX_8888 GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE
BGRA_8888 GPU_READ, SCANOUT, SCANOUT_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
YVU_420 Software only
YUV_420_BIPLANAR GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
UYVY_422 GPU_READ_CPU_READ_WRITE, GPU_READ_CPU_READ_WRITE_PERSISTENT
This was pointed out by members of my team who claim this video had been working as a test video for a web app we are developing. I isolated it to this bug with the decoding (outside of our team's control) and they say the video works fine in older Chrome as well as FF.
,
Jun 1 2017
This one is actually slightly different then the duped issue upon further inspection. ffmpeg seems to have changed how they report start_time in cases where discard is marked. We do actually try to fix negative timestamps when the _start time_ is reported accurately, but in this case, ffmpeg is detecting that the start time is -0.027188s (the first audio packet) yet the first video packet is at -0.041711s; this results in hitting issue 723537 . The reason for this is that the entire first video packet is marked for discard and ffmpeg automatically subtracts this from the start time then. So there is some work we can do here to handle start times better. That said this video is definitely not a valid encoding. It plays garbage in vlc, it plays ~6 seconds with ~3 seconds of silence in Firefox, and doesn't play at all in Chrome due to issue 723537 . So I recommend you re-encode this clip instead. I'll see about fixing our handling of discard packets, but it won't fix all negative ts cases.
,
Jun 1 2017
After some more digging I think the crux of this issue is more accurately titled...
,
Jun 2 2017
Actually this is still a dupe of issue 723537 after all. It all boils down to either edit list processing being broken in ffmpeg or these files having broken edit lists. Please follow issue 723537 for the result.
,
Jun 2 2017
Thank you! This is not a big deal for us to re-encode or use a different test video as the only value this video had was it's short length and smallish file size. If the video is indeed encoded terribly, that's understandable that it does not work. It was just noted as a regression by my teammates so I figured I would report it.
,
Jun 2 2017
Thanks for the report regardless of the outcome! We're always interested to hear about things that no longer work :)
,
Oct 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5341599c0b2b5a74f62a7734d592d7faae9983c8 commit 5341599c0b2b5a74f62a7734d592d7faae9983c8 Author: Dale Curtis <dalecurtis@chromium.org> Date: Sat Oct 14 01:01:26 2017 Add support for discarding video frames post-decode. Around Sept 2016 ffmpeg has started vending video packets which are marked for discard. Failing to discard these can lead to jittery video or playback starting from the wrong point. This change adds post-decode discarding for video frames to the DecoderStream template class for video. During demuxing we'll mark packets with a full-frame discard (kInfiniteDuration in discard padding) and then post-decode we lookup based on PTS. If a frame is marked for discard we do not vend it outside of DecoderStream. BUG= 728787 TEST=tbd Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: I1a942475b6d97df5b9c303ae5fb7dfb7335d3b73 Reviewed-on: https://chromium-review.googlesource.com/521757 Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Reviewed-by: Dan Sanders <sandersd@chromium.org> Cr-Commit-Position: refs/heads/master@{#508895} [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/ffmpeg/ffmpeg_regression_tests.cc [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/filters/decoder_stream.cc [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/filters/decoder_stream.h [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/filters/decoder_stream_traits.cc [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/filters/decoder_stream_traits.h [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/filters/ffmpeg_demuxer.cc [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/filters/ffmpeg_glue.cc [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/renderers/video_renderer_impl.cc [modify] https://crrev.com/5341599c0b2b5a74f62a7734d592d7faae9983c8/media/test/pipeline_integration_test.cc |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by dalecur...@chromium.org
, Jun 1 2017Status: Duplicate (was: Unconfirmed)