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

Issue 615272 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocked on:
issue 615265
issue 616680
issue 617811



Sign in to add a comment

[H264] Apprtc loopback call video freezes on device Big and Blaze with H264

Project Member Reported by srcv@chromium.org, May 27 2016

Issue description

Chrome Version: 52.0.2743.0 / 8350.2.0 dev
Devices : Big, Blaze

What steps will reproduce the problem?
(1) Join an apprtc loopback call from device Big using https://appr.tc/?debug=loopback&vsc=h264
(2) Open chrome://webrtc-internals in a separate tab 
(3) Expand Stats Tables -> ssrc_send video
(4) Alternatively, in the apprtc lopback call, see the codec type in the call info overlay, accessed via keyboard shortcut ā€œiā€.
(5) Observe that both webrtc-internals and call overlay shwo the codec name as H264

What is the expected output?
Audio and video should be clear without any freezes

What do you see instead?
1) Remote video starts after 30 sec -1min after loopback call is started
2) Remote video freezes as soon as it starts

Notes:
1. This issue is not seen with Apprtc peer2peer calls on device Big with H264
2. Feedback submitted for this issue:
https://feedback.corp.google.com/product/208/neutron?lView=rd&lRSort=1&lROrder=2&lRFilter=1&lReportSearch=user:srcv&lReport=9279171748
3. This issue is also observed on device Blaze 


 
Labels: -Pri-2 Pri-1
Owner: niklase@chromium.org
Status: Assigned (was: Untriaged)
Thanks for the report! Big and Blaze are part of the same device "family;" do you see similar freezes on any other ChromeOS device?

niklase@ - while we wait for a response to that question from srcv@, can you find someone to look into this? You should be able to borrow a Big or Blaze from srcv@ when she gets into the office.
Owner: emir...@chromium.org

Comment 4 by srcv@chromium.org, May 27 2016

This issue is so far seen only on Big and Blaze. I will update this bug if this issue is seen on any other devices.
Cc: wuchengli@chromium.org posciak@chromium.org
Components: OS>Kernel>Video
Ranjani, is this a regression from M51?
Could you please confirm the following: this is reproducible on H264 apprtc loopback when sending H264, but not with peer2peer apprtc when also sending H264, and from the same device?

The histograms show a mix of VP8 and H264 for encoder profile, is it possible that peer2peer was using VP8 when it worked?
Labels: VideoShortList ReleaseBlock-Beta
Looks like we are hitting a NOTREACHED() in https://chromium.googlesource.com/chromium/src/+blame/master/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc#230.

This was last modified by emircan@ in crrev.com/379932. Could also be related to how formats are handled in VideoFrame after crrev.com/379932? Tentatively adding release block based on severity.
Status: Started (was: Assigned)
I will take a look at this tomorrow when I have access to Blaze. 

posciak@, that CL adds YV12A to the accepted formats, and the check has been there already. Is there smt different for this device family that would cause capture of a different format than the listed?
https://codereview.chromium.org/1737253002/diff/160001/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
Regarding #6, this is isn't reproducible with VP8/VP9. Only H264 has the problems: remote video starts playing after ~30 seconds, pushes 1~2 frames and freezes.

posciak@, note that we recently enabled HW H264 encode with the below CL. Earlier on, it was only enabled for extensions. Now, it is enabled by default when SW fallback is available. 
https://codereview.chromium.org/1972333002/
 
Here is some logs from Blaze with ToT.
https://paste.googleplex.com/5782678435528704

It looks like a number of buffers are enqueued in v4l2_video_encode_accelerator, but doesn't get dequeued(), destroyed right before.
Cc: -wuchengli@chromium.org
Owner: wuchengli@chromium.org
Looking at l.854 in the logs above, this fails with kInvalidArgumentError. Looks very much like  issue 614641 .

wuchengli@, can you PTAL? 
Cc: fsam...@chromium.org
Some new logs: https://paste.googleplex.com/6302221352304640

l.678 [1:12:0531/183710:VERBOSE3:gpu_video_encode_accelerator_host.cc(85)] Initialize
l.706 [1:12:0531/183711:ERROR:gpu_video_encode_accelerator_host.cc(106)] Send(GpuCommandBufferMsg_CreateVideoEncoder()) failed

This is interesting that after destroy, we aren't able to send messages to GPU service. Adding fsamuel@ as well.

Owner: emir...@chromium.org
Sorry. I'll be OOO during Jun 3-12. I still need to fix several issues tomorrow. Can you revert CL https://codereview.chromium.org/1972333002 and merge to M52 first? Then we'll find someone to look at the freeze issue.

Comment 14 by srcv@chromium.org, Jun 1 2016

rohitbm@:

This issue is not a regression from M51 as H264 support is introduced with M52.
emircan@: will you revert the CL and request a merge as we go beta next Tue?
Blockedon: 615265
I prepared a CL for revert here: https://codereview.chromium.org/2030833002/ It will request a merge once it lands.
 
In the meantime, I made some more progress in debugging:
- When VEA is reset due to resizing, we see a crash in gpu process. I added more logging and found out that the crash comes when destructing TegraV4L2Device. See l.1006 in https://paste.googleplex.com/4560652328763392. I will add a bug for it now.
- When resize issue eliminated by hardcoding the size, we still cannot see the encoded frames in AppRTC loopback. However, when I open a connection with a remote client(Mac OSX), I can see that encoded frames reach there and get decoded and rendered properly. This is probably the same underlying reason as  issue 615265 .
Blockedon: 616680
Thanks. 

https://appr.tc/?debug=loopback&vsc=h264: is this only app side change or change in M52 WebRTC as well?
For M52 we enabled HW H264 encode by default. Earlier on it was enabled only for extensions. See comment 9. 
Thanks, emircan@ for the details!
Project Member

Comment 21 by bugdroid1@chromium.org, Jun 3 2016

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

commit d7e93a2d1bae10c260230a1de7c5d9f1f0272d03
Author: emircan <emircan@chromium.org>
Date: Fri Jun 03 02:48:10 2016

Revert "Use kEnableWebRtcHWH264Encoding flag when SW fallback is available"

Because we came across issues in some CrOS platforms in HW H264 encode,
we decided to revert this CL such that HW H264 is only enabled for MacOSX.
Please see the bug below for details.

BUG= 615272 

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

[modify] https://crrev.com/d7e93a2d1bae10c260230a1de7c5d9f1f0272d03/content/renderer/media/rtc_video_encoder_factory.cc

Labels: Merge-Request-52

Comment 23 by pbos@chromium.org, Jun 3 2016

Cc: holmer@chromium.org
holmer@ do you want to use this bug for the freezes in:

https://bugs.chromium.org/p/webrtc/issues/detail?id=5675#c27

Since they hit software as well.
Labels: Merge-Approved-52
I tested with the revert patch to see how things go with SW H264 encode. 

Now what I see is that HW H264 Decode is having an issue, namely hitting a WeakPtr DCHECK as you can see on https://paste.googleplex.com/6523866897711104. When I disable it in code, SW decode H264 works properly. posciak@ can you PTAL?
Labels: -Merge-Approved-52
Labels: Merge-Approved-52
Project Member

Comment 28 by bugdroid1@chromium.org, Jun 3 2016

Labels: -merge-approved-52 merge-merged-2743
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c91c0dba98b29249bb41ad1bda1702f76ba0048a

commit c91c0dba98b29249bb41ad1bda1702f76ba0048a
Author: emircan <emircan@chromium.org>
Date: Fri Jun 03 21:47:57 2016

Revert "Use kEnableWebRtcHWH264Encoding flag when SW fallback is available"

Because we came across issues in some CrOS platforms in HW H264 encode,
we decided to revert this CL such that HW H264 is only enabled for MacOSX.
Please see the bug below for details.

BUG= 615272 

Review-Url: https://codereview.chromium.org/2030833002
Cr-Commit-Position: refs/heads/master@{#397601}
(cherry picked from commit d7e93a2d1bae10c260230a1de7c5d9f1f0272d03)

NOTRY=true
NOPRESUBMIT=true
TBR=mcasas@chromium.org

Review-Url: https://codereview.chromium.org/2041543002
Cr-Commit-Position: refs/branch-heads/2743@{#213}
Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939}

[modify] https://crrev.com/c91c0dba98b29249bb41ad1bda1702f76ba0048a/content/renderer/media/rtc_video_encoder_factory.cc

Comment 29 by tin...@google.com, Jun 3 2016

Labels: -Merge-Request-52 Merge-Review-52 Hotlist-Merge-Review
[Automated comment] Reverts referenced in bugdroid comments, after merge request, needs manual review.
Cl has been reverted. Will remove beta-blocker label.
Labels: -ReleaseBlock-Beta

Comment 32 by srcv@chromium.org, Jun 6 2016

Blockedon: 617811
As emircan@ mentioned in Comment#25, this issue is not seen on device Blaze when "Hardware-accelarated video decode Mac, Windows, chrome OS" flag is disabled in chrome://flags. Filed a separate bug for this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=617811
 


Status: Fixed (was: Started)
Cc: sprang@chromium.org
sprang@ FYI
Status: Verified (was: Fixed)
Verified in M52-(8350.38.0) 52.0.2743.49
Status: Fixed (was: Verified)
Changing the status to Fixed for Ranjani to verify this as she knows more about the problem :-)

Comment 37 by srcv@chromium.org, Jun 23 2016

Status: Verified (was: Fixed)
Tested AppRTC loopback calls with H264 on devices Big, Blaze and Kitty with M52 52.0.2743.50 / 8350.39.0 beta and verified that there are no video freezes during apprtc calls with H264.

URL used :  https://appr.tc/?debug=loopback&vsc=h264

WebRTC internal dump from devices Big, Blaze and Kitty:
https://pantheon.corp.google.com/storage/browser/chromiumos-test-logs/bugfiles/cr/615272/cr_615272_verification_logs/

Sign in to add a comment