Sonerezh / sonerezh

A self-hosted, web-based application to stream your music, everywhere.
https://www.sonerezh.bzh
GNU Affero General Public License v3.0
769 stars 122 forks source link

AAC Supported? #313

Open sootstone opened 7 years ago

sootstone commented 7 years ago

There is an option to convert AAC in settings, but is AAC actually supported? I'm unable to add any to my library, and this issue would suggest it isn't.

sonerezhsettings

gs11 commented 7 years ago

I can successfully import & play an example AAC file. Haven't looked into the tags though since I don't have any AAC files in my library.

sootstone commented 7 years ago

That's odd, Sonerezh wouldn't import any AAC files whatsoever for me (Version 1.3). Every other file type worked fine.

gs11 commented 7 years ago

Is there an AAC file you could share to allow me to test?

sootstone commented 7 years ago

Thanks @gs11 but unfortunately I no longer have any AAC files in my library to test with.

landure commented 7 years ago

I can confirm that aac files (m4a extension) are not imported by Sonerezh v1.1.3.

If you need a m4a file, i wrote a complex bash script that can convert/sync a existing music library to a homogen format: mussync-tools bash script

The script is able to convert the files and preserve the metadata (cover art and track names). It should generate valid files for you to test the import software.

Here is a install guide for Debian / Ubuntu in french (but should be easy to understand for english speakers as it is mainly command lines to copy/paste) with example usages: Convertir une bibliothèque musicale en Flac vers un autre format avec mussync-tools (fr).

Here is how to create a m4a library from a flac/mp3 one:

mussync-tools --of m4a -i ./flac-path/ -o ./output-path/

Thank you for your work.

gs11 commented 6 years ago

Looked at this again and the issue is with the file ending. The import code doesn't look for files with the m4a ending: https://github.com/Sonerezh/sonerezh/blob/master/app/Controller/SongsController.php#L54

Should be an easy fix if you can provide a PR? An issue introduced is that the ALAC files are also usually named m4a but they won't be played since there's no support for that format in Sonerezh.