Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Desktop: Add dav1d library for AV1 software decoding #99

Merged
merged 4 commits into from
Jan 22, 2025

Conversation

dasisdormax
Copy link
Contributor

This PR updates the desktop build files to add AV1 decoding.
For this, the dav1d library is built for each platform and linked into the native shared library.

Tested on MacOS (ARM64), Linux (x86_64), Windows (x86_64)

fixes #83

In practice, H.264 is a good choice for physical Android tablets / smartphones
as most devices (including old and cheap ones) have hardware decoding support.
Remember to dispose a VideoPlayer before loading a new one, as some devices
fail to load the next video otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with this. The same holds true for web - I use H.264 there because older/low-spec hardware lacks hardware-based VP9 decoding and it has only recently been supported by Safari. Not that gdx-video works well on iOS (15) - it ends up opening the raw video full screen - but at least it's better than nothing.

It's a little annoying to ship VP9 for desktop and H.264 for GWT, since the GWT backend doesn't support multiple assets directories, but you can tell Gradle to exclude the web version from the desktop build.

@SimonIT
Copy link
Member

SimonIT commented Jan 19, 2025

Is there a reason why you created a separate Gradle subproject ffmpeg?

@dasisdormax
Copy link
Contributor Author

Is there a reason why you created a separate Gradle subproject ffmpeg?

Just to split the FFmpeg build and the build of our own code (Java/JNI) into separate files. I did not get that to work a different way.

@SimonIT
Copy link
Member

SimonIT commented Jan 22, 2025

I guess I just trust you there and merge it :)

@SimonIT SimonIT merged commit 36f31a4 into libgdx:master Jan 22, 2025
4 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AV1 Decoding does not work on Desktop
3 participants