-
Notifications
You must be signed in to change notification settings - Fork 361
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
TimestampWrapper Effect with exoPlayer.setVideoEffects causes crash #821
Comments
Any updates , is it possible to use |
The team is looking into the issue, no updates yet |
Thanks for the bug report. It seems Sorry, I'm not sure we'll be able to prioritize this in Q42023, but hope we can take a look at this next quarter. In the meantime, I'll update javadoc for the class to mention that it shouldn't be used in More information on this specific issue: |
@dway123 thanks for the info please check if exoplayer supports other effects which can be used with transformer, we have not checked all of them however if its tested it will be helpful |
Mentioned in #821 PiperOrigin-RevId: 585595948
Mentioned in androidx/media#821 PiperOrigin-RevId: 585595948
All geometric-only (ex. MatrixTransformation-based) effects work with exoplayer.setVideoEffects, and I believe most effects in general should work with exoplayer.setVideoEffects. I suspect that only Otherwise, color effects don't work with exoplayer+HDR input easily, due to these effects not supporting HDR input, and exoplayer not having an easy way to setVideoEffects while customizing the output color to be SDR. Because of this, these effects (code search link) are not supported, unless you force only having SDR output, by following instructions like seen here: Brightness, HSL, Overlay, and ColorLut. |
fixes #821 PiperOrigin-RevId: 626407880
Version
Media3 1.2.0
More version details
TimestampWrapper Effect with exoPlayer.setVideoEffects causes crash
I am trying this code
When we try to use
createOverlayEffect()
directly the video is rendered , however it causes a crash when we try to useTimestampWrapper
this is the error logPlayback error androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(null, null, null, video/raw, null, -1, null, [0, 0, -1.0, null], [-1, -1]), format_supported=NO_UNSUPPORTED_TYPE at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:608) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: androidx.media3.exoplayer.video.VideoSink$VideoSinkException: androidx.media3.common.VideoFrameProcessingException: java.lang.IllegalStateException: Textures are all in use. Please release in-use textures before calling useTexture. at androidx.media3.exoplayer.video.CompositingVideoSinkProvider$VideoSinkImpl.lambda$onError$0$androidx-media3-exoplayer-video-CompositingVideoSinkProvider$VideoSinkImpl(CompositingVideoSinkProvider.java:462) at androidx.media3.exoplayer.video.CompositingVideoSinkProvider$VideoSinkImpl$$ExternalSyntheticLambda2.run(Unknown Source:4) at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31) at androidx.media3.exoplayer.video.CompositingVideoSinkProvider$VideoSinkImpl.onError(CompositingVideoSinkProvider.java:451) at androidx.media3.effect.SingleInputVideoGraph$1.lambda$onError$2$androidx-media3-effect-SingleInputVideoGraph$1(SingleInputVideoGraph.java:143) at androidx.media3.effect.SingleInputVideoGraph$1$$ExternalSyntheticLambda0.run(Unknown Source:4) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.os.HandlerThread.run(HandlerThread.java:67) Caused by: androidx.media3.common.VideoFrameProcessingException: java.lang.IllegalStateException: Textures are all in use. Please release in-use textures before calling useTexture. at androidx.media3.effect.VideoFrameProcessingTaskExecutor.handleException(VideoFrameProcessingTaskExecutor.java:224) at androidx.media3.effect.VideoFrameProcessingTaskExecutor.lambda$wrapTaskAndSubmitToExecutorService$2$androidx-media3-effect-VideoFrameProcessingTaskExecutor(VideoFrameProcessingTaskExecutor.java:210) at androidx.media3.effect.VideoFrameProcessingTaskExecutor$$ExternalSyntheticLambda2.run(Unknown Source:6) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) Caused by: java.lang.IllegalStateException: Textures are all in use. Please release in-use textures before calling useTexture. at androidx.media3.effect.TexturePool.useTexture(TexturePool.java:89) at androidx.media3.effect.BaseGlShaderProgram.queueInputFrame(BaseGlShaderProgram.java:144) at androidx.media3.effect.TimestampWrapperShaderProgram.queueInputFrame(TimestampWrapperShaderProgram.java:84) at androidx.media3.effect.FrameConsumptionManager.lambda$queueInputFrame$1$androidx-media3-effect-FrameConsumptionManager(FrameConsumptionManager.java:96) at androidx.media3.effect.FrameConsumptionManager$$ExternalSyntheticLambda1.run(Unknown Source:6) at androidx.media3.effect.VideoFrameProcessingTaskExecutor.lambda$wrapTaskAndSubmitToExecutorService$2$androidx-media3-effect-VideoFrameProcessingTaskExecutor(VideoFrameProcessingTaskExecutor.java:208) at androidx.media3.effect.VideoFrameProcessingTaskExecutor$$ExternalSyntheticLambda2.run(Unknown Source:6) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:463) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) 2023-11-18 11:26:57.219 1262-3355 WindowManager system_server E win=Window{3c1e04c u0 com.trywork.video.MainActivity} destroySurfaces: appStopped=true cleanupOnResume=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8 caller=com.android.server.wm.ActivityRecord.destroySurfaces:6776 com.android.server.wm.ActivityRecord.destroySurfaces:6757 com.android.server.wm.ActivityRecord.notifyAppStopped:6821 com.android.server.wm.ActivityRecord.activityStopped:7427 com.android.server.wm.ActivityClientController.activityStopped:263 android.app.IActivityClientController$Stub.onTransact:621 com.android.server.wm.ActivityClientController.onTransact:141
Devices that reproduce the issue
Samsung Galaxy tab A7 lite Android 13
Devices that do not reproduce the issue
did no try
Reproducible in the demo app?
Yes
Reproduction steps
just try code from this or any other simple video playback example from exoplayer
https://www.youtube.com/watch?v=Hw0Jeq42FNU&t=315s
and added the above code for effects
First try the simple exoPlayer.setVideoEffects(createOverlayEffect()) the video plays perfectly
Then try
this will crash the app
Expected result
video should render with overlay for the selected duration in
imeWrappedEffect
Actual result
video doesnot render and app crashed after that
Media
https://www.youtube.com/api/manifest/dash/id/bf5bb2419360daf1/source/youtube?as=fmp4_audio_clear,fmp4_sd_hd_clear&sparams=ip,ipbits,expire,source,id,as&ip=0.0.0.0&ipbits=0&expire=19000000000&signature=51AF5F39AB0CEC3E5497CD9C900EBFEAECCCB5C7.8506521BFC350652163895D4C26DEE124209AA9E&key=ik0]
it is the same url used in the example shared by google itself in the video on youtube the link of which I have shared above
Bug Report
adb bugreport
to [email protected] after filing this issue.The text was updated successfully, but these errors were encountered: