Closed
Bug 1141139
Opened 10 years ago
Closed 9 years ago
Enable low latency decoding for MFTDecoder
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla42
Tracking | Status | |
---|---|---|
firefox42 | --- | fixed |
People
(Reporter: schoenefeld, Assigned: jya)
References
Details
(Whiteboard: gfx-noted)
Attachments
(1 file)
1.20 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36 Steps to reproduce: From testing the Media Source Extension in firefox trunk with: media.mediasource.enabled;true media.mediasource.mp4.enabled;true media.mediasource.youtubeonly;false Playing a live h.264/mp.4 video stream using Media Source Extension (MSE), latency on Win7 and Win8 is very high (>1s). This is a known behavior of the MFT/DXVA decoder used on Windows, where it always buffers frames for 1 second before returning the first decoded frame. Actual results: The high latency makes use of MSE with mp4 unusable for low latency use-cases like webchat, desktop remoting... Expected results: Using the CODECAPI_AVLowLatencyMode flag when initializing the decoder will buffer less (0 frames on Win8, 4-10 frames on Win7), making it usable for low latency live stream decoding. Note that while the AVLowLatencyMode documentation says that it will only work on >=Win8 ,the flag will also have a positive effect on Windows 7, as long as SP2 is installed. For reference: The AVLowLatencyMode flag has also been recently added to Chrome Canary build (dxva_video_decoder_accelerator.cc:887)
Updated•10 years ago
|
Component: Untriaged → Video/Audio
Product: Firefox → Core
Assignee | ||
Comment 1•10 years ago
|
||
Yes, I saw the video IMF filter sometimes buffer in excess of 20 frames before returning anything
Updated•9 years ago
|
Whiteboard: gfx-noted
Comment 2•9 years ago
|
||
Just a note in reference to comment 0. This seems to be only valid on Windows 8 and Windows 7 SP 2 doesn't exist (http://windows.microsoft.com/en-US/windows/service-packs-download#sptabs=win7). Maybe a typo and he meant SP 1?
Comment 3•9 years ago
|
||
I am able to set CODECAPI_AVDecNumWorkerThreads, which is also reported as Windows 8 only, on Windows 7 SP 1. When setting CODECAPI_AVLowLatencyMode, I actually get an S_OK return code if I add a SetUINT32 at [1]. Also, I see from Visual Studio Concurrency Analyzer that the decoder threads are getting scheduled in short frequent bursts versus before I would see long decodes with 50-100 ms between each decode. So it seems to work on Windows 7 SP 1. [1] http://mxr.mozilla.org/mozilla-central/source/dom/media/platforms/wmf/WMFVideoMFTManager.cpp#206
Comment 4•9 years ago
|
||
Also, Chromium just recently enabled this - https://groups.google.com/a/chromium.org/forum/#!topic/feature-media-reviews/3fFal9GVhRg
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jyavenard
Assignee | ||
Comment 5•9 years ago
|
||
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8644756 [details] [diff] [review] Enable low latency decoding on Windows. r=cpearce Will do thorough testing before pushing...
Attachment #8644756 -
Flags: review?(cpearce)
Assignee | ||
Comment 7•9 years ago
|
||
appears to work very well, we pass all the tests now (with a couple of adjustments on the test: e.g. properly calling endOfStream())
Updated•9 years ago
|
Attachment #8644756 -
Flags: review?(cpearce) → review+
Updated•9 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment 9•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ac350571e7b8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox42:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Assignee | ||
Comment 10•9 years ago
|
||
Unfortunately, it appears that win7 try machines only have SP1 installed ; as such we still fail the test for bug 1180935. Back to the drawing board.
Assignee | ||
Comment 12•9 years ago
|
||
I went by the original description mentioning SP2. So try machines don't have any SP installed then. I verified that with SP1 it works as expected. The decoder output a frame after 10 Frames as opposed to 25+ without
Comment 13•9 years ago
|
||
We've had a surge of crashes in msmpeg2vdec.dll since this landed. https://crash-stats.mozilla.com/search/?product=Firefox&signature=~msmpeg2vdec&_facets=signature&_columns=date&_columns=signature&_columns=product&_columns=version&_columns=build_id&_columns=platform#facet-signature So in bug 1205083 I'm proposing we remove enabling low latency video decoding.
Blocks: 1205083
Comment 14•7 years ago
|
||
I believe the crashes mentioned previously have actually been fixed elsewhere in Firefox somewhere along the line, Low Latency Decoding should be given another shot.
Assignee | ||
Comment 15•7 years ago
|
||
And it would be relying on an undefined behaviour of the decoder. Per Microsoft documentation, it can't do content with B-frame.. and yet it does (and Chrome uses it)...
Comment 16•7 years ago
|
||
Chrome apparently doesn't play nice with B Frames as per https://bugs.chromium.org/p/chromium/issues/detail?id=703019 Surely the decoder could fall back in the presence of b frames to the standard decoder, or only use low latency for live streaming. I've heard of a few sites refraining from switching to full html5 players because of the latency differences between various web browsers, which isn't helping to kill Flash faster.
Assignee | ||
Comment 17•7 years ago
|
||
Hmmmm, that bug is more about the stream having wrong pts set. You would see the same kind of jittery playback in Firefox on macos...
You need to log in
before you can comment on or make changes to this bug.
Description
•