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

Won't play *.m4a with ALAC compression. #1030

Closed
edgarronceroblanco opened this issue Nov 25, 2022 · 3 comments
Closed

Won't play *.m4a with ALAC compression. #1030

edgarronceroblanco opened this issue Nov 25, 2022 · 3 comments

Comments

@edgarronceroblanco
Copy link

Hello. It doesn't seem to play *.m4a with ALAC compression. Can we expect future support?
Thanks.

@edgarronceroblanco
Copy link
Author

image

@paulijar
Copy link
Collaborator

paulijar commented Nov 25, 2022

The Music app can play whatever your browser can play. But I don't know of any browser which could play m4a with ALAC. Being an Apple-developed format, maybe Safari could do it, but I don't know.

One chance could be if we could decode the stream using some javascript library. There seems to exist the Aurora.js plugin https://github.com/audiocogs/alac.js for this purpose which could be investigated. It hasn't been maintained for ages and some of the Aurora.js plugins I have tested have been broken and useless. But I haven't tested this one. We currently use Aurora.js plugins as fallback solution for playing MP3 and FLAC files in case the browser cannot do it natively. But basically all browsers nowadays have the native support for these two formats. Even at best, the javascript alternative is worse than any native support, with possible glitches in playback, higher CPU load, and probably no support for seeking.

Another solution would be to develop support for the transcoding which has been requested a long time ago: #428.

Edit: Here's a source stating, that Safari supports playing ALAC but no other browser do: https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Audio_codecs#alac_apple_lossless_audio_codec

@paulijar
Copy link
Collaborator

paulijar commented Jan 1, 2023

The newly released Music v1.8.0 now contains the ALAC.js plugin. It is used as fallback if the browser can't play the MP4-ALAC files natively. It worked fine on those few ALAC sample files I found but your mileage may vary. The limitation is that the seeking or adjusting of the playback speed doesn't work when playing a file using the javascript library.

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

No branches or pull requests

2 participants