androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.68k stars 399 forks source link

player.setVideoEffects() doesnot work with GLSurfaceView #1186

Closed omkarsurya closed 3 weeks ago

omkarsurya commented 7 months ago

Version

Media3 main branch

More version details

exoplayer:1.3.0 media3-transformer:1.3.0

Devices that reproduce the issue

Samsung Galaxy Tab A7 lite

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps

  1. use the GLsurfaceview Demo
  2. add the MatrixTransformationFactory from the Transformer demo code
  3. add the effects using ImmutableList.Builder<Effect> effects = new ImmutableList.Builder<>(); effects.add(MatrixTransformationFactory.createSpin3dEffect()); player.setVideoEffects(effects.build()); after player.prepare
  4. if we comment the player.setVideoEffects(effects.build()); the video plays other wise it wont play

Expected result

video should play with the applied effect and the bitmap overlay provided by the demo app

Actual result

video does not play it is stuck at 0

Media

not applicable

Bug Report

andrewlewis commented 7 months ago

Please could you add more info about why you need GLSurfaceView support, instead of just using SurfaceView? We can look into why it's not working, but it should also be possible to avoid the overhead of having two GL contexts set up. The extra functionality that GLSurfaceView adds on top of SurfaceView is generally unnecessary when using setVideoEffects.

omkarsurya commented 7 months ago

I want to add some custom implementation of GLsurfaceview like say PIP video to show so video effects, while I know that GlEffects can be applied to exoplayer, there are various limitations of ExoPlayer.setVideoEffects() also the preview of the effects, is not available, I have raised a separate issue for that here In my example say I want to implement an effect with GLsurfaceview and aMatrixTransformationFactory.createSpin3dEffect() the video just doesnot play.

The Limitation of explayer to display various effects while live editing over a timeline which is a basic feature of any video editing app is my primary requirement So I decided to use both GLsurfaceview and MatrixTransformationFactory.createSpin3dEffect() but came across this bug

droid-girl commented 2 months ago

We recommend waiting for CompositionPlayer APIs that will support this use case.