libgdx/gdx-video được TopGit xếp vào nhóm dự án di động, với 155 sao trên GitHub, viết chủ yếu bằng Java. A libGDX cross platform video rendering extension
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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!
libgdx/gdx-video thuộc nhóm Mobile trên TopGit, cùng 9 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về libgdx/gdx-video ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/libgdx/gdx-video là nguồn chính thức.
libgdx/gdx-video có bao nhiêu sao?
libgdx/gdx-video có 155 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/libgdx/gdx-video. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
libgdx/gdx-video có phải mã nguồn mở không?
Có — libgdx/gdx-video phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/libgdx/gdx-video.
libgdx/gdx-video có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho libgdx/gdx-video. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
libgdx/gdx-video là gì?
libgdx/gdx-video (libgdx/gdx-video) là dự án Java trên GitHub. Theo mô tả gốc: A libGDX cross platform video rendering extension
libgdx/gdx-video so với các dự án Mobile khác thế nào?
libgdx/gdx-video được TopGit xếp vào nhóm Mobile, với 155 sao GitHub và viết bằng Java. Xem trang chủ đề Mobile trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc gdx-video có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về gdx-video.