UnityPlugin-AVProVideo icon indicating copy to clipboard operation
UnityPlugin-AVProVideo copied to clipboard

Last frame of the last viewed video is displayed on the next video

Open SlavomirDev opened this issue 1 year ago • 2 comments

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

Our setup:

  • Unity 2022.3.24f:
  • AVPro Video version 3.0.8 ultra:
  • Android:
  • Any android device and also any Meta Quest:
  • Any:

How to Reproduce

  1. Open any video;
  2. Close this video on any time
  3. Open new video

SlavomirDev avatar Aug 12 '24 14:08 SlavomirDev

  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?

Chris-RH avatar Aug 16 '24 12:08 Chris-RH

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.

SlavomirDev avatar Aug 16 '24 15:08 SlavomirDev

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.

thesanketkale avatar Aug 30 '24 12:08 thesanketkale

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.

MorrisRH avatar Sep 02 '24 09:09 MorrisRH

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.

thesanketkale avatar Sep 02 '24 12:09 thesanketkale

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

Ste-RH avatar Sep 06 '24 14:09 Ste-RH

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?

thesanketkale avatar Sep 07 '24 13:09 thesanketkale

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

MorrisRH avatar Sep 10 '24 14:09 MorrisRH

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

Ste-RH avatar Sep 12 '24 16:09 Ste-RH

Yeah, this fixed. I was testing in 3.1.3 version. Thanks!

SlavomirDev avatar Dec 11 '24 15:12 SlavomirDev