Cast Streaming should not support unsupported HW codecs |
|||||||
Issue descriptionThere's been a bit of history on this topic, but to sum it all up: Often, there are cases on the various platforms and hardware configurations where a HW encoder is reported as supported by VEA::GetSupportedProfiles(), and then when Cast Streaming goes to initialize the encoder, that initialization fails. This is catastrophic, since at this point the codec has already been negotiated between sender and receiver and cannot be changed (i.e., no fallback to a SW encoder is possible). We need to re-think how we will support HW encoders. Some OTOH options: 1. Only support HW encoders on CrOS (and maybe Mac?) and never on other platforms. 2. Don't trust VEA::GetSupportedProfiles(); or, if it returns true, we should try to initialize the encoder with max resolution/framerate/bitrate parameters before allowing it to be used by the Cast Streaming extension API.
,
Aug 9 2016
Currently H264 HW encoder is always disabled on Mac. https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_rtp_stream.cc?rcl=1470626560&l=435 Maybe we should do this for Windows too.
,
Aug 12 2016
,
Sep 10 2016
I think option 2 is the right one here. Initialize() doesn't guarantee return true. Check WebRTC init histograms for reference. CrOS init fails 2,15%, and Win init fails 0.57%. [0] https://uma.googleplex.com/p/chrome/histograms/?endDate=09-06-2016&dayCount=28&histograms=Media.RTCVideoEncoderInitEncodeSuccess%2CMedia.RTCVideoEncoderProfile&fixupData=true&showMax=true&filters=platform%2Ceq%2CC%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial [1] https://uma.googleplex.com/p/chrome/histograms/?endDate=09-06-2016&dayCount=28&histograms=Media.RTCVideoEncoderInitEncodeSuccess%2CMedia.RTCVideoEncoderProfile&fixupData=true&showMax=true&filters=platform%2Ceq%2CW%2Cisofficial%2Ceq%2CTrue&implicitFilters=isofficial
,
Sep 12 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/48e00814143cfe9f019679ca1cf55693e15aca83 commit 48e00814143cfe9f019679ca1cf55693e15aca83 Author: emircan <emircan@chromium.org> Date: Mon Sep 12 21:51:35 2016 Disable MediaFoundation HW encoder on Windows Disable this feature due to reports where users get error: [mr.mirror.cast.Session] [WARNING] Video stream error Video codec initialization failed. https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_session_delegate.cc?rcl=0&l=298 BUG= 636064 Review-Url: https://codereview.chromium.org/2335743002 Cr-Commit-Position: refs/heads/master@{#418066} [modify] https://crrev.com/48e00814143cfe9f019679ca1cf55693e15aca83/chrome/renderer/media/cast_rtp_stream.cc
,
Sep 12 2016
,
Sep 13 2016
Your change meets the bar and is auto-approved for M54 (branch: 2840)
,
Sep 14 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/906dc96423883ee4ff295b87a55eac23298992d6 commit 906dc96423883ee4ff295b87a55eac23298992d6 Author: emircan <emircan@chromium.org> Date: Wed Sep 14 03:43:17 2016 Disable MediaFoundation HW encoder on Windows Disable this feature due to reports where users get error: [mr.mirror.cast.Session] [WARNING] Video stream error Video codec initialization failed. https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_session_delegate.cc?rcl=0&l=298 BUG= 636064 Review-Url: https://codereview.chromium.org/2335743002 Cr-Commit-Position: refs/heads/master@{#418066} (cherry picked from commit 48e00814143cfe9f019679ca1cf55693e15aca83) NOTRY=true NOPRESUBMIT=true TBR=miu@chromium.org Review-Url: https://codereview.chromium.org/2341443003 Cr-Commit-Position: refs/branch-heads/2840@{#354} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [modify] https://crrev.com/906dc96423883ee4ff295b87a55eac23298992d6/chrome/renderer/media/cast_rtp_stream.cc
,
Sep 14 2016
It's not clear that HW encoders will ever be 100% reliable. Maybe with the suggested fixes HW codecs will work 99.99% of the time, and we can call it good. Otherwise, the long term fix would be to implement software fallback for Cast Streaming; modifying the protocol and receivers as necessary to support this scenario.
,
Sep 15 2016
Agreed. Cast Streaming needs a bunch of refactoring/interface changes to support HW encoders correctly (e.g., a fallback-to-software mechanism). The current design forces HW encoding to either work perfectly, or else the entire product feature is broken. :(
,
Sep 15 2016
,
Oct 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/906dc96423883ee4ff295b87a55eac23298992d6 commit 906dc96423883ee4ff295b87a55eac23298992d6 Author: emircan <emircan@chromium.org> Date: Wed Sep 14 03:43:17 2016 Disable MediaFoundation HW encoder on Windows Disable this feature due to reports where users get error: [mr.mirror.cast.Session] [WARNING] Video stream error Video codec initialization failed. https://cs.chromium.org/chromium/src/chrome/renderer/media/cast_session_delegate.cc?rcl=0&l=298 BUG= 636064 Review-Url: https://codereview.chromium.org/2335743002 Cr-Commit-Position: refs/heads/master@{#418066} (cherry picked from commit 48e00814143cfe9f019679ca1cf55693e15aca83) NOTRY=true NOPRESUBMIT=true TBR=miu@chromium.org Review-Url: https://codereview.chromium.org/2341443003 Cr-Commit-Position: refs/branch-heads/2840@{#354} Cr-Branched-From: 1ae106dbab4bddd85132d5b75c670794311f4c57-refs/heads/master@{#414607} [modify] https://crrev.com/906dc96423883ee4ff295b87a55eac23298992d6/chrome/renderer/media/cast_rtp_stream.cc
,
Nov 9 2016
This seems to be "fixed" by disabling HW codecs on Windows and Mac. Adding software fallback would be a different feature request. And may be lower priority once we ship media remoting. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by m...@chromium.org
, Aug 9 2016