Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA SHIELD flicker green screen, when changeing two players between two views when playing Rec._709 color profile #7998

Open
fgl27 opened this issue Sep 27, 2020 · 10 comments
Assignees

Comments

@fgl27
Copy link

fgl27 commented Sep 27, 2020

Issue description

This issue is similar to my other #7996

I have a Picture Picture mode on my player, one full screen player one small over the full.

I allow to change with is the full or small on one click...

On the NVIDIA SHIELD I have a issue, that if I use PlayerView.setPlayer(SimpleExoPlayer); to change the players between the two views there is flicker green when the video is using Rec._709 color profile

From vlc I can get this information of the media file

Screenshot from 2020-09-28 17-54-29

Here is a video playing the Link to test content

https://www.youtube.com/watch?v=F1jRCm99sQc&feature=youtu.be

On the above one of the players is using the color profile Rec._709 after a few changes we have the issue only on that one

Unfortunately as we can see the problem is random and may also happen on another case...

This problem may also happen randomly after the player automatic changes the resolution/bitrate (do to a internet slowdown) when playing a master HLS playlist in adaptive bitrate mode.

Reproduction steps

Use the bellow or similar function to do the change

    private int pos = 1;

    private void SwitchPlayer() {
        Log.d(TAG, "SwitchPlayer");

        for (int i = 0; i < 2; i++) {

            PlayerView[i].setPlayer(player[i ^ pos]);

        }

        pos = pos ^ 1;
    }

Link to test content

https://github.com/fgl27/SmartTwitchTV/raw/master/release/githubio/temp/shield_test_clip.mp4

A full bug report captured from the device

bugreport-darcy-PPR1.180610.011-2020-09-28-17-59-39.zip

On the above I have added a log before the change

STTV_PlayerActivity: SwitchPlayer

When the problem happens we have on the log some device specific logs spam as the bellow:

09-27 14:44:19.298  3496  9437 D NvOsDebugPrintf: NvRmPrivFlush: NvRmChannelSubmit failed (err = 196623, SyncPointIdx = 38, SyncPointValue = 0)
09-27 14:44:19.298  3496  9437 I chatty  : uid=1046(mediacodec) omx@1.0-service identical 1 line

There is no Exo specific error on the logs after the problem happens, so is not possible to detect from the player that this has happens, ideally if was possible to detected the player could be restarted to fix the problem, as a release and restart of the player will fix it.

Version of ExoPlayer being used

dev-v2

Device(s) and version(s) of Android being used

NVIDIA SHIELD 2017 model
Android 9

@fgl27 fgl27 changed the title NVIDIA SHIELD flicker green screen, when changeing two players between two views NVIDIA SHIELD flicker green screen, when changeing two players between two views one using Rec._709 color profile Sep 28, 2020
@krocard krocard self-assigned this Oct 1, 2020
@krocard
Copy link
Contributor

krocard commented Oct 1, 2020

On the above one of the players is using the color profile Rec._709 after a few changes we have the issue only on that one

Unfortunately as we can see the problem is random and may also happen on another case...

This problem may also happen randomly after the player automatic changes the resolution/bitrate (do to a internet slowdown) when playing a master HLS playlist in adaptive bitrate mode.

If I understand correctly, the issue has been seen occuring after a surface change (especially if the color profile is Rec._709) but also on player resolution change.

Implementing the workaround suggested in #7996 (comment) should get rid PlayerView.setPlayer(SimpleExoPlayer). It should solve this issue too.

@andrewlewis have you ever seen this green flickering: https://www.youtube.com/watch?v=F1jRCm99sQc

@krocard krocard assigned andrewlewis and unassigned krocard Oct 1, 2020
@fgl27
Copy link
Author

fgl27 commented Oct 1, 2020

On the above one of the players is using the color profile Rec._709 after a few changes we have the issue only on that one
Unfortunately as we can see the problem is random and may also happen on another case...
This problem may also happen randomly after the player automatic changes the resolution/bitrate (do to a internet slowdown) when playing a master HLS playlist in adaptive bitrate mode.

If I understand correctly, the issue has been seen occuring after a surface change (especially if the color profile is Rec._709) but also on player resolution change.

Implementing the workaround suggested in #7996 (comment) should get rid PlayerView.setPlayer(SimpleExoPlayer). It should solve this issue too.

@andrewlewis have you ever seen this green flickering: https://www.youtube.com/watch?v=F1jRCm99sQc

Please see #7996 (comment), same test I did there changing the size using setLayoutParams was done here and the issue also happens.

Regarding the "especially if the color profile is Rec._709' no only if.

In vlc the streams that don't cause this issue don't display any info on the color used I assume is just basic avc format (don't know the type) see a none Rec._709 streams show like this in vlc, if need I can share a file of the below content.

Screenshot from 2020-10-01 07-06-41

@andrewlewis
Copy link
Collaborator

@andrewlewis have you ever seen this green flickering: https://www.youtube.com/watch?v=F1jRCm99sQc

I don't recall seeing this before. It looks like a device-specific issue that Nvidia would need to investigate. @sureshcnvidia may be able to help.

The repeated logging about E HWComposer: getLayerReleaseFence failed for display -1: Invalid display looks suspicious too.

If you have two players each outputting to a SurfaceView, lock them to the highest bitrate to prevent adaptation and then handle full-screen by a z-order + layout change to swap the position/depth of the two views (no interaction with the players) does the issue still reproduce?

@fgl27
Copy link
Author

fgl27 commented Oct 1, 2020

If I use just setLayoutParams to the two playerViews changing the layout of one with the other, then after parent.bringChildToFront(playerView_nowSmall);...

After a few tries the player that has Rec._709 will have the issue, same as using setPlayer

@fgl27
Copy link
Author

fgl27 commented Oct 2, 2020

After better understanding the issue #7996 I discover that what was causing the flicker green screen when just changing the layout was the way I was fixing the z order like this

playerView_parent.bringChildToFront(playerView);
playerView.setVisibility(View.GONE);
playerView.setVisibility(View.VISIBLE);

By not doing that, using the bellow the problem will not happen.

SurfaceView_Small.setZOrderMediaOverlay(true);
SurfaceView_Full.setZOrderMediaOverlay(false);

SurfaceView_Small is the SurfaceView of the small player that must stay on top, the SurfaceView_Full is the background full screen player, as I allow to dynamically change with will be the full/small I have to do that all the time not just once...

This problem only happens very randomly when the adaptive mode changes the playlist do to bitrate/internet slowdowns (as I explain on first post), the adaptive mode changes is very rare and hard to test, then the issue happens when using the playerView.setPlayer(player); during playback to reuse a player from one view to another when the video be played uses using Rec._709 color profile.

@fgl27
Copy link
Author

fgl27 commented Oct 13, 2020

I made an app based on the demo app for testing this issue

Here is the apk

https://drive.google.com/file/d/1iEoN_ZxEyPvsbai5Tz9JFnEJ73RRibXM/view?usp=sharing

The source repo

https://github.com/fgl27/ExoPlayer/commits/dev-v2_nvidia_test

The source zip

https://drive.google.com/file/d/1rgXtNX39WUxh3xtxT6p4r8k6NMOBVhDN/view?usp=sharing

The change

fgl27@6784795

This was the head of ExoPlayer dev-v2 branch on the day of the above change

https://github.com/google/ExoPlayer/commits/9753c3fcfb2e2e7fd878666c3f8aa11cbee9728f

Here is the result on the device

https://www.youtube.com/watch?v=WpF9Zr0pods

Basically what that app does is change the playerView visibility to GONE and back to VISIBLE after 1 second of Player.STATE_READY then keeps doing again and again it 1 seconds, that is the simple way to reproduce the error if NVIDIA can fix that problem all other cases will be gone, I can properly retest all the cases the day the device OS gets an update.

So please share the issue with NVIDIA.

@fgl27
Copy link
Author

fgl27 commented Jan 5, 2021

The problem persist, there will be any update on this?

I have made the APK share all that was asked, but didn't received any feedback.

@fgl27 fgl27 changed the title NVIDIA SHIELD flicker green screen, when changeing two players between two views one using Rec._709 color profile NVIDIA SHIELD flicker green screen, when changeing two players between two views when playing Rec._709 color profile Jan 5, 2021
@fgl27
Copy link
Author

fgl27 commented Feb 11, 2021

The problem persist, there will be any update on this?

I have made the APK share all that was asked, but didn't received any feedback.

Noting? 😕

@andrewlewis
Copy link
Collaborator

Sorry for the delay. I will try to look at this again soon.

@andrewlewis
Copy link
Collaborator

I can reproduce this and have filed a bug to ask Nvidia to take a look [Internal: b/180278815]. I will let you know if/when we hear an update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants