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

[OpenHarmony] Either it doesn't play or it keeps reporting errors On the HUAWEI Mate 60 Pro

Open alltry1014 opened this issue 2 months ago • 38 comments

Unity version

tuanjie 1.6.7

Unity editor platform

Windows

AVPro Video edition

Trial

AVPro Video version

v3.3.1

Device hardware

HUAWEI Mate 60 Pro

Which HarmonyOS version are you using?

HarmonyOS 5.1.0

Unity Graphics API

OpenGLES 3

Texture format

BGRA

Audio output

System Direct

Any other Media Player component configuration required to reproduce the issue.

Image

Which output component(s) are you using?

Display uGUI

Any other component configuration required to reproduce the issue.

Image

The issue

Dear AVproVideo support, I encountered some errors on Huawei mate60 pro, I will send you the logs.

harmonyos_next_error.txt

Media information

File Size:27.7 MB Duration:33 seconds Frame Width:1440 pixels Frame Height:2072 pixels Frame Rate:30.00 frames per second (fps) Data Rate (Video):7037 kbps Total Bitrate:7037 kbps

Logs


alltry1014 avatar Oct 22 '25 10:10 alltry1014

@alltry1014 can you try replacing Helper.cs with the one attached here? We are looking to do a new release with this fix included, as well as Vulkan support for HarmonyOS-NEXT, in the next day or two.

Do let us know if this fix helps though.

Helper.zip

Ste-RH avatar Oct 22 '25 14:10 Ste-RH

Actually, looking more closely at your log @alltry1014 , I do not think that fix will help.

  • Are you able to send over your video? ([email protected] if you wish to keep it private).
  • Do you have 'Auto Play' enabled on the video component?
  • Have you tried calling 'Play()' on the component regardless of the 'Auto Play' flag being set?

Ste-RH avatar Oct 22 '25 14:10 Ste-RH

Dear AVproVideo support, I still get an error when I manually play the video that comes with avpro. Send you the logs.

Image

harmonyos_next_error2.txt

alltry1014 avatar Oct 23 '25 03:10 alltry1014

Dear AVproVideo support, I send you the test demo. This test demo does not include the avpro plugin because of multiple email sending failures.Please check your email.

Image

alltry1014 avatar Oct 23 '25 03:10 alltry1014

@alltry1014 your project has missing scripts and errors so we cannot use it to help as it stands

That said, we have just released an updated version of AVPro Video (v3.3.2). I would recommend updating to this version and trying again. We use the same HarmonyOS-NEXT device as you, and everything works here as it should in our demo scene with our demo video.

Image

Ste-RH avatar Oct 23 '25 11:10 Ste-RH

I fail to send email for you so I delete the plugin. The missing script comes form Avpro plugins.Please import the version v3.3.1 plugin package.

Image

alltry1014 avatar Oct 23 '25 12:10 alltry1014

The new version(v3.3.2) still reports errors.The log for you. harmonyos_next_error3.txt

You can try to exit the app while playing, and then quickly re-enter the app.

Image

alltry1014 avatar Oct 23 '25 12:10 alltry1014

Not sure what you mean...but everything seems fine here...

https://github.com/user-attachments/assets/c3d8eb21-69ee-4e58-bf4f-b1fcb95a810d

Ste-RH avatar Oct 23 '25 14:10 Ste-RH

Is it just errors you are concerned about? Does playback behave as you expect?

Ste-RH avatar Oct 23 '25 14:10 Ste-RH

The results aren't what I expected, and errors are popping up every second. I simply quit the app and reopen it immediately. Could you please try building my demo?

alltry1014 avatar Oct 23 '25 14:10 alltry1014

What are the results then? Does the video not play?

I have tried building your demo. It does not build. I replied re that earlier today (missing scripts and errors). Please send the complete project via email.

Ste-RH avatar Oct 23 '25 15:10 Ste-RH

https://github.com/user-attachments/assets/96c0b698-d589-424f-bc69-9d4527298429

Image

This is the effect I have here. Calling OpenMedia multiple times will result in an error. Import the plugin and the demo should work.

alltry1014 avatar Oct 24 '25 02:10 alltry1014

Dear AVproVideo Support, how about the issue? I just want to know when it will be fixed.

alltry1014 avatar Oct 28 '25 07:10 alltry1014

As mentioned. We've not been able to reproduce the issues here. Please send the complete project via email.

Chris-RH avatar Oct 28 '25 13:10 Chris-RH

Dear AVproVideo Support, I share the demo on the google drive. I've sent you the download link via email. When I use v3.3.2, I keep getting this error: <surface_image.cpp:482-AcquireNativeWindowBuffer>: AcquireBuffer failed. Additionally, another error occasionally occurs when calling OpenMedia multiple times: (HarmonyVideoPlayer.cpp:378) HarmonyVideoPlayer::Play : OH_AVPlayer_Play error = 3

The log for you. harmonyos_next_error4.txt

alltry1014 avatar Oct 30 '25 08:10 alltry1014

Dear AVproVideo Support, how about the issue?

alltry1014 avatar Nov 06 '25 06:11 alltry1014

I think we have something that fixes the issue. I will send over some updated libs via email for you to try. Please let me know, if you are able to test them, if they fix the issue.

Ste-RH avatar Nov 07 '25 14:11 Ste-RH

Dear AVproVideo Support, the error when calling OpenMedia multiple times has been fixed after testing. However, during playback, an error message keeps appearing, as follows: Image This error message that refreshes every frame is also a concern for us. Two new issues have been added. The first is that after the initial installation, the first playback sometimes fails. You can check this log. harmonyos_next_error_7.txt The video is as follows: https://github.com/user-attachments/assets/734af636-e1f6-4224-af90-4644e0806b84

The second problem is that the game occasionally crashes after multiple playbacks.You can check this log. harmonyos_next_error_6.txt The video is as follows: https://github.com/user-attachments/assets/4fdf6288-bbaf-4692-a626-7f124e57ba4b

alltry1014 avatar Nov 09 '25 07:11 alltry1014

The errors you are seeing are not coming from AVPro Video directly, they are from the OH video player API. I don't believe there anything we can do about them.

Do you have the full crashlog? What you sent does not really give any clues what it might be. I will run our test scene here (that reloads videos indefinitely) to see if I can reproduce the issue.

Ste-RH avatar Nov 10 '25 11:11 Ste-RH

Image

This log is complete and includes a crash error message. harmonyos_next_error_6.txt

alltry1014 avatar Nov 12 '25 05:11 alltry1014

Image

This OH video player error only occurs after AVPro video playback. Is there any connection between them?

alltry1014 avatar Nov 12 '25 11:11 alltry1014

This OH video player error only occurs after AVPro video playback. Is there any connection between them?

As I said, the errors look like they are coming our of the OH video player API (or more likely the graphics API as surface is mentioned). This is 100% because of AVPro Video calls into the APIs, but there is likely nothing we can do about them. They are beyond our control I think.

Ste-RH avatar Nov 13 '25 11:11 Ste-RH

Dear AVproVideo Support, What impact does this error message have? Additionally, is it possible to block or bypass this error message?

alltry1014 avatar Nov 13 '25 11:11 alltry1014

As far as we know, no impact at all. But as we are not the ones delivering the logging we cannot be 100% sure.

The surface one... I suspect it is happening due to us polling for a frame (calling OH_NativeImage_AcquireNativeWindowBuffer). Either there isn't one available at that time, or it is due to us calling the function to grab the very latest frame. The later...Android has a specific function for this, but the OH API does not, so you have to call the acquire function over and over until it reports back no frame. This means the error is harmless.

The meta data one... Just looks like a warning out of the API. Again, looks harmless.

On both, I can ask our contact at Huawei for more information, but I suspect they will report back that 'that is just what the API does and no need to worry about the logging'. Not ideal, but not the end of the world.

Ste-RH avatar Nov 13 '25 12:11 Ste-RH

OK, Thanks.

alltry1014 avatar Nov 13 '25 12:11 alltry1014

Dear AVproVideo Support, version 3.3.3, including updated libraries, still occasionally fails to play.

Image

harmonyos_next_error_8.txt

https://github.com/user-attachments/assets/9bbb96d1-afcb-42ea-a3d1-d762ebbe8cd2

alltry1014 avatar Nov 28 '25 01:11 alltry1014

Dear AVproVideo Support,we recently conducted an online test. Please fix the occasional playback failure bug as soon as possible. Thanks very much.

alltry1014 avatar Dec 01 '25 06:12 alltry1014

Dear AVProVideo support, we will wait one week. If the occasional playback failure bug is not fixed within one week, we will have to temporarily revert to VideoPlayer. Thanks very much.

Image

alltry1014 avatar Dec 02 '25 08:12 alltry1014

AVPro Video version 3.3.4 has been released. Please let us know if it has not fixed this issue.

Chris-RH avatar Dec 02 '25 14:12 Chris-RH

Ok,Thanks very much.I'll try it tomorrow.

alltry1014 avatar Dec 02 '25 14:12 alltry1014