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

[Question] Support for 16KB memory page size

Open kresimirc opened this issue 11 months ago • 4 comments

AVPro Video Version

No response

Which platform is your question for?

Android

Your question

I am just wondering if library is already supporting that or if it will support it in the near future? Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes.

kresimirc avatar May 13 '25 10:05 kresimirc

Just to share — I've already posted a comment regarding the 16KB page size requirement in Issue #2121. Would be great to know if there's any plan to update the plugin to address this.

kawaiSky avatar May 13 '25 11:05 kawaiSky

We also need this +1

zawazawagh avatar May 27 '25 07:05 zawazawagh

we are looking into this. Its likely that the 3rd party things like FB360 and Exoplayer are likely to cause the most issues.

Chris-RH avatar May 27 '25 09:05 Chris-RH

Our team is currently progressing with preliminary preparations, and it would be immensely helpful if we might receive an estimated resolution window to align our development schedule accordingly.

Tia-mi avatar Jun 18 '25 09:06 Tia-mi

Is there any new progress?

DeaJason avatar Jul 01 '25 09:07 DeaJason

We're looking at making a build before the weekend.

Chris-RH avatar Jul 01 '25 12:07 Chris-RH

We're looking at making a build before the weekend.

That's fantastic! This is truly wonderful news.

DeaJason avatar Jul 01 '25 13:07 DeaJason

All libraries are now 16KiB aligned with the exception of librtmp-jni.so. Unfortunately this requires that the maintainer accept a PR before the androidx/media team will accept it, more info here.

MorrisRH avatar Jul 01 '25 16:07 MorrisRH

If LibRtmp-Client-for-Android is not maintained, will it be stuck?

DeaJason avatar Jul 02 '25 07:07 DeaJason

Unfortunately I have no answer for this. It's quite likely support for rtmp will be dropped from exoplayer (and therefore from AVPro Video) if it's not resolved prior to the deadline.

MorrisRH avatar Jul 02 '25 10:07 MorrisRH

Thank you for your reply. I tried to download the LibRtmp-Client-for-Android source code, and then compiled it myself to support 16kb alignment and replace rtmp-client-3.2.0. I don't know if there is a chance for users to bypass it by themselves. Unfortunately, we may not have time to wait until November.

DeaJason avatar Jul 02 '25 11:07 DeaJason

Is it possible to use LibRtmp-Client-for-Android source code to compile aar adapted to 16kb alignment, and then replace rtmp-client-3.2.0.aar?

DeaJason avatar Jul 02 '25 12:07 DeaJason

AVPro Video version 3.2.7 has been released. Please let us know if this has not fixed the issue for you.

Chris-RH avatar Jul 03 '25 08:07 Chris-RH

Hope this change works out for you @DeaJason ...if not, do let us know and we will get right on looking into it some more.

If you have 5 minutes spare, it would really help the product if you could leave an honest review in the Unity Asset Store of the product and the support you have received. Thanks!

Ste-RH avatar Jul 03 '25 13:07 Ste-RH

@DeaJason if you don't require rtmp support then you can always exclude the library from the build by commenting out line 210 of PostProcessBuild_Android.cs, so the acLibs array should look something like this:

CLibInfo[] acLibs = { new CLibInfo( "androidx.media3", "media3-common", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-container", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-database", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-datasource", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-datasource-cronet", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-datasource-okhttp", media3Version ),
                      // new CLibInfo( "androidx.media3", "media3-datasource-rtmp", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-decoder", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-extractor", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-exoplayer", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-exoplayer-dash", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-exoplayer-hls", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-exoplayer-rtsp", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-exoplayer-smoothstreaming", media3Version ),
                      new CLibInfo( "androidx.media3", "media3-exoplayer-workmanager", media3Version )
                    };

MorrisRH avatar Jul 03 '25 16:07 MorrisRH

@MorrisRH Thank you very much, this is very useful for us! I am testing it now~

DeaJason avatar Jul 04 '25 04:07 DeaJason

@DeaJason Anything to report yet?

Ste-RH avatar Jul 08 '25 10:07 Ste-RH

@DeaJason还有什么要报告的吗?

Image The mumu simulator encountered a crash when playing a video. The phone was normal, and the thunder simulator was also normal. 16kb mode The mumu simulator:https://www.mumuplayer.com/

DeaJason avatar Jul 14 '25 13:07 DeaJason

Image

DeaJason avatar Jul 14 '25 13:07 DeaJason

Use the Demo_MediaPlayer scene in the plug-in, package it into an apk in an empty project, and then run it on the mumu simulator. A crash will occur.

DeaJason avatar Jul 15 '25 06:07 DeaJason

I am using the latest AVPro Video v3- Ultra Edition version (3.2.7) and still encounter warnings on 16kb pages Image

Unity version: 2022.3.60f1 Target API Level: Android 15.0 (API Level 35)

Plugin 'Assets/AVProVideo/Runtime/Plugins/Android/libs/arm64-v8a/libAudio360-JNI.so' is not 16KB-aligned. This may cause issues on ARM64 devices running Android 15+. Plugin 'Assets/AVProVideo/Runtime/Plugins/Android/libs/arm64-v8a/libAVProVideo2Native.so' is not 16KB-aligned. This may cause issues on ARM64 devices running Android 15+. Plugin 'Assets/AVProVideo/Runtime/Plugins/Android/libs/arm64-v8a/libresample-rh.so' is not 16KB-aligned. This may cause issues on ARM64 devices running Android 15+. Plugin 'Assets/AVProVideo/Runtime/Plugins/Android/libs/arm64-v8a/libAudio360.so' is not 16KB-aligned. This may cause issues on ARM64 devices running Android 15+.

hliangwei avatar Jul 15 '25 11:07 hliangwei

There is a Unity issue pertaining to this...see here

You can check the libs using the 'APK Analyser' in Android Studio : see here (Note you will need a newish version of Android Studio for this)

Image

Ste-RH avatar Jul 15 '25 13:07 Ste-RH

AVPro Video version 3.2.7 has been released. Please let us know if this has not fixed the issue for you.

@MorrisRH @Ste-RH I'm using AVPro Video version 3.2.7 and published my app on Play Store and Console gives warning.

Library that does not support 16 KB: base/lib/arm64-v8a/librtmp-jni.so

yashs-devstree avatar Jul 21 '25 06:07 yashs-devstree

Hi @yashs-devstree That is not our library I'm afraid. More info further up the thread.

Chris-RH avatar Jul 21 '25 07:07 Chris-RH

@DeaJason if you don't require rtmp support then you can always exclude the library from the build by commenting out line 210 of PostProcessBuild_Android.cs, so the acLibs array should look something like this:

CLibInfo[] acLibs = { new CLibInfo( "androidx.media3", "media3-common", media3Version ), new CLibInfo( "androidx.media3", "media3-container", media3Version ), new CLibInfo( "androidx.media3", "media3-database", media3Version ), new CLibInfo( "androidx.media3", "media3-datasource", media3Version ), new CLibInfo( "androidx.media3", "media3-datasource-cronet", media3Version ), new CLibInfo( "androidx.media3", "media3-datasource-okhttp", media3Version ), // new CLibInfo( "androidx.media3", "media3-datasource-rtmp", media3Version ), new CLibInfo( "androidx.media3", "media3-decoder", media3Version ), new CLibInfo( "androidx.media3", "media3-extractor", media3Version ), new CLibInfo( "androidx.media3", "media3-exoplayer", media3Version ), new CLibInfo( "androidx.media3", "media3-exoplayer-dash", media3Version ), new CLibInfo( "androidx.media3", "media3-exoplayer-hls", media3Version ), new CLibInfo( "androidx.media3", "media3-exoplayer-rtsp", media3Version ), new CLibInfo( "androidx.media3", "media3-exoplayer-smoothstreaming", media3Version ), new CLibInfo( "androidx.media3", "media3-exoplayer-workmanager", media3Version ) };

Okay then I'll try this and see if the build works correctly or not on Android 15 devices.

yashs-devstree avatar Jul 21 '25 08:07 yashs-devstree

Can the V2 version be updated to support 16kb?

Winvz avatar Jul 21 '25 09:07 Winvz

AVPro Video version 2 has been depreciated and will no longer be receiving any fixes or updates.

Chris-RH avatar Jul 21 '25 10:07 Chris-RH

Hi @yashs-devstree That is not our library I'm afraid. More info further up the thread.

Media3 1.5.0 has supported 16K page size : https://developer.android.com/jetpack/androidx/releases/media3#1.5.0

Should I changed the "media3Version" to "1.5.0" in PostProcessBuild_Android.cs:202?

wangyijun avatar Aug 01 '25 10:08 wangyijun

We don't yet support that version. If you aren't using rtmp, then you should be able to exclude the library, as mentioned above

Chris-RH avatar Aug 01 '25 10:08 Chris-RH

/tmp/cube_out_pwlbv/lib/x86_64/libAudio360-JNI.so: UNALIGNED (212) /tmp/cube_out_pwlbv/lib/x86_64/libAudio360.so: UNALIGNED (212) /tmp/cube_out_pwlbv/lib/x86_64/libopus.so: UNALIGNED (212) /tmp/cube_out_pwlbv/lib/x86_64/libopusJNI.so: UNALIGNED (212)

(only arm64-v8a/x86_64 libs need to be aligned).

I'm using AVPro Video version 3.2.7 use check_elf_alignment.sh check my apk file such these library that does not support 16 KB.

p-b-paul-android avatar Aug 23 '25 09:08 p-b-paul-android