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

An error occurred while playing the video on the PC virtual machine #1960

Open MYR1105d opened 1 month ago

MYR1105d commented 1 month ago

Describe the issue An error occurred while playing the video on the PC virtual machine. The video is loaded locally using the StreamingAsset method.But it runs normally on a standard Android device.

Your Setup (please complete the following information):

Logs

Exception: AndroidJavaException: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.DefaultCompany.StudyProject-1/lib/arm/libAVProVideo2Native.so" has unexpected e_machine: 40

java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.DefaultCompany.StudyProject-1/lib/arm/libAVProVideo2Native.so" has unexpected e_machine: 40
java.lang.Runtime.loadLibrary0(Runtime.java:989)
java.lang.System.loadLibrary(System.java:1562)
com.renderheads.AVPro.Video.Manager.<clinit>(SourceFile)
com.unity3d.player.UnityPlayer.nativeRender(Native Method)
com.unity3d.player.UnityPlayer.access$300(Unknown Source)
com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source)
android.os.Handler.dispatchMessage(Handler.java:98)
android.os.Looper.loop(Looper.java:154)
com.unity3d.player.UnityPlayer$e.run(Unknown Source)
UnityEngine.AndroidJNISafe.CheckException () (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJNISafe.NewObject (System.IntPtr clazz, System.IntPtr methodID, UnityEngine.jvalue[] args) (at <00000000000000000000000000000000>:0)
UnityEngine.AndroidJavaObject._AndroidJavaObject (System.String className, System.Object[] args) (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.PlatformMediaPlayer+Native.AVPPluginBootstrap () (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.PlatformMediaPlayer..cctor () (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.MediaPlayer.CreateMediaPlayer () (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.MediaPlayer.Start () (at <00000000000000000000000000000000>:0)
Rethrow as TypeInitializationException: The type initializer for 'RenderHeads.Media.AVProVideo.PlatformMediaPlayer' threw an exception.
RenderHeads.Media.AVProVideo.MediaPlayer.CreateMediaPlayer () (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.MediaPlayer.Initialise () (at <00000000000000000000000000000000>:0)
RenderHeads.Media.AVProVideo.MediaPlayer.Start () (at <00000000000000000000000000000000>:0)
Chris-RH commented 1 month ago

What device are you running it on? What VM are you using?

MYR1105d commented 1 month ago

It's the pc Android emulator.

Chris-RH commented 1 month ago

What hardware are you running? Which OS version? Which android emulator software are you running? What device are you trying to emulate?

MYR1105d commented 1 month ago

Using Windows 10 system, some Android simulators have some problems, such as: night God simulator, thunder simulator, simulator website: https://www.yeshen.com, https://www.ldmnq.com/?n=401674

Chris-RH commented 1 month ago

Are you saying that some simulators are working? Have you tried the simulator in Android Studio? Is there a reason that you are testing on simulators rather than actual devices?

MYR1105d commented 1 month ago

Android Studio has not been tried, but tested on the emulator because some players will use the emulator to play.

buoutuanzi commented 1 month ago

Also found it crash in MUMU simulator https://mumu.163.com/

Chris-RH commented 1 month ago

The problem is that our asset is designed to be used on physical devices, not emulators. Android Studio android simulator is ok for doing some testing on, but the end target should be a physical device. Is there a reason that you are not targeting the platforms that they are using emulators on?

buoutuanzi commented 1 month ago

The problem is that our asset is designed to be used on physical devices, not emulators. Android Studio android simulator is ok for doing some testing on, but the end target should be a physical device. Is there a reason that you are not targeting the platforms that they are using emulators on?

Those who are not familiar with PC tend to choose using an emulator to play the mobile version of the game rather than downloading the PC version, so we hope to support emulators.

Chris-RH commented 1 week ago
  1. Can you reproduce this in a new project running only the AVPro Video demo scenes?
  2. Have you tried both Vulkan and OpenGLES?
  3. Are you building Mono or IL2CPP?
  4. Have you tried streaming videos (test streams here)
  5. Are you having the issue with all of the emulators you have tried, or just some of them? Which ones work/don't work? Are you getting the same error messages?

I'm not sure that it will work at all, as in the Unity manual under system requirements, it states "Hardware must be running Android OS natively. With the exception of Android for Chrome OS, Android within a container or emulator isn’t supported."

Ste-RH commented 3 days ago

We think this is the same issue as #1994 and hope to have a fix for this soon.

MorrisRH commented 3 days ago

We've fixed the issue with running using the Google Android emulator which we hope will resolve the issues seen with other emulators, this will make it into the next release (3.0.11).

Ste-RH commented 7 hours ago

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