Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does Android support Opus natively? One would hope so, given how open Opus is.


Yes, since 5.0: https://developer.android.com/guide/topics/media/media-forma...

That claims they need to be in a MKV container, but I just use the output of opusenc.


I heard their implementation was really poor?


Ogg container works, and the extension needs to be .ogg not .opus.


It's required by the Android Compatibility Definition Document (in both MKV and Ogg containers), and it's been there since v5.0: https://source.android.com/compatibility/android-cdd.pdf


You can play them in VLC, but a few years ago I remember that Opus wasn't recognised by Android's "media service" (meaning the native players couldn't even detect the existence of Opus files). It's probably changed since then though.

EDIT: It looks like TFA says that Android does use Opus:

> Opus is now widely deployed on a large range of platforms and devices (including Android, iOS, and all major browsers) and is exposed to untrusted data.


Opus in Ogg is natively supported on Android. The extension needs to be .ogg not .opus.


What about matroska (specifically .mka)?


Android supports the codec but there are issues with the MediaStore and how it deals with containers and file extensions.

My tests (on a Pixel running 7.0 and the O beta) have determined that Opus is usually fine as long as the container and file extensions are both Ogg. I have had a few issues with certain files but I'm not sure why yet, I suspect it's album art or something.

I don't believe Android <= 6.0 supports Opus as audio on its own. The CDD initially only required support for Opus in a Matroska container and I attempted to put an Opus-only Matroska file on my phone and none of the players were able to play it. As of either 6.0 or 7.0 (can't remember which), Ogg support is required though.


I've been using Rocket Player with my Android 7 phone and it plays Opus just fine. Money well spent to the pro version.

https://play.google.com/store/apps/details?id=com.jrtstudio....




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: