RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
233 stars 28 forks source link

[Android] Last frame of the last viewed video is displayed on the next video #1965

Open SlavomirDev opened 1 month ago

SlavomirDev commented 1 month ago

Describe the issue When opening the video, the last frame from the previous viewed video is shown for about 2 Unity frames

Our setup:

How to Reproduce

  1. Open any video;
  2. Close this video on any time
  3. Open new video
Chris-RH commented 4 weeks ago
  1. Are you opening and closing the video in the same mediaplayer component?
  2. Have you tried using our playlist feature?
  3. Is this playing local videos or streaming?
  4. Is this Exoplayer or Android mediaplayer?
  5. Can you reproduce this in the editor?
  6. Is this reproducible in a new project running the demo scene and as little changes as possible?
  7. Are you able to provide a full, unfiltered logcat in txt format?
SlavomirDev commented 3 weeks ago

Hi Chris! I want to note that I upgraded from version 2.7.3 to 3.0.8 and it worked for me in 2.7.3 version, and in 3 this problem appeared

But now about your questions:

  1. Yes. It's the same component;
  2. No, i don't need it;
  3. Streaming;
  4. ExoPlayer;
  5. No. This is a bug only on the Android;
  6. No, i didn't check on it. And still it only reproduced on Android;
  7. Unfortunately not.
thesanketkale commented 2 weeks ago

Hi @Chris-RH, I am facing the same issue on Android. Like @SlavomirDev, it used to work back in v2.9.3 but not in 3.0.8. Is there any new API that can clean the DisplayUGUI render image or the media player cache?

Need some fix or a workaround for an app update.

MorrisRH commented 1 week ago

Using OpenGL ES3 as the renderer, set the media player's texture mode to YCbCr420 OES as this does not require textures to be created internally so when CloseMedia is called no texture will be produced.

We're looking into how we can make this work with the BGRA texture mode and Vulkan renderers but this is not a trivial change.

thesanketkale commented 1 week ago

Using OpenGL ES3 as the renderer, set the media player's texture mode to YCbCr420 OES as this does not require textures to be created internally so when CloseMedia is called no texture will be produced.

Hey @MorrisRH, thanks for sharing the workaround.

I tried changing the texture mode but the issue persists. I think in my case I am not calling CloseMedia on the previous video before switching to the next video. Could that be the cause?

If possible please take up the fix soon as it's a blocker for us in using the latest version of AVPro which we just purchased a couple of days ago.

Ste-RH commented 1 week ago

AVPro Video v3.0.10 has now been released. Do let us know if this fixes the issue for you.

thesanketkale commented 6 days ago

I tried the v3.0.10 but the issue persists for me.

By the way, I have HLS-encoded videos (.m3u8) streaming in the media player. I am switching the URL on the next button click after stopping the previous video and then playing the next video. Do I need to do something different to solve this?

MorrisRH commented 3 days ago

This has now been fixed and will make it into the next release (version 3.0.11).

Ste-RH commented 23 hours ago

@SlavomirDev @thesanketkale AVPro Video v3.0.11 has now been released. Do let us know if this fixes the issue for you.