Skip to content

Conversation

@JamiKettunen
Copy link
Contributor

Brings 64-bit ARM Linux platform natives support for BASS and FFmpeg (utilizing https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ over the previous PR's cross-build); supersedes and closes #6476 (also closes #6288).

FFmpeg built successfully on https://github.com/JamiKettunen/osu-framework/actions/runs/15027329798 for example and is where I got the binaries from; they're also reproducible.

This should complete the remaining box on ppy/osu-deploy#170 (comment) that I can help with anyway (ARM64 natives for ppy.Veldrid.SpirV are now also readily available and building requires no further action on ppy/osu @ master).

BASS confirmed loading and working:

[runtime] 2025-05-14 17:05:55 [verbose]: 🔈 BASS initialised
[runtime] 2025-05-14 17:05:55 [verbose]: BASS version:           2.4.17.24
[runtime] 2025-05-14 17:05:55 [verbose]: BASS FX version:        2.4.12.15
[runtime] 2025-05-14 17:05:55 [verbose]: BASS MIX version:       2.4.12.4
[runtime] 2025-05-14 17:05:55 [verbose]: Device:                 Default
[runtime] 2025-05-14 17:05:55 [verbose]: Driver:                 default
[runtime] 2025-05-14 17:05:55 [verbose]: Update period:          5 ms
[runtime] 2025-05-14 17:05:55 [verbose]: Device buffer length:   10 ms
[runtime] 2025-05-14 17:05:55 [verbose]: Playback buffer length: 100 ms

Alternate BASS library sources (if interesting):

[runtime] 2025-05-14 17:07:51 [verbose]: BASS version:           2.4.17.0
[runtime] 2025-05-14 17:07:51 [verbose]: BASS FX version:        2.4.12.6
[runtime] 2025-05-14 17:07:51 [verbose]: BASS MIX version:       2.4.12.0

Copy link
Contributor

@smoogipoo smoogipoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I've sanity checked the libs.

Video decoding doesn't work - looks like the ARM64 build has different file names:

2025-05-14 21:30:05 [verbose]: VideoDecoder faulted: System.DllNotFoundException: Unable to load shared library 'libavutil.so.56' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable:
2025-05-14 21:30:05 [verbose]: /home/smgi/publish/libavutil.so.56: cannot open shared object file: No such file or directory
2025-05-14 21:30:05 [verbose]: /home/smgi/publish/liblibavutil.so.56: cannot open shared object file: No such file or directory
2025-05-14 21:30:05 [verbose]: /home/smgi/publish/libavutil.so.56.so: cannot open shared object file: No such file or directory
2025-05-14 21:30:05 [verbose]: /home/smgi/publish/liblibavutil.so.56.so: cannot open shared object file: No such file or directory
2025-05-14 21:30:05 [verbose]:
2025-05-14 21:30:05 [verbose]: at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError)
2025-05-14 21:30:05 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.<>c.<CreateFuncs>b__67_0(String name) in /Users/smgi/Repos/osu-framework/osu.Framework/Graphics/Video/VideoDecoder.cs:line 849
2025-05-14 21:30:05 [verbose]: at FFmpeg.AutoGen.ffmpeg.<>c.<.cctor>b__6_607(UInt64 size)
2025-05-14 21:30:05 [verbose]: at FFmpeg.AutoGen.ffmpeg.av_malloc(UInt64 size)
2025-05-14 21:30:05 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.prepareDecoding() in /Users/smgi/Repos/osu-framework/osu.Framework/Graphics/Video/VideoDecoder.cs:line 347
2025-05-14 21:30:05 [verbose]: at osu.Framework.Graphics.Video.VideoDecoder.StartDecoding() in /Users/smgi/Repos/osu-framework/osu.Framework/Graphics/Video/VideoDecoder.cs:line 215

@JamiKettunen
Copy link
Contributor Author

JamiKettunen commented May 14, 2025

Hm you're right, the linux-arm64 builds are just a newer FFmpeg (7 vs 4) it seems than what is present for others. I assume this is related to #6256 still not being merged so the others are using binaries like the ones in #6227 built from somehow older source in another way than what the GH Actions job does? I see libavutil.so.59 etc for other arches in my CI builds too

I also realized with storyboards enabled that libveldrid-spirv.so still wasn't present due to outdated version in osu.Framework.csproj, should I also fix this here or leave that for later (a new PR)?

@JamiKettunen
Copy link
Contributor Author

How are the older version binaries everything else uses built if not through .github/workflows/build-ffmpeg.yml? Seems rather odd those are not in sync or used at all right now anyway

@smoogipoo
Copy link
Contributor

smoogipoo commented May 16, 2025

that libveldrid-spirv.so still wasn't present due to outdated version in osu.Framework.csproj

You can update it directly in this PR.

older version binaries everything else uses built

They're built by the same workflow.

Last change: 02d0a06
Uses this build script: https://github.com/ppy/osu-framework/blob/02d0a060afa5fbae5cca987fde5cee2ad9f8771b/osu.Framework.NativeLibs/scripts/ffmpeg/common.sh
Which has FFMPEG_VERSION=4.3.3

We might have just been using outdated/old libs this whole time?

I think the intention might have been to get #6256 in pretty soon after #6255 was merged, but that didn't happen for some reason.

@JamiKettunen JamiKettunen force-pushed the arm64-linux-bass-ffmpeg branch from 44f255a to 4f8416e Compare May 17, 2025 12:06
@JamiKettunen
Copy link
Contributor Author

JamiKettunen commented May 17, 2025

Added https://www.nuget.org/packages/ppy.Veldrid.SPIRV/1.0.15-g4bdd5c372e. I've now also built the outdated FFmpeg 4 versions of the libraries to match everything else on https://github.com/JamiKettunen/osu-framework/actions/runs/15084656520 by reverting da8af60, confirmed the runtime error no longer appears and background video plays on https://osu.ppy.sh/beatmapsets/1388906. Let me know if something else should be done

@JamiKettunen JamiKettunen requested a review from smoogipoo May 19, 2025 09:37
@JamiKettunen JamiKettunen force-pushed the arm64-linux-bass-ffmpeg branch from 4f8416e to ef41880 Compare May 22, 2025 20:42
@JamiKettunen JamiKettunen force-pushed the arm64-linux-bass-ffmpeg branch from ef41880 to 04e9591 Compare May 30, 2025 07:54
@JamiKettunen
Copy link
Contributor Author

@smoogipoo Ping :)

@smoogipoo
Copy link
Contributor

This is still in my notifications, but it's a very low priority item.

@JamiKettunen JamiKettunen force-pushed the arm64-linux-bass-ffmpeg branch from 04e9591 to 5f1fb65 Compare June 7, 2025 17:39
@smoogipoo
Copy link
Contributor

Verified ffmpeg files match action artifacts.

Note that this will use the "broken" BASS (ppy/osu#33260). I consider this intentional because these libs haven't been reverted on master for the other platforms - only the NativeLibs package version was rolled back.

Resulting from the above, I will not immediately tag a new NativeLibs package for this. @JamiKettunen Do you have a specific use for arm64 or is it a matter of "because we can"?

@JamiKettunen
Copy link
Contributor Author

JamiKettunen commented Jun 8, 2025

@smoogipoo yes I'm planning to make an Asus Vivobook S 15 laptop (which I got for a really good deal second hand with X1E/32GB/1TB config) my desktop (Ryzen 9 5950X) replacement while helping with my often AArch64 related projects by being able to natively compile for it as well; looking forward to eventually being able to submit scores on lazer as well on this surprisingly powerful computer :)

@smoogipoo smoogipoo merged commit c2fc17b into ppy:master Jun 8, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants