-
Notifications
You must be signed in to change notification settings - Fork 379
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
No video played when setVideoEffects
called on NVIDIA Shield
#1620
Comments
I didn't see an example in the demo apps that used |
I was wondering what output is connected to this? Is it a PlayerView? Can you help me double check a few things, adding logs to show the variables related to resolutions at media/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/video/MediaCodecVideoRenderer.java Line 863 in b01c6ff
and media/libraries/effect/src/main/java/androidx/media3/effect/FinalShaderProgramWrapper.java Line 366 in b01c6ff
And log if this line is executed: media/libraries/effect/src/main/java/androidx/media3/effect/FinalShaderProgramWrapper.java Line 409 in b01c6ff
|
Hi @claincly!
Yes, defined very simply: <?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.media3.ui.PlayerView
android:id="@+id/player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
Here are the logs when executing with
Here are the logs when executing without
|
@claincly, is there any other information I can provide to help debug this? Any ideas on if there is a work around? I tried sending the |
I wonder if you could log on this line? media/libraries/effect/src/main/java/androidx/media3/effect/FinalShaderProgramWrapper.java Line 409 in b01c6ff
The resolution logs look correct. You might noticed some discrepancies between with/without video effects, but that's expected. |
Hi @claincly, here are some logs from in that method. Thoughts?
|
Hmmm that is indeed very strange - I mean if I also noticed you mentioned you didn't try reproducing using the demo app, could you try using the demo app and see it reproduces? I just wanted to rule out any unrelated reasons. |
The no video issue is reproducible in the basic demo app with a change to import the I tried on another NVIDIA shield device (2017 model) and the issue is reproducible there as well. I also tried the Here is the patch just in case: diff --git a/demos/main/build.gradle b/demos/main/build.gradle
index 6a49adf169..78a43f180b 100644
--- a/demos/main/build.gradle
+++ b/demos/main/build.gradle
@@ -85,6 +85,7 @@ dependencies {
implementation project(modulePrefix + 'lib-ui')
implementation project(modulePrefix + 'lib-datasource-cronet')
implementation project(modulePrefix + 'lib-exoplayer-ima')
+ implementation project(modulePrefix + 'lib-effect')
withDecoderExtensionsImplementation project(modulePrefix + 'lib-decoder-av1')
withDecoderExtensionsImplementation project(modulePrefix + 'lib-decoder-ffmpeg')
withDecoderExtensionsImplementation project(modulePrefix + 'lib-decoder-flac')
diff --git a/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java b/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java
index 6be37323bd..2b3c11977a 100644
--- a/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java
+++ b/demos/main/src/main/java/androidx/media3/demo/main/PlayerActivity.java
@@ -258,7 +258,7 @@ public class PlayerActivity extends AppCompatActivity
/**
* @return Whether initialization was successful.
*/
- protected boolean initializePlayer() {
+ @OptIn(markerClass = UnstableApi.class) protected boolean initializePlayer() {
Intent intent = getIntent();
if (player == null) {
@@ -279,6 +279,7 @@ public class PlayerActivity extends AppCompatActivity
player.addAnalyticsListener(new EventLogger());
player.setAudioAttributes(AudioAttributes.DEFAULT, /* handleAudioFocus= */ true);
player.setPlayWhenReady(startAutoPlay);
+ player.setVideoEffects(new ArrayList<>());
playerView.setPlayer(player);
configurePlayerWithServerSideAdsLoader();
debugViewHelper = new DebugTextViewHelper(player, debugTextView); |
Interesting find. You are correct the debug preview is not a PlayerView (I think it's just a SurfaceView). The only difference I can think of is we call Although I don't recommend it, could you try commenting that line out and see if the video plays? media/libraries/effect/src/main/java/androidx/media3/effect/FinalShaderProgramWrapper.java Lines 437 to 442 in c35a9d6
|
Commenting out the I also tried updating to |
One last thing to try - Nvidia might have very customized OpenGL stack), Adding change the color to something like red in media/libraries/common/src/main/java/androidx/media3/common/util/GlUtil.java Lines 554 to 555 in c35a9d6
|
No change
Screen is still black! |
Version
Media3 1.4.0
More version details
Calling
player.setVideoEffects()
with any effects or even an empty list results in no video (just black screen).I reviewed the requirements for this to work and they all seem met:
androidx. media3.ui.PlayerView
media-effect
lib is addedplayer.getRenderer
and the only video one isMediaCodecVideoRenderer
prepare()
I guess it must be a hardware decoding issue, but I'm not sure how to validate. There's nothing obviously erroring in the logs.
Bare-bones code that causes the issue:
Devices that reproduce the issue
Devices that do not reproduce the issue
Reproducible in the demo app?
Not tested
Reproduction steps
setVideoEffects
on the ExoPlayer object (even with an empty list)Expected result
Video plays successfully with effects applied or if no effects added at least the video plays normally
Actual result
Video playback is a black screen.
Audio plays as expected.
Media
https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: