libgdx/gdx-video is a mobile-focused project on GitHub with 155 stars, written primarily in Java. A libGDX cross platform video rendering extension
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
implementation "com.badlogicgames.gdx-video:gdx-video-lwjgl3:$gdxVideoVersion"
// or (when using legacy LWJGL2):
implementation "com.badlogicgames.gdx-video:gdx-video-lwjgl:$gdxVideoVersion"
Once the video has fully loaded, you may retrieve additional
information about the file.
if (player.isBuffered()) {
int videoWidth = player.getVideoWidth();
int videoHeight = player.getVideoHeight();
}
On each frame, call the update() function to acquire new video frames
and keep the decoder running. You may then retrieve the frame using getTexture(),
but note that the texture may be larger than the video itself. The provided
VideoActor takes care of both updating and drawing when using Scene2D.
Once you are done playing, remember to dispose() the video player.
Encoding recommendations
Depending on the devices your game targets, you may need to encode
your videos with multiple formats and resolutions.
See the following tables for a rough overview, but remember to test
your game on real devices.
File format and codec
Format
Desktop
Android
iOS
Web
MP4 (H.264/AVC + AAC)
❌ *
✅
✅
⚠️
MP4 (H.265/HEVC + AAC)
❌ *
⚠️ > 5.0
✅ > 11
⚠️
WebM (VP8 + Vorbis)
✅
✅
❌
✅
WebM (VP9 + Opus)
✅
⚠️ > 5.0
❌
❔
MKV (AV1 + Opus)
✅
⚠️ > 10
❌ *
⚠️
Additional notes
Desktop: Additional formats and codecs can be enabled when compiling
gdx-video yourself. See the file gdx-video-desktop/FFmpeg/build.gradle.
iOS: H.265 is supported since iOS 11. AV1 requires a current high-end
device with a hardware decoder.
Android: See the following webpage for officially supported media formats:
https://developer.android.com/guide/topics/media/platform/supported-formats.
Note that this support table is not always accurate, especially for devices
and emulator images without Google Play Services.
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.
Resolution and framerate
Even when the format is officially supported, not all devices
have hardware acceleration for video decoding. Many video
codecs specify the decoding capabilities as "levels" of bitrate,
video resolution and framerate. Trying to play a video above the
device's capabilities may cause increased power usage, frame drops,
visual or audio artifacts or even game crashes.
Examples (using H.264 levels):
Level
(Mobile) device category
Example 1
Example 2
3
Low end
720 x 480 @ 30fps
-
3.1
720 x 480 @ 60fps
1280 x 720 @ 30fps
4
Budget / mid range
1280 x 720 @ 60fps
1920 x 1080 @ 30fps
4.2
1280 x 720 @ 120fps
1920 x 1080 @ 60fps
5.1
High performance
1920 x 1080 @ 120fps
3840 x 2160 @ 30fps
Possible approaches:
Use a lower resolution as 'baseline' that works on all target devices
Ship your videos in multiple resolutions and guess the best one for the
device (e.g. based on OS version, RAM size or display resolution)
Contributing
Building from source
To build from source, clone or download this repository, then open it in Android Studio
and perform a gradle sync. If you get any ZipFile errors, watch the logs above and
install the remaining Android SDK components through the SDK manager.
When building for desktop, build the native components using the Gradle tasks
:gdx-video-desktop:buildFFmpeg{platform}{arch}
and :gdx-video-desktop:jnigenBuild{platform}{arch}.
Perform the following command to compile and upload the library in your local repository:
./gradlew publishToMavenLocal
See build.gradle file for current version to use in your dependencies.
Cross-compilation on MacOS
Install the cross-compilers using homebrew with the commands
The project is licensed under the Apache 2 License, meaning you can use it free of charge, without strings attached in commercial and non-commercial projects. We love to get (non-mandatory) credit in case you release a game or app using this project!
No homepage URL was recorded for libgdx/gdx-video in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How does libgdx/gdx-video compare to other Mobile projects?
libgdx/gdx-video is tracked by TopGit in the Mobile category, with 155 GitHub stars and written in Java. Browse the Mobile topic page on TopGit to compare it against similar projects by stars and activity.
How many stars does libgdx/gdx-video have?
libgdx/gdx-video has 155 GitHub stars — refresh the page for the live number, or check github.com/libgdx/gdx-video. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is libgdx/gdx-video open source?
Yes — libgdx/gdx-video ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/libgdx/gdx-video.
What else is in the Mobile space?
libgdx/gdx-video is tracked by TopGit under the Mobile category, alongside 9 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is libgdx/gdx-video?
libgdx/gdx-video (libgdx/gdx-video) is a Java project on GitHub. From the project's own README: A libGDX cross platform video rendering extension
Where do I read more about libgdx/gdx-video?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/libgdx/gdx-video is the definitive source.
Read full README in the tab above.
Still deciding about gdx-video?
One click hands the question to an AI along with this page — see what it says about gdx-video.