New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 638664 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocked on:
issue 445320
issue 664652



Sign in to add a comment

MediaRecorder in Android not using Encode Accelerator for VP8/9

Project Member Reported by mcasas@chromium.org, Aug 17 2016

Issue description

MediaRecorder in Android (N7 MTC20K angle-userdebug), cannot use
AndroidVideoEncodeAccelerator due to |disable_web_rtc_hw_encoding|
being true in [1]. This, in turn, is due to 
IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE)
being true in [2]. The code was landed by fischman@ quite a while
ago [3], so I guess this was never enabled/used ...?


[1] https://cs.chromium.org/chromium/src/media/gpu/ipc/service/gpu_video_encode_accelerator.cc?dr=C&q=(!gpu_preferences.disable_web_rtc_hw_encoding)&sq=package:chromium&l=209
[2] https://cs.chromium.org/chromium/src/content/browser/gpu/gpu_data_manager_impl_private.cc?q=IsFeatureBlacklisted%5C(gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE%5C)&sq=package:chromium&l=680&dr=C
[3] https://chromium.googlesource.com/chromium/src/+/6998f01f2c0dfb3a304eafeabddf7cadd1d08db9
 

Comment 1 by mcasas@chromium.org, Aug 17 2016

If I remove those checks and start encoding, I get (logs for video_capture*, track_recorder_*):

08-17 10:51:11.272  1953  2157 V chromium: [VERBOSE2:video_capture_buffer_pool.cc(30)] allocating ShMem of 640x480
08-17 10:51:11.274  2012  2072 V chromium: [VERBOSE3:video_track_recorder.cc(1109)] InitializeEncoder640x480
08-17 10:51:11.274  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(682)] ConfigureEncoderOnEncodingTaskRunner
08-17 10:51:11.275  1953  2035 V chromium: [VERBOSE1:video_capture_host.cc(269)] VideoCaptureHost::OnRequestRefreshFrame, device_id 1
08-17 10:51:11.306  1953  2157 V chromium: [VERBOSE2:video_capture_buffer_pool.cc(30)] allocating ShMem of 640x480
08-17 10:51:11.369  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(594)] EncodeOnEncodingTaskRunner
08-17 10:51:11.369  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(613)] Might drop frame.
08-17 10:51:11.369  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(594)] EncodeOnEncodingTaskRunner
08-17 10:51:11.369  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(613)] Might drop frame.
08-17 10:51:11.369  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(528)] RequireBitstreamBuffers
08-17 10:51:11.373  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(577)] UseOutputBitstreamBufferId
08-17 10:51:11.373  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(577)] UseOutputBitstreamBufferId
08-17 10:51:11.373  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(577)] UseOutputBitstreamBufferId
08-17 10:51:11.373  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(577)] UseOutputBitstreamBufferId
08-17 10:51:11.373  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(594)] EncodeOnEncodingTaskRunner
08-17 10:51:11.373  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(594)] EncodeOnEncodingTaskRunner
08-17 10:51:11.387  2040  2074 E chromium: [ERROR:android_video_encode_accelerator.cc(386)] Unexpected output format change
08-17 10:51:11.388  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(569)] NotifyError
08-17 10:51:11.405  1953  2157 V chromium: [VERBOSE2:video_capture_buffer_pool.cc(30)] allocating ShMem of 640x480
08-17 10:51:11.407  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(594)] EncodeOnEncodingTaskRunner
08-17 10:51:11.408  2012  2091 V chromium: [VERBOSE3:video_track_recorder.cc(606)] An error occurred in VEA encoder

Comment 2 by mcasas@chromium.org, Aug 18 2016

Status: Available (was: Untriaged)
After a bit of digging, this works if and when gn args include:

use_openh264 = true
rtc_use_h264 = true

and commenting out the lines in this patch:

diff --git a/media/gpu/android_video_encode_accelerator.cc b/media/gpu/android_video_encode_accelerator.cc
index afc391f..9e1308e 100644
--- a/media/gpu/android_video_encode_accelerator.cc
+++ b/media/gpu/android_video_encode_accelerator.cc
@@ -382,8 +382,8 @@ void AndroidVideoEncodeAccelerator::DequeueOutput() {
         return;
 
       case MEDIA_CODEC_OUTPUT_FORMAT_CHANGED:
-        RETURN_ON_FAILURE(false, "Unexpected output format change",
-                          kPlatformFailureError);
+        //RETURN_ON_FAILURE(false, "Unexpected output format change",
+        //                  kPlatformFailureError);
         break;
 
       case MEDIA_CODEC_OUTPUT_BUFFERS_CHANGED:
diff --git a/media/gpu/ipc/service/gpu_video_encode_accelerator.cc b/media/gpu/ipc/service/gpu_video_encode_accelerator.cc
index bb996bf..a91e5b6 100644
--- a/media/gpu/ipc/service/gpu_video_encode_accelerator.cc
+++ b/media/gpu/ipc/service/gpu_video_encode_accelerator.cc
@@ -240,7 +240,7 @@ GpuVideoEncodeAccelerator::GetVEAFactoryMethods(
     vea_factory_methods.push_back(base::Bind(&CreateVaapiVEA));
 #endif
 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
-  if (!gpu_preferences.disable_web_rtc_hw_encoding)
+  //if (!gpu_preferences.disable_web_rtc_hw_encoding)
     vea_factory_methods.push_back(base::Bind(&CreateAndroidVEA));
 #endif
 #if defined(OS_MACOSX)


Project Member

Comment 3 by bugdroid1@chromium.org, Aug 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b1178c9eb68681f7a305f400d02351074a2e8fa

commit 0b1178c9eb68681f7a305f400d02351074a2e8fa
Author: mcasas <mcasas@chromium.org>
Date: Fri Aug 19 05:33:36 2016

media/.../{android_,gpu_}video_encode_accelerator{,_host} cleanup

Just found a couple of things that needed cleanup during
the investigation of the bug below. So, this CL:

- Removes unnecessary CHECK(env); after
 JNIEnv* env = AttachCurrentThread();
 (see https://crrev.com/2231923002)

- s/__PRETTY_FUNCTION__/__FUNCTION__/ because the former
 is illegible in adb logcat or any other log, really.

- s/NULL/nullptr/

And concretely in GpuVideoEncodeAccelerator this CL:

- moves the static methods
  std::unique_ptr<VideoEncodeAccelerator> Create{platform}VEA
 out of the class and into anonymous namespace of the .cc
 file, since they don't need to be in the class at all.

- nukes (*CreateVEAFp)() in that class and uses instead a
 base::Callback(), bound to the static method mentioned above.

- uses for-range loops.

BUG= 638664 
TEST=all unittests. content_browsertests, browser_tests etc
working, and tested by hand in N7.

Review-Url: https://codereview.chromium.org/2251993004
Cr-Commit-Position: refs/heads/master@{#413057}

[modify] https://crrev.com/0b1178c9eb68681f7a305f400d02351074a2e8fa/media/base/android/sdk_media_codec_bridge.cc
[modify] https://crrev.com/0b1178c9eb68681f7a305f400d02351074a2e8fa/media/gpu/android_video_encode_accelerator.cc
[modify] https://crrev.com/0b1178c9eb68681f7a305f400d02351074a2e8fa/media/gpu/ipc/client/gpu_video_encode_accelerator_host.cc
[modify] https://crrev.com/0b1178c9eb68681f7a305f400d02351074a2e8fa/media/gpu/ipc/service/gpu_video_encode_accelerator.cc
[modify] https://crrev.com/0b1178c9eb68681f7a305f400d02351074a2e8fa/media/gpu/ipc/service/gpu_video_encode_accelerator.h

Comment 4 by mcasas@chromium.org, Aug 22 2016

Blockedon: 445320
Cc: glaznev@chromium.org
After offline chatting with glaznev@ (in CC: fyi), I indeed see [1]

{
      "id": 82,
      "description": "MediaCodec is still too buggy to use for encoding (b/11536167)",
      "os": {
        "type": "android"
      },
      "features": [
        "accelerated_video_encode"
      ]
    },

[1] https://cs.chromium.org/chromium/src/gpu/config/software_rendering_list_json.cc?q=gpu/config/+software_rendering_list_json&sq=package:chromium&dr=C&l=694


Comment 5 by mcasas@chromium.org, Aug 27 2016

Cc: jaikk@chromium.org owe...@chromium.org
Labels: -Pri-3 Pri-2
#4: chromium entries should not have buganizer bugs,
so b/11536167 is wrongly noted. But it gets even better,
because the said bug was closed _before_ (11/11/2013)
this line of code was landed (12/06/2013).

So, the sad truth is that VideoEncodeAccelarator was
never enabled in Android platforms. Adding some peeps. 
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 16 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3890074de7f2607c0c6856ae6c85738e4a9e9d44

commit 3890074de7f2607c0c6856ae6c85738e4a9e9d44
Author: sakal <sakal@chromium.org>
Date: Fri Sep 16 08:36:37 2016

Enable HW encoding on Android. This code has been in the code base for a very long time but it was never enabled. This CL fixes a small bug in it and enables it.

BUG= 445320 ,  638664 
CQ_INCLUDE_TRYBOTS=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

Review-Url: https://codereview.chromium.org/2288103003
Cr-Commit-Position: refs/heads/master@{#419132}

[modify] https://crrev.com/3890074de7f2607c0c6856ae6c85738e4a9e9d44/gpu/config/software_rendering_list_json.cc
[modify] https://crrev.com/3890074de7f2607c0c6856ae6c85738e4a9e9d44/media/gpu/android_video_encode_accelerator.cc

Cc: niklase@chromium.org

Comment 8 by mcasas@chromium.org, Sep 28 2016

sakal@ is this issue solved with #6 or are there missing pieces?

Owner: sakal@chromium.org
sakal@ ping #8

Status: Fixed (was: Available)
Fixed per offline conversation with sakal@
Labels: -OS-Linux
Cc: anatolid@chromium.org
Can the owner please set a milestone label to this issue?

FYI, the last CL associated with this issue has been added after the M54 branch was created and before the M55 branch was created, so perhaps it should be labelled as M55?

Comment 13 by sakal@chromium.org, Oct 18 2016

Labels: M-55
Blocking: 615108
Status: Started (was: Fixed)
There's uncertainty as to the influence of the flags 
mentioned in https://crbugcom/615108 affect this bug.
Reopening while the investigation advances.

Comment 15 by sakal@chromium.org, Oct 21 2016

Owner: braveyao@chromium.org
braveyao, it looks like you disabled the feature here. https://codereview.chromium.org/2358683002/patch/160001/170008 Did you have a reason?
Cc: braveyao@chromium.org
Owner: sakal@chromium.org
HW encoder is just enabled in chromium and the performance and compatibility is not fully verified until we have more test and feedback. That's why it's still behind a flag.
Generally the performance in chromium is worse than webrtc native. So I suppose there will be a lot of work to be done, i.e. VP8 performance tuning on Exynos, before we can finally release it.

If MediaRecorder needs to use HW accelerator now, maybe you can enable it programmatically or specially for MediaRecording. 

BTW: the solution in #6 shouldn't work normally with H264. You will get the output stream with only key frames at very low frame rate. I guess that's not what you want.
 
Blockedon: 664652
Some update: we decide to release H264 HW encoding on Android in M57. see crbug/664652. Then media recording can use it safely. 
Labels: -M-55 M-57
Pushing to M57. Please update if that's wrong.
Owner: braveyao@chromium.org
Assigned sakal@chromium.org has a flag saying: "Last visit 28 days ago",
so assigning to braveyao@ who is working in the area in a way that it's
inseparable from the current bug. 

braveyao@/niklase@, do you have any ETA for when this will be available?
Blockedon: -445320 -664652
Blocking: -615108
Owner: ----
It appears that MediaRecorder is not ready for HW encoder yet and there are some more working to be done/decided beforehand than just enabling HW encoder for MediaRecorder. 
- enabling HW encoder will fail MediaRecorder's own unittest randomly. See issue 653864. It's an old issue which happened when HW encoder was firstly enabled in Oct and was not addressed.
- Will MediaRecorder utilize VP8 HW encoder too? WebRTC only focuses on H264 at present. VP8 HW encoder is not well tested/tuned.
- Will MediaRecoder share same H264 blacklist with WebRTC? WebRTC cares more BPS/FPS real-time control than MediaRecorder. Which means some devices may be blacklisted by WebRTC, but may work for MediaRecorder.

So VEA is disabled for MediaRecorder explicitly in cl https://codereview.chromium.org/2577513002/. Please reassign properly to address these concerns first before we can enable it again.
Blockedon: 445320 664652
Status: Available (was: Started)
braveyao@: An issue should not be assigned while having no owner.
Please do not remove blocked-on bugs, specially since those are
already fixed, so we can trace the issue dependency tree.
Cc: posciak@chromium.org
Components: Blink>MediaRecording
Components: -Blink>MediaStream>Recording
Bulk move
Blink>MediaStream>Recording ---> Blink>MediaRecording
Labels: -M-57
Some updates from some quick tests: 
 - The HW codec, VP8&H264, actually works well with webrtc on N5 Kitkat, on which the bots is running in issue653864. 
 - Enabling HW codec to MediaRecorder will fail WebRtcMediaRecorderTest.PeerConnection on all K/L/M on N5 now, randomly though.
 - Even without HW accelerator enabled, this case will fail the ASAN bots too recently, issue693565.

So I suppose either the test case has any problem w/o HW codec or MediaRecorder doesn't use HW codec correctly.
Cc: -anatolid@chromium.org -braveyao@chromium.org -posciak@chromium.org -jaikk@chromium.org -glaznev@chromium.org
Cleaning up CC: list of this bug to the essentials, since it's not
going to be worked on for a while.
Owner: braveyao@chromium.org
Status: Assigned (was: Available)
Assigning to braveyao@ who is working on this.
Status: Fixed (was: Assigned)
Status: Assigned (was: Fixed)
#29 was reverted by https://codereview.chromium.org/2832263003/
but somehow that didn't get annotated here. 
There's a revert of the revert still not landed in 
https://codereview.chromium.org/2834233002/.

Project Member

Comment 32 by bugdroid1@chromium.org, Apr 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8

commit acb8a289bdc8dccf1e4bd726a29f10b15ed281f8
Author: yolandyan <yolandyan@google.com>
Date: Mon Apr 24 21:06:41 2017

Reland of Android: enable H264&VP8 HW accelerator for MediaRecorder (patchset #1 id:1 of https://codereview.chromium.org/2832263003/ )

Reason for revert:
Before this revert has landed, the bot went back to green, it's possible it's just a flake. gonna revert this revert for now

https://build.chromium.org/p/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/11452

Original issue's description:
> Revert of Android: enable H264&VP8 HW accelerator for MediaRecorder (patchset #12 id:400001 of https://codereview.chromium.org/2801803002/ )
>
> Reason for revert:
> The CL seem to be responsible for this failure: https://build.chromium.org/p/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/11451
>
> Original issue's description:
> > Android: enable H264&VP8 HW accelerator for MediaRecorder
> >
> > The HW encoding codes has been revised a bit recently and works pretty well now.
> > This cl is to enable H264&VP8 HW accelerator for MediaRecorder on Android.
> >
> > BUG= 638664 
> >
> > Review-Url: https://codereview.chromium.org/2801803002
> > Cr-Commit-Position: refs/heads/master@{#466414}
> > Committed: https://chromium.googlesource.com/chromium/src/+/feabf3776925e38aab3e7f5eb20e90860cc49b71
>
> TBR=dalecurtis@chromium.org,chcunningham@chromium.org,emircan@chromium.org,mcasas@chromium.org,braveyao@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG= 638664 
>
> Review-Url: https://codereview.chromium.org/2832263003
> Cr-Commit-Position: refs/heads/master@{#466480}
> Committed: https://chromium.googlesource.com/chromium/src/+/36728e56fac466656a8504cbcbd573576b9c0bdb

TBR=dalecurtis@chromium.org,chcunningham@chromium.org,emircan@chromium.org,mcasas@chromium.org,braveyao@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 638664 

Review-Url: https://codereview.chromium.org/2834233002
Cr-Commit-Position: refs/heads/master@{#466762}

[modify] https://crrev.com/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
[modify] https://crrev.com/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8/content/renderer/media_recorder/media_recorder_handler.cc
[modify] https://crrev.com/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8/content/renderer/media_recorder/video_track_recorder.cc
[modify] https://crrev.com/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8/content/renderer/media_recorder/video_track_recorder.h
[modify] https://crrev.com/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8/content/renderer/media_recorder/video_track_recorder_unittest.cc
[modify] https://crrev.com/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8/content/test/BUILD.gn

Status: Fixed (was: Assigned)
Project Member

Comment 34 by bugdroid1@chromium.org, Apr 25 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9fa340544b3ede6f562f4eae5680b04b93e9884f

commit 9fa340544b3ede6f562f4eae5680b04b93e9884f
Author: perezju <perezju@chromium.org>
Date: Tue Apr 25 12:37:49 2017

Revert of Android: enable H264&VP8 HW accelerator for MediaRecorder (patchset #1 id:1 of https://codereview.chromium.org/2834233002/ )

Reason for revert:
Broke WebRtcMediaRecorderTest's on tablet bots.
 crbug.com/715069 

Original issue's description:
> Reland of Android: enable H264&VP8 HW accelerator for MediaRecorder (patchset #1 id:1 of https://codereview.chromium.org/2832263003/ )
>
> Reason for revert:
> Before this revert has landed, the bot went back to green, it's possible it's just a flake. gonna revert this revert for now
>
> https://build.chromium.org/p/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/11452
>
> Original issue's description:
> > Revert of Android: enable H264&VP8 HW accelerator for MediaRecorder (patchset #12 id:400001 of https://codereview.chromium.org/2801803002/ )
> >
> > Reason for revert:
> > The CL seem to be responsible for this failure: https://build.chromium.org/p/chromium.android/builders/Marshmallow%2064%20bit%20Tester/builds/11451
> >
> > Original issue's description:
> > > Android: enable H264&VP8 HW accelerator for MediaRecorder
> > >
> > > The HW encoding codes has been revised a bit recently and works pretty well now.
> > > This cl is to enable H264&VP8 HW accelerator for MediaRecorder on Android.
> > >
> > > BUG= 638664 
> > >
> > > Review-Url: https://codereview.chromium.org/2801803002
> > > Cr-Commit-Position: refs/heads/master@{#466414}
> > > Committed: https://chromium.googlesource.com/chromium/src/+/feabf3776925e38aab3e7f5eb20e90860cc49b71
> >
> > TBR=dalecurtis@chromium.org,chcunningham@chromium.org,emircan@chromium.org,mcasas@chromium.org,braveyao@chromium.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG= 638664 
> >
> > Review-Url: https://codereview.chromium.org/2832263003
> > Cr-Commit-Position: refs/heads/master@{#466480}
> > Committed: https://chromium.googlesource.com/chromium/src/+/36728e56fac466656a8504cbcbd573576b9c0bdb
>
> TBR=dalecurtis@chromium.org,chcunningham@chromium.org,emircan@chromium.org,mcasas@chromium.org,braveyao@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG= 638664 
>
> Review-Url: https://codereview.chromium.org/2834233002
> Cr-Commit-Position: refs/heads/master@{#466762}
> Committed: https://chromium.googlesource.com/chromium/src/+/acb8a289bdc8dccf1e4bd726a29f10b15ed281f8

TBR=dalecurtis@chromium.org,chcunningham@chromium.org,emircan@chromium.org,mcasas@chromium.org,braveyao@chromium.org,yolandyan@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 638664 

Review-Url: https://codereview.chromium.org/2844453003
Cr-Commit-Position: refs/heads/master@{#466955}

[modify] https://crrev.com/9fa340544b3ede6f562f4eae5680b04b93e9884f/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
[modify] https://crrev.com/9fa340544b3ede6f562f4eae5680b04b93e9884f/content/renderer/media_recorder/media_recorder_handler.cc
[modify] https://crrev.com/9fa340544b3ede6f562f4eae5680b04b93e9884f/content/renderer/media_recorder/video_track_recorder.cc
[modify] https://crrev.com/9fa340544b3ede6f562f4eae5680b04b93e9884f/content/renderer/media_recorder/video_track_recorder.h
[modify] https://crrev.com/9fa340544b3ede6f562f4eae5680b04b93e9884f/content/renderer/media_recorder/video_track_recorder_unittest.cc

Status: Assigned (was: Fixed)
Once mediaRecoder assumes that encoder initialization will always succeed(if HW codec fails to initialize, it will fall back to SW one and will always succeed.) It may be true for desktop platforms. But on Android, there is chance that no HW H264 is available and there is no SW H264 fallback. So the current error handler mechanism won't work if user specified H264, which causes the bots failures.

In previous cl I choose to let the recording will silently fail to such a situation, which kinda works in Chrome. But the failed unittests will fail due to insisting on recording results.

Before any conclusion is drawn, let's only enable VP8 HW accelerator for mediaRecorder first and consider adding H264 later.
Owner: ----
Status: Untriaged (was: Assigned)
Can't spend more time on this. And it's better to hand over to experts to fix some flaws in mediaRecorder first, as mentioned above.
Current status: 
- It's verified that both H264 and VP8 HW codec works well on supported devices, including the Nexus5 KitKat on which trybots run on.
- With few modifications, VP8 can be enabled easily, as shown in the reverted cl.
- After the flaws are fixed, H264 can be enabled too.
Labels: M-60
Owner: mcasas@chromium.org
Status: Assigned (was: Untriaged)
Cc: -niklase@chromium.org
Stripping cc list to the essentials.
Project Member

Comment 41 by bugdroid1@chromium.org, Apr 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/180f998580b636654b08b415fa33f00c441dc3d2

commit 180f998580b636654b08b415fa33f00c441dc3d2
Author: khushalsagar <khushalsagar@chromium.org>
Date: Sat Apr 29 01:15:59 2017

Revert of MediaRecorder: enable encode acceleration for VP8 in Android (patchset #1 id:40001 of https://codereview.chromium.org/2852583002/ )

Reason for revert:
Speculatively reverting since WebRtcMediaRecorderTest.PeerConnection tests on Marshmallow 64 bit Tester have become flaky since the patch landed.

Original issue's description:
> MediaRecorder: enable encode acceleration for VP8 in Android
>
> This is a refry of https://crrev.com/2801803002 (as pointed out
> in https://crrev.com/2836013006) that enables only VP8
> hardware encoding in Android.
>
> Tested via webrtc_media_recorder_browsertest.cc [1]
>
> [1] https://cs.chromium.org/chromium/src/content/browser/webrtc/webrtc_media_recorder_browsertest.cc?q=webrtc+mediarecorder&sq=package:chromium&dr=CSs&l=27
>
> BUG= 638664 
>
> Review-Url: https://codereview.chromium.org/2852583002
> Cr-Commit-Position: refs/heads/master@{#467879}
> Committed: https://chromium.googlesource.com/chromium/src/+/6089c73618b3b5010bdb81441c6f5f58936f9e58

TBR=emircan@chromium.org,mcasas@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 638664 

Review-Url: https://codereview.chromium.org/2846403002
Cr-Commit-Position: refs/heads/master@{#468204}

[modify] https://crrev.com/180f998580b636654b08b415fa33f00c441dc3d2/content/renderer/media_recorder/video_track_recorder.cc
[modify] https://crrev.com/180f998580b636654b08b415fa33f00c441dc3d2/content/renderer/media_recorder/video_track_recorder.h

Blockedon: 716691
Project Member

Comment 43 by bugdroid1@chromium.org, May 2 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8d39d3591545ff704fd5473451d873f9598fcb67

commit 8d39d3591545ff704fd5473451d873f9598fcb67
Author: mcasas <mcasas@chromium.org>
Date: Tue May 02 00:31:05 2017

RELAND: MediaRecorder: enable encode acceleration for VP8 in Android

This CL relands the CL described below that made an Android bot
flakily fail content_browsertests.  I could not repro the issue on
an emulator locally, but it seems like this test stresses too much
(see e.g. https://crbug.com/653864 where the test started failing
flakily for no apparent reason).

In any case, landing this CL while disabling the test makes sense
since the new functionality is stressed in a number of other
tests in WebRtcMediaRecorderTest.

Also BUG=716691

Original CL description ------------------------------------------------
MediaRecorder: enable encode acceleration for VP8 in Android

This is a refry of https://crrev.com/2801803002 (as pointed out
in https://crrev.com/2836013006) that enables only VP8
hardware encoding in Android.

Tested via webrtc_media_recorder_browsertest.cc [1]

[1] https://cs.chromium.org/chromium/src/content/browser/webrtc/webrtc_media_recorder_browsertest.cc?q=webrtc+mediarecorder&sq=package:chromium&dr=CSs&l=27

BUG= 638664 

Review-Url: https://codereview.chromium.org/2852583002
Cr-Commit-Position: refs/heads/master@{#467879}
Committed: https://chromium.googlesource.com/chromium/src/+/6089c73618b3b5010bdb81441c6f5f58936f9e58

patch from issue 2852583002 at patchset 40001 (http://crrev.com/2852583002#ps40001)

Review-Url: https://codereview.chromium.org/2855503002
Cr-Commit-Position: refs/heads/master@{#468505}

[modify] https://crrev.com/8d39d3591545ff704fd5473451d873f9598fcb67/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
[modify] https://crrev.com/8d39d3591545ff704fd5473451d873f9598fcb67/content/renderer/media_recorder/video_track_recorder.cc
[modify] https://crrev.com/8d39d3591545ff704fd5473451d873f9598fcb67/content/renderer/media_recorder/video_track_recorder.h

Project Member

Comment 44 by bugdroid1@chromium.org, May 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8faac4375f1b376408ebea82677278a745a7694d

commit 8faac4375f1b376408ebea82677278a745a7694d
Author: mcasas <mcasas@chromium.org>
Date: Wed May 03 00:38:30 2017

Media Recorder: enable VP9 hardware encoder in Android

Near trivial CL that enables using VP9 hardware encoding.

BUG= 638664 

Review-Url: https://codereview.chromium.org/2856653005
Cr-Commit-Position: refs/heads/master@{#468841}

[modify] https://crrev.com/8faac4375f1b376408ebea82677278a745a7694d/content/renderer/media_recorder/video_track_recorder.cc

Blockedon: -716691
Status: Fixed (was: Assigned)
Summary: MediaRecorder in Android not using Encode Accelerator for VP8/9 (was: MediaRecorder in Android not using Encode Accelerator)
Making a sister bug for H264, since there's no Sw-fallback
in Android, so I can close this bug for VP8 and VP9 and open
a specific one for H264 support.

So: 
- renaming this bug for VP8/9, 
- closing it
- makind a new bug for H264 (https://crbug.com/719024)
 -- itself blocked on Sw H264 encoder in Android (https://crbug.com/719024)




Sign in to add a comment