Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 1018373003: Improving WebM video duration estimation. (Closed)

Created:
5 years, 9 months ago by chcunningham
Modified:
5 years, 8 months ago
Reviewers:
DaleCurtis, wolenetz
CC:
chromium-reviews, feature-media-reviews_chromium.org, DaleCurtis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Improving WebM duration estimation. 1. Increasing hard-coded estimates to fix stalls in low fps YouTube videos 2. Moving video to use max duration to avoid stalls. 3. Adjusting estimates in SourceBufferRange upon future appends. *More on hard-coded estimates* The hard-coded video duration estimate was changed from 42ms (24fps) to 63ms (16fps). While 42ms is more common than 63ms, both are just wild guesses and 42ms was causing low framerate videos (12fps and lower) to stall by incorrectly triggering gaps in the MSE buffered range. 63ms will prevent these gaps for video as low as 8fps. To the extent that 63ms favors over-estimation, this is mitigated by the adjustments in SourceBufferRange. *What about audio* This CL lays the foundation for a similar change to audio's estimation. I'm splitting them up to keep the size reasonable. Internal Google bug: b/18090240 Committed: https://crrev.com/985c1f983bf4092dc5504a3c363b3fe2a535c03a Cr-Commit-Position: refs/heads/master@{#325507}

Patch Set 1 : Add duration estimate flag. Adjust estimate in SourceBufferStream for in-order appends. #

Patch Set 2 : Relaxing restrictions on adjusting estimated duration. Moved to SourceBufferRange. #

Patch Set 3 : Adding limited media log (10 times max) for WebM duration estimates. #

Total comments: 32

Patch Set 4 : Feedback, round 1 (no tests yet) #

Patch Set 5 : Adding tests and fixing bug #

Total comments: 24

Patch Set 6 : Feedback, round 1 #

Patch Set 7 : Feedback, round 2 #

Patch Set 8 : Fixing try failure, remove unused variable for some builds. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -64 lines) Patch
M media/base/decoder_buffer.cc View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M media/base/stream_parser_buffer.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M media/base/stream_parser_buffer.cc View 1 2 3 4 5 4 chunks +15 lines, -4 lines 0 comments Download
M media/filters/source_buffer_range.h View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M media/filters/source_buffer_range.cc View 1 2 3 4 5 5 chunks +31 lines, -4 lines 0 comments Download
M media/filters/source_buffer_stream.cc View 1 2 3 4 3 chunks +12 lines, -3 lines 0 comments Download
M media/filters/source_buffer_stream_unittest.cc View 1 2 3 4 5 7 chunks +96 lines, -14 lines 0 comments Download
M media/formats/webm/webm_cluster_parser.h View 1 2 3 4 5 4 chunks +18 lines, -8 lines 0 comments Download
M media/formats/webm/webm_cluster_parser.cc View 1 2 3 4 5 10 chunks +55 lines, -14 lines 0 comments Download
M media/formats/webm/webm_cluster_parser_unittest.cc View 6 chunks +15 lines, -12 lines 0 comments Download
M media/test/pipeline_integration_test.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 26 (6 generated)
chcunningham
Generally we’ve been discussing what currently happens in cases of appending frames that overlap, what ...
5 years, 9 months ago (2015-03-20 18:02:35 UTC) #2
chcunningham
My first upload is the narrow/conservative approach. If we're appending buffers in order and we ...
5 years, 9 months ago (2015-03-20 18:05:57 UTC) #3
wolenetz
w.r.t: > One interesting thing to remember is that if at any point in FP ...
5 years, 9 months ago (2015-03-20 18:56:03 UTC) #4
wolenetz
w.r.t.: > In math notation: Remove (prev_timestamp, next_timestamp] (the ] is a bug as > ...
5 years, 9 months ago (2015-03-20 18:57:00 UTC) #5
wolenetz
w.r.t.: CL description: "(TODO: Same for audio and disable splicing)." and > *Success for audio ...
5 years, 9 months ago (2015-03-20 21:27:25 UTC) #6
chcunningham
On 2015/03/20 18:56:03, wolenetz wrote: > w.r.t: > > One interesting thing to remember is ...
5 years, 9 months ago (2015-03-20 21:53:35 UTC) #7
chcunningham
On 2015/03/20 21:27:25, wolenetz wrote: > w.r.t.: > CL description: "(TODO: Same for audio and ...
5 years, 9 months ago (2015-03-20 21:56:25 UTC) #8
chcunningham
On 2015/03/20 18:57:00, wolenetz wrote: > w.r.t.: > > In math notation: Remove (prev_timestamp, next_timestamp] ...
5 years, 9 months ago (2015-03-20 22:17:03 UTC) #9
wolenetz
On 2015/03/20 21:53:35, chcunningham wrote: > On 2015/03/20 18:56:03, wolenetz wrote: > > w.r.t: > ...
5 years, 9 months ago (2015-03-21 00:41:37 UTC) #10
wolenetz
On 2015/03/20 21:56:25, chcunningham wrote: > On 2015/03/20 21:27:25, wolenetz wrote: > > w.r.t.: > ...
5 years, 9 months ago (2015-03-27 20:14:06 UTC) #11
wolenetz
Looking pretty good. Beyond inline comments: 1. Do the layout tests still pass with this ...
5 years, 9 months ago (2015-03-28 00:26:06 UTC) #12
chcunningham
Thanks Matt. See inline: 1. Do the layout tests still pass with this CL landed, ...
5 years, 8 months ago (2015-04-13 23:25:18 UTC) #13
wolenetz
Nice work! lgtm % removing the defunct DecoderBuffer |is_duration_estimated_| member and fixing a few new ...
5 years, 8 months ago (2015-04-15 02:55:23 UTC) #14
DaleCurtis
Couple Qs, but otherwise lgtm https://codereview.chromium.org/1018373003/diff/80001/media/base/stream_parser_buffer.cc File media/base/stream_parser_buffer.cc (right): https://codereview.chromium.org/1018373003/diff/80001/media/base/stream_parser_buffer.cc#newcode157 media/base/stream_parser_buffer.cc:157: Forward this new flag? ...
5 years, 8 months ago (2015-04-15 22:51:46 UTC) #16
chcunningham
Thanks for the review Dale/Matt! Matt, re mp4 tests: Will definitely keep mp4 in mind ...
5 years, 8 months ago (2015-04-16 18:04:16 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018373003/120001
5 years, 8 months ago (2015-04-16 18:18:52 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1018373003/140001
5 years, 8 months ago (2015-04-16 19:20:11 UTC) #23
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 8 months ago (2015-04-16 20:40:12 UTC) #24
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/985c1f983bf4092dc5504a3c363b3fe2a535c03a Cr-Commit-Position: refs/heads/master@{#325507}
5 years, 8 months ago (2015-04-16 20:41:06 UTC) #25
wolenetz
5 years, 8 months ago (2015-04-18 00:06:26 UTC) #26
Message was sent while issue was closed.
On 2015/04/16 18:04:16, chcunningham wrote:
> Matt, re mp4 tests: Will definitely keep mp4 in mind going forward. I'm a
little
> confused why we would bother to disable webm in that workflow? How does webm
> support affect the mp4 tests?

Though I'm considering reworking the test structure a bit to test all of {webm,
mp4, mp2ts, etc}, if available in the build, the current structure of the
mediasource_utils.js affords only one of {webm, mp4} byte streams in the test
(and it picks the first that is supported). Hence, to test mp4 in Chrome using
these layout tests as currently constructed, you need to disable support for
webm in the build. This is most easily hacked locally by removing webm stream
parser support in stream_parser_factory.cc.

My rework is motivated and likely due to upcoming push to get MSE tested for
interop across various browsers (so the spec can move out of the CR w3c phase)
and the likelihood that the interop tests will continue to be based on the
structure of our existing mediasource layout tests.

So, for short term, to test mp4 in MSE in Chrome, must locally disable webm
support in Chrome and build Chrome with mp4 locally.

Powered by Google App Engine
This is Rietveld 408576698