Search | Sailfish OS | Running | PineTime | All Posts

How to play MMS Audio files (.amr) on Sailfish OS

December 01, 2022 — Nico Cartron

Sailfish OS cannot natively play MMS audio files, but there's a way to do it, let's see how in this article!


MMS Audio files?

Yes! Apparently it's a thing!
I usually have those on Telegram, but someone sent me an Audio file via MMS this week, and when I tried to listen to it, Sailfish OS' Media player returned an error message:

"Unsupported coded: Adaptive Multi Rate (AMR) decoder..."

Sailfish OS forum to the rescue!

My first reflex was to look that up on the SFOS Forum, and surely enough, there was already a thread about it here.

How to fix

Basically, you need to install:

  • 2 opencore AMR libraries,
  • as well as a gstreamer AMR plugin.

Getting the packages

Being on a Xperia 10 III, I'm on a 64 bits version of Sailfish OS, meaning that getting those packages is a bit trickier.

Note you'll need wget to download them, which you'll have to install with pkcon install wget (although you could also use curl, which comes preinstalled with SFOS).

wget https://ftp.uni-erlangen.de/packman/suse/openSUSE_Leap_15.4/Essentials/aarch64/libopencore-amrnb0-0.1.5-pm154.1.1.aarch64.rpm
wget https://ftp.uni-erlangen.de/packman/suse/openSUSE_Leap_15.4/Essentials/aarch64/libopencore-amrwb0-0.1.5-pm154.1.1.aarch64.rpm
wget https://openrepos.net/sites/default/files/packages/7598/gstreamer1.0-plugins-ugly-amr-1.18.5-2.aarch64.rpm

Installing them

Nothing fancy, just use rpm -Uvh:

rpm -Uvh libopencore-amrnb0-0.1.5-pm154.1.1.aarch64.rpm
rpm -Uvh libopencore-amrwb0-0.1.5-pm154.1.1.aarch64.rpm
rpm -Uvh gstreamer1.0-plugins-ugly-amr-1.18.5-2.aarch64.rpm

Work around SailJail!

Then I tried to read the MMS again, but it still failed - that was because the Media app couldn't access the file.

So you just have to fix it by editing SailJail's permission for the Media app:

vi /etc/sailjail/permissions/Music.permission

and adding this line at the end of the file:

whitelist ${HOME}/.local/share/commhistory/data

(Note that you'll need to know how to use vi for that).

Once this is done, you can finally listen to this super important MMS Audio file! ;)

Wrap Up

Not a big deal in the end - huge thanks to the folks in the SFOS Forum thread, and especially to "wetab73" who summed up his findings, and "lpr" who made the above AMR plugin available.


Tags: SailfishOS


I don't have any commenting system, but email me (nicolas at ncartron dot org) your comments!
If you like my work, you can buy me a coffee!