music icon indicating copy to clipboard operation
music copied to clipboard

Won't play *.m4a with ALAC compression.

Open edgarroncero opened this issue 4 years ago • 3 comments

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

edgarroncero avatar Nov 25 '22 10:11 edgarroncero

image

edgarroncero avatar Nov 25 '22 10:11 edgarroncero

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: https://github.com/owncloud/music/issues/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 avatar Nov 25 '22 11:11 paulijar

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.

paulijar avatar Jan 01 '23 18:01 paulijar