• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

ALAC audio file support?

Scheduled Pinned Locked Moved Support
26 Posts 4 Posters 4.6k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nekojet
      last edited by nekojet 20 Sept 2019, 04:20

      Hi all, Ubuntu Touch noob here.

      Does UT (OTA-10) have built-in support for ALAC (Apple Lossless .m4a) audio files? The Music app sees the .m4a files, displays the album art, doesn't complain about the format or anything, looks like it's going to play them, but stops short of actually playing the files. I tried some FLAC and MP3 files just to be sure I wasn't doing something wrong, and they worked as expected.

      The desktop version of Xenial (16.04.6 LTS) plays the same ALAC files in Rhythmbox without any problems, so I'm guessing the desktop installation included a codec that UT doesn't(?).

      Is there a way I can install the necessary codec on UT myself? Any help/hints would be appreciated (other than "why don't you just convert everything to FLAC" ;).

      Thanks!

      A 1 Reply Last reply 20 Sept 2019, 04:53 Reply Quote 0
      • A Offline
        advocatux @nekojet
        last edited by 20 Sept 2019, 04:53

        @nekojet fwiw I've just installed a .m4a file on my BQ E4.5 (running edge) and on my Nexus 5 (running rc) to test that and it works in both of them.

        N 2 Replies Last reply 20 Sept 2019, 05:03 Reply Quote 0
        • N Offline
          nekojet @advocatux
          last edited by nekojet 20 Sept 2019, 05:03

          @advocatux I'm running OTA-10 stable on a OnePlus One. Assuming it's not hardware-related, I'll wait for OTA-11 and see if it works.

          Thanks for the info!

          A 1 Reply Last reply 20 Sept 2019, 05:07 Reply Quote 1
          • A Offline
            advocatux @nekojet
            last edited by 20 Sept 2019, 05:07

            @nekojet have you tried to play a .m4a file with the 'multimedia player' or open it with the filemanager preview?

            N 1 Reply Last reply 20 Sept 2019, 05:15 Reply Quote 0
            • N Offline
              nekojet @advocatux
              last edited by 20 Sept 2019, 05:07

              @advocatux I just thought of something. Can you confirm that the .m4a file that works for you is using the ALAC (lossless) codec and not the AAC (lossy) codec? Thanks!

              A 1 Reply Last reply 20 Sept 2019, 05:10 Reply Quote 0
              • A Offline
                advocatux @nekojet
                last edited by advocatux 20 Sept 2019, 05:10

                @nekojet I downloaded a random sample file, and yes, it seems it's AAC unfortunately (I didn't check it beforehand :rolling_eyes:)

                N 1 Reply Last reply 20 Sept 2019, 05:18 Reply Quote 0
                • N Offline
                  nekojet @advocatux
                  last edited by nekojet 20 Sept 2019, 05:15

                  @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.

                  A 1 Reply Last reply 20 Sept 2019, 05:16 Reply Quote 1
                  • A Offline
                    advocatux @nekojet
                    last edited by 20 Sept 2019, 05:16

                    @nekojet you're welcome!

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      nekojet @advocatux
                      last edited by 20 Sept 2019, 05:18

                      @advocatux Well, now I know UT can play AAC files. πŸ˜€
                      I wonder if ALAC support is coming in the future?

                      Thanks again.

                      A 1 Reply Last reply 20 Sept 2019, 05:24 Reply Quote 0
                      • A Offline
                        advocatux @nekojet
                        last edited by 20 Sept 2019, 05:24

                        @nekojet no idea about that, sorry

                        N 1 Reply Last reply 20 Sept 2019, 05:29 Reply Quote 0
                        • N Offline
                          nekojet @advocatux
                          last edited by 20 Sept 2019, 05:29

                          @advocatux No worries. I was just wondering that out loud. Thanks.

                          N 1 Reply Last reply 20 Sept 2019, 23:47 Reply Quote 1
                          • N Offline
                            nekojet @nekojet
                            last edited by nekojet 20 Sept 2019, 23:47

                            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-libav

                            and autoremoving its (orphaned) dependencies:
                            libavfilter-ffmpeg5
                            libavresample-ffmpeg2
                            libpostproc-ffmpeg53
                            libsodium18
                            libzmq5

                            and 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!

                            D 1 Reply Last reply 21 Sept 2019, 17:06 Reply Quote 3
                            • D Offline
                              dobey @nekojet
                              last edited by 21 Sept 2019, 17:06

                              @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.

                              N 1 Reply Last reply 21 Sept 2019, 21:38 Reply Quote 0
                              • N Offline
                                nekojet @dobey
                                last edited by nekojet 21 Sept 2019, 21:38

                                @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.

                                D 1 Reply Last reply 22 Sept 2019, 12:57 Reply Quote 0
                                • D Offline
                                  dobey @nekojet
                                  last edited by 22 Sept 2019, 12:57

                                  @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.

                                  N 1 Reply Last reply 23 Sept 2019, 19:34 Reply Quote 0
                                  • N Offline
                                    nekojet @dobey
                                    last edited by nekojet 23 Sept 2019, 19:34

                                    @dobey Yes! After doing more (and more) reading, I almost wrote a long post (or two) about:

                                    1. Apple open sourced ALAC in 2011 under the Apache License 2.0, so that probably isn't so much of an issue πŸ‘

                                    but

                                    1. 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!

                                    1 Reply Last reply Reply Quote 2
                                    • F Offline
                                      flohack
                                      last edited by 24 Sept 2019, 20:29

                                      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...

                                      My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                      D 1 Reply Last reply 24 Sept 2019, 21:22 Reply Quote 0
                                      • F Offline
                                        flohack
                                        last edited by 24 Sept 2019, 20:30

                                        @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

                                        My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

                                        D 1 Reply Last reply 24 Sept 2019, 21:25 Reply Quote 0
                                        • D Offline
                                          dobey @flohack
                                          last edited by 24 Sept 2019, 21:22

                                          @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.

                                          F 1 Reply Last reply 24 Sept 2019, 21:53 Reply Quote 0
                                          • D Offline
                                            dobey @flohack
                                            last edited by 24 Sept 2019, 21:25

                                            @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.

                                            1 Reply Last reply Reply Quote 0
                                            8 out of 26
                                            • First post
                                              8/26
                                              Last post