ALAC audio file support?
-
@advocatux When I try to open the file using "Media Player" or the File Manager preview (which seems to call up the same "Media Player"), I get an error that says "Error playing video - Video format not supported.", which makes sense I guess.
Thanks for trying to work this out with me.
-
@nekojet you're welcome!
-
@advocatux Well, now I know UT can play AAC files.
I wonder if ALAC support is coming in the future?Thanks again.
-
@nekojet no idea about that, sorry
-
@advocatux No worries. I was just wondering that out loud. Thanks.
-
The package that is providing ALAC support on Xenial (16.04.6 LTS) desktop is:
gstreamer1.0-libav (1.8.3-1ubuntu0.2)
https://packages.ubuntu.com/xenial-updates/gstreamer1.0-libav
I was able to confirm this by removing:
gstreamer1.0-libavand autoremoving its (orphaned) dependencies:
libavfilter-ffmpeg5
libavresample-ffmpeg2
libpostproc-ffmpeg53
libsodium18
libzmq5and then trying to play my ALAC .m4a files again. Rhythmbox did a bit of searching and popped up a dialog that said:
Install extra multimedia plugin?
Rhythmbox requires to install plugins to play media files of the following type: Apple Lossless Audio (ALAC) decoder
gstreamer1.0-libav
libav plugin for GStreamer[ Cancel ] [ Install ]
As far as I can tell, Ubuntu Touch (OTA-10) stable does not come with this package installed. I guess my next step is to do a bunch of reading to figure out if I can install this package myself, and/or request that it be included in a future UT release.
It's possible that gstreamer1.0-libav brings with it a bunch of baggage that might negatively impact UT...or something. Beats me.
Working this out has been fun (so far). Cheers!
-
@nekojet I suspect it is not something we can ship in UT. We only ship free codec support, and the hybris backend which uses hardware decoding from the Android side, for licensed codecs.
It would probably be better to convert your files to a free codec instead.
-
@dobey Makes senses. Thanks for the info!
I'm not fluent in the different software licenses. Is something released under the Apache License considered non-free? Thanks.
-
@nekojet libav isn't solely a port of the original ALAC source code to Linux. libav/ffmpeg implements several encumbered codecs. So there may be issues with shipping those.
If there were a totally free implementation of ALAC by itself, for GStreamer, we could possibly include it, but one only available with support for other codecs which are encumbered, is not really feasible.
Best option really, is to transcode audio to a codec that is supported by the hardware decoder on the portable device you're putting them on, as this will save battery power by not having to do all the decoding in software on the CPU.
-
@dobey Yes! After doing more (and more) reading, I almost wrote a long post (or two) about:
- Apple open sourced ALAC in 2011 under the Apache License 2.0, so that probably isn't so much of an issue
but
- gstreamer1.0-libav (built on libav/ffmpeg) includes wayyyyyyyy more than just ALAC, and that quickly becomes problematic if you look at the huge list of codecs it packages
I also want to thank the UBports community for all of the great work y'all are doing. It's really appreciated.
I'm a new UT user (and Patron) and this project is very exciting.
Thanks!
-
Well its hard for me too to live without m4a now, since 2 of my band members use iPhones and any recording they do will come over the wire as m4a format. I have no idea if and how they can influence the recording codec on their side. Until that I can only listn to this on my desktop. Which is boring.
Consumers are trapped in stuff they don't understand and also they are just no giving choices. We got along way to go...
-
@nekojet said in ALAC audio file support?:
gstreamer1.0-libav
Oh and by the way, definitely need encoding support for opus when we ever want Telegram voice messages to be a thing. How could we get this in @dobey
-
@Flohack
m4a
is the MPEG-4 container format. It's not related to the codec for the audio embedded in the file, which can be ALAC, AAC, or numerous other things. -
@Flohack Well, Opus is an open codec, and it seems to already be implemented in the
gstreamer1.0-plugins-base
package, which should already be in the image, so I guess it should just work. -
@dobey Seems you are right, its AAC internally, but it still cannot be played back by UT...
-
@Flohack On what device? I don't think we include a software decoder for AAC, so it depends on hardware decoder support, as AAC is non-free. It should work on FP2 and Nexus devices at least, I think. If not, there might be some low level issue with Android drivers.
-
@dobey I am on Oneplus One, that might explain the issue. Hmm good question if it can be enabled if it would be there theoretically ^^
-
@Flohack From a quick search, I can't seem to find a list of definite hardware audio codec support on opo, so no idea what it actually supports.
-
Regarding AAC support on OPO...
I did a fresh OTA-11 RC install and wipe on my OnePlus One. It's now running OS build number 2019-W41/2. I can successfully play a couple of example AAC files I downloaded from here:
http://samplephotovideo.com/2015/12/download-aac-mpeg-2-advanced-audio-coding-file/
http://samplephotovideo.com/2015/12/m4a-mpeg-4-audio-layer-sample-file-m4a/
Hope this helps!
-
@dobey @Flohack I also downloaded an example OPUS file from here:
http://samplephotovideo.com/2015/12/download-opus-sample-audio-file-opus/
I can successfully play the file using my clean "install and wipe" installation of OTA-11 rc (OS build number 2019-W41/2) on my OnePlus One.
Cheers!