Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

GeometryWars fails to load bgm.mp3: "jfxmedia.MediaException: Could not create player" #1

Open
travisfw opened this issue Sep 11, 2016 · 5 comments

Comments

@travisfw
Copy link

I spotted http://almasb.github.io/FXGLGames/ on reddit, and tried out the first example listed: GeometryWars.
I cloned FXGLGames, changed directory to GeometryWars, executed mvn package which succeeded, and ran the jar with java -jar and it failed.
See log output, etc: http://hastebin.com/fuvuholatu.sm

@AlmasB
Copy link
Owner

AlmasB commented Sep 12, 2016

Can you provide more details about your OS and jdk?

@travisfw
Copy link
Author

~ ) cat /etc/fedora-release 
Fedora release 24 (Twenty Four)
~ ) java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

Anything else?

@AlmasB
Copy link
Owner

AlmasB commented Sep 12, 2016

FXGL uses JavaFX media to handle audio. Apparently this is what is required on linux:

Linux
You must install the following in order to support AAC audio, MP3 audio, H.264 video, and HTTP Live Streaming:
libavcodec52 and libavformat52 on Ubuntu Linux 10.04, 10.10, 11.04 or equivalent.
libavcodec53 and libavformat53 on Ubuntu Linux 11.10, 12.04 or equivalent.

dnf search gave me nothing maybe you'll have more luck finding these.

Regarding the demo, the easiest way to run given the circumstances is to comment this line. Then run mvn clean package and start java -jar as normal.

I'll try to find an acceptable fallback audio provider for such cases. Thanks for testing this on linux

@AlmasB
Copy link
Owner

AlmasB commented Sep 15, 2016

After a long search through libraries and dependencies I've managed to install libavcodec and libavformat on a clean fedora 24. In short, ../jre/lib/amd64/ has libavplugin(53-56).so, so basically ffmpeg-compat gives version 52, which is no longer supported in jdk8_102, the new ffmpeg gives 57, which is not yet supported. So best bet is to use 56.

The rpm I used is here.

dnf install DOWNLOADED_RPM.rpm will say that a few .rpm are missing, so they have to be downloaded again manually using the same repo. Here's a shortcut for x86_64.

Once ffmpeg installs, you will find several libav*.so in /usr/lib64/ffmpeg-full-libs/ or wherever it installed them. All of the libav*.so need to be copied to /lib64/.

This should do it, though I installed a few other things along the way like gstreamer* and glib*, so not entirely sure at what point the game stopped throwing the exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants