Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play m4a files in Java

Tags:

java

m4a

I want to create a media player in Java. The mp3 support already works with the JLayer library but which library can play m4a files?

I read about vlcj here on stackoverflow, but this seems to depend on Swing/AWT which I wouldn't use because I want to port the application to Android later on.

like image 287
user1839433 Avatar asked Aug 10 '26 07:08

user1839433


1 Answers

Have you looked at JAAD? It's a Javasound SPI that decodes AAC audio, I've used it with success previously.

Note that m4a is a container format, and while it usually contains (in my experience) AAC audio, in theory it could contain other formats instead.

You can find some information about getting it working without Javasound (and a test case) here.

like image 104
Michael Berry Avatar answered Aug 11 '26 20:08

Michael Berry