HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: alter4 on 2014-12-05 15:22:40

Title: Android 5 & OPUS
Post by: alter4 on 2014-12-05 15:22:40
I have head Android 5 has opus native support, my nexus 4 got the newest android and I uploaded few opus files into phone memory and tried to play them using google music application. It doesn't work! What am I doing wrong?
Title: Android 5 & OPUS
Post by: saratoga on 2014-12-05 15:48:04
I haven't tested, but maybe the Google Music app hasn't been updated to recognize Opus?  The android sdk does say that 5.0 has Opus support, but I suppose apps will still have to be updated to recognize the new file format.
Title: Android 5 & OPUS
Post by: alter4 on 2014-12-05 16:25:09
It make sense to add  it doesn't even see opus files, and can't play if I force to open using explorer.
Title: Android 5 & OPUS
Post by: DonP on 2014-12-05 17:44:43
I have head Android 5 has opus native support, my nexus 4 got the newest android


argh.. my nexus 7 is still getting the 4.4.4 update which always fails to install.
Title: Android 5 & OPUS
Post by: ieee754 on 2014-12-09 20:38:26
I can't play any Opus files on Lollipop either at the moment. If it's supported natively then perhaps soon we will see Opus support in major players like Poweramp.
Title: Android 5 & OPUS
Post by: alter4 on 2014-12-10 15:55:31
This "supported natively" it is a real stumbling block for me. Everyone can interpret "natively" differently.
I expect I can play opus files by google music app, someone else accepts android core can decode opus stream and so on so force. So the question is there any person that is able to clarify what does this  "supported natively" mean? 
Title: Android 5 & OPUS
Post by: saratoga on 2014-12-10 16:49:18
The decoder is included in the os and be called from any app running on the device.

It doesn't mean all apps gain the ability to play opus files. That is up to each app to decide if they want to add support for the format.
Title: Android 5 & OPUS
Post by: zeremy on 2014-12-10 18:20:55
I can't play any Opus files on Lollipop either at the moment. If it's supported natively then perhaps soon we will see Opus support in major players like Poweramp.


With MX Player Pro I can play opus -I'm stuck with 4.2.2 rom.
Even though it is a video player you can use it as an audio player also.
Select  settings>Audio>Audio Player to use as audio player.

I stopped waiting for poweramp to include opus support.....

Title: Android 5 & OPUS
Post by: ieee754 on 2014-12-10 18:57:22
I can't play any Opus files on Lollipop either at the moment. If it's supported natively then perhaps soon we will see Opus support in major players like Poweramp.


With MX Player Pro I can play opus -I'm stuck with 4.2.2 rom.
Even though it is a video player you can use it as an audio player also.
Select  settings>Audio>Audio Player to use as audio player.

I stopped waiting for poweramp to include opus support.....




I prefer using audio player for features like organizing playlists, but thanks for suggestion.

For me native support means that OS provides a function to play it, for example in the Media API, so it should be very simple to implement opus playback.
Title: Android 5 & OPUS
Post by: IgorC on 2014-12-10 19:27:46
It might be interesting. There was a review of different audio players on Android. Link (https://translate.google.com/translate?sl=ru&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Faudiophilesoft.ru%2Fpubl%2Fmy%2Fandroid_audio_players_comparison%2F11-1-0-348&edit-text=)

According to it Neutron player is very powerful alternative which support Opus among a lot of other formats.
Title: Android 5 & OPUS
Post by: Martel on 2014-12-11 17:56:03
So Google does not know how to implement the API in a way similar to Windows (DirectShow and the like)? It allows for generic players (like Windows Media Player or Media Player Classic). Installing a codec is enough to support a previously unsupported format on existing players without any changes to the player at all.

Or is it just that no developer coded their player to take advantage of this?
Title: Android 5 & OPUS
Post by: saratoga on 2014-12-11 18:08:06
It works essentially the same way as windows. Apps on both formats can decode any format the os understands but that doesn't mean you can use any format in any program.
Title: Android 5 & OPUS
Post by: Yoshi17 on 2014-12-20 15:27:29
Why native support is so important ?
Your computer OS do not support natively FLAC or Opus (windows 7, 8, 8.1 or Mac X and above), so you probably use Foobar 2000 or an equivalent to read FLAC or Opus files. With an Android based OS there is no issue to use any third party software capable of doing this.
For example I use Neutron music player (on a Xperia Z3 Compact) to read Opus files at average 130 Kbps bitrate and I do not care if my Android version support it natively or not.
Title: Android 5 & OPUS
Post by: me7 on 2014-12-20 19:23:26
Battery life. A native decoder implemented in Android that runs on a DSP requires far less power than a selfmade decoder in an app, running on an actual CPU core.
Title: Android 5 & OPUS
Post by: lvqcl on 2014-12-20 20:06:04
A native decoder implemented in Android that runs on a DSP

I doubt that such audio decoders exist.
Title: Android 5 & OPUS
Post by: jmvalin on 2014-12-20 20:17:59
A native decoder implemented in Android that runs on a DSP

I doubt that such audio decoders exist.


Of course that exists. Opus runs of TI C55xx and C6xxx series, on Blackfin, and probably on just about any DSP with a C compiler. That being said, audio decoding is so incredibly cheap these days that I doubt it makes a difference where it's running exactly.
Title: Android 5 & OPUS
Post by: lvqcl on 2014-12-20 21:39:38
Interesting, thanks.

Quote
The C55x CPU provides two multiply-accumulate (MAC) units, each capable of 17-bit x 17-bit multiplication and a 32-bit add in a single cycle. [...] In addition, the TMS320C5535 includes a tightly coupled FFT Hardware Accelerator [that] supports 8- to 1024-point (in power of 2) real and complex-valued FFTs.
(It's a bit unfortunate for Opus that it also requires radix 3 and 5 butterflies  )
Title: Android 5 & OPUS
Post by: saratoga on 2014-12-21 00:50:12
TI parts aren't used in phones or tablets so that doesn't really matter with respect to this thread.
Title: Android 5 & OPUS
Post by: jmvalin on 2014-12-21 03:23:54
Interesting, thanks.

Quote
The C55x CPU provides two multiply-accumulate (MAC) units, each capable of 17-bit x 17-bit multiplication and a 32-bit add in a single cycle. [...] In addition, the TMS320C5535 includes a tightly coupled FFT Hardware Accelerator [that] supports 8- to 1024-point (in power of 2) real and complex-valued FFTs.
(It's a bit unfortunate for Opus that it also requires radix 3 and 5 butterflies  )


Most importantly, the C55x is a 16-bit architecture where ints, pointers and even *chars* are 16-bits wide. This makes it a real PITA to program because you can't address 8-bit bytes and the memory is split into segments.
Title: Android 5 & OPUS
Post by: YellowOnion on 2014-12-21 04:20:18
Both VLC and GoneMAD support Opus (even in 4.4), VLC even supports Opus in MKV (which the desktop version doesn't), Been making a few micro-rips using 64kbps Opus and some low bitrate (325kbps) x264 @ 360p.

I would be curious if just the matter of keeping the CPU idle to instruct the DSP is worth the while when you could just be running the decoder on the CPU, At low clock speeds the CPU generally don't see much power saving.
Title: Android 5 & OPUS
Post by: lothario15 on 2014-12-23 00:44:31
...VLC even supports Opus in MKV (which the desktop version doesn't), Been making a few micro-rips using 64kbps Opus and some low bitrate (325kbps) x264 @ 360p.


Thanks for posting this.  I'll now be using Opus for video consumption on portable devices.
Title: Android 5 & OPUS
Post by: foxyshadis on 2015-01-28 06:46:18
Opus is a pretty medium-complexity codec, compared to HE-AAC (let alone video). It's about the same speed as LC-AAC, half the speed of Vorbis and MP3, and twice as fast as HE-AAC. (FLAC is in a league of its own; it's as fast on CPU as other codecs are on dedicated hardware.) Dedicated hardware would have been a game-changer in the iPod days, but right now it's unlikely that it'd even send a single A7 core into a higher power state.

As long as it's supported in the OS, that at least means devs don't have to bundle a library, which is a big plus for developers. Hopefully the base player will be updated soon; it's pretty shocking that it wasn't at the time.
Title: Android 5 & OPUS
Post by: Anakunda on 2015-01-28 08:34:34
Can CM12 users say if native Opus decodeing is already present or not?
Title: Android 5 & OPUS
Post by: Anakunda on 2015-04-15 15:33:51
I finally moved to Android 5 and guess what..NO Opus support ;(
The libs list in filesystm says it clear - no opus decoder supplied
I guess the library should be named libste_dec_opus.so
Title: Android 5 & OPUS
Post by: alter4 on 2015-04-15 20:22:01
Finally certain post. These months I felt like it is necessary to catch a black cat as she there simply is not present in a dark room.
Title: Android 5 & OPUS
Post by: filou85 on 2015-04-15 22:00:44
The CM12 optimized (http://forum.xda-developers.com/galaxy-s4/i9505-orig-develop/rom-cyanogenmod-12-t2943934) version I have installed on Samsung Galaxy S4 has the libopus.

The find / -name *opus* command returns:
/system/lib/libstagefright_soft_opusdec.so
/system/lib/libopus.so

However I didn't test opus with it.

I also observe that raw cyanogen roms are most of the time broken, even when it a stable version.
Title: Android 5 & OPUS
Post by: Anakunda on 2015-04-16 06:31:29
/system/lib/libstagefright_soft_opusdec.so
/system/lib/libopus.so

Strange, I have present these two libs also.
Could you test in both Eleven player and Poweramp?
Poweramp (uses Android system decoder) was able to recognize the audio file only after changing .opus to .ogg but no play though
Title: Android 5 & OPUS
Post by: saratoga on 2015-04-17 04:54:45
Could you test in both Eleven player and Poweramp?
Poweramp (uses Android system decoder) was able to recognize the audio file only after changing .opus to .ogg but no play though


Do either of those apps even support Opus?

Edit:  5.1 on my nexus reports that it supports Opus up to 510 kbit/s and 8 channels.
Title: Android 5 & OPUS
Post by: Anakunda on 2015-04-17 05:19:13
What Android are U using? Though I've found respective opus libs installed I get no Opus playback.
Eleven doesn't recognize .opus files. .ogg files recognized with header parsing (track length identified) but nevertheless error on playback
Ringtones in Opus don't play either.
Title: Android 5 & OPUS
Post by: saratoga on 2015-04-17 05:23:27
What Android are U using? Though I've found respective opus libs installed I get no Opus playback.


AOSP.

Eleven doesn't recognize .opus files. .ogg files recognized with header parsing (track length identified) but nevertheless error on playback
Ringtones in Opus don't play either.


See first reply to this thread and also my subsequent reply. 
Title: Android 5 & OPUS
Post by: filou85 on 2015-04-17 13:38:05
/system/lib/libstagefright_soft_opusdec.so
/system/lib/libopus.so

Strange, I have present these two libs also.
Could you test in both Eleven player and Poweramp?
Poweramp (uses Android system decoder) was able to recognize the audio file only after changing .opus to .ogg but no play though


Just tested with files from opus-codec.org (http://www.opus-codec.org/) and it's work out of the box with Eleven. I will not test with Poweramp.
Title: Android 5 & OPUS
Post by: apastuszak on 2015-05-04 05:39:41
Why native support is so important ?
Your computer OS do not support natively FLAC or Opus (windows 7, 8, 8.1 or Mac X and above), so you probably use Foobar 2000 or an equivalent to read FLAC or Opus files. With an Android based OS there is no issue to use any third party software capable of doing this.
For example I use Neutron music player (on a Xperia Z3 Compact) to read Opus files at average 130 Kbps bitrate and I do not care if my Android version support it natively or not.


Native Support is important because it means any app on Andoid can play an Opus file with a simple API call.  The same API call that most apps use now to play audio would just be able to decode OPUS files also.

So adding OPUS support would require minimal, if any, code change.
Title: Android 5 & OPUS
Post by: lothario15 on 2015-05-07 22:56:17
According to this bug report (https://code.google.com/p/android/issues/detail?id=158490), someone has found that Opus audio plays natively when in a Matroska container but not when in an Ogg container.  They don't specify whether the file used an .mka (Matroska audio) or .mkv (Matroska video) extension.
Title: Android 5 & OPUS
Post by: alter4 on 2015-10-03 21:49:01
Does anybody know how the things are going in Android 6?
Title: Android 5 & OPUS
Post by: apastuszak on 2015-10-06 03:56:09
According to this bug report (https://code.google.com/p/android/issues/detail?id=158490), someone has found that Opus audio plays natively when in a Matroska container but not when in an Ogg container.  They don't specify whether the file used an .mka (Matroska audio) or .mkv (Matroska video) extension.


Are there any advantages to a Matroska audio container over an ogg container?
Title: Android 5 & OPUS
Post by: saratoga on 2015-10-06 04:56:27
Does anybody know how the things are going in Android 6?


Google music plays ordinary .opus files for me marshmallow.
Title: Android 5 & OPUS
Post by: lothario15 on 2015-10-25 22:26:18
Does anybody know how the things are going in Android 6?


Google music plays ordinary .opus files for me marshmallow.


Is that the Google Play Music app on a Nexus?

I ask because the latest Android compatibility document for 6.0 (https://static.googleusercontent.com/media/source.android.com/en//compatibility/android-cdd.pdf) mandates Opus support but only within a Matroska container (see section 5.1).  OEMs can provide wider support if they choose but I'm unsure whether many would bother going beyond what Google demand.

Do you mind checking if Google have added full OS-wide support for Opus in an Ogg container, or whether it's just their music app? I'm running CyanogenMod 12.1/Android 5.1.1 and the music player doesn't see .mka or .opus files.  I can play Opus .mka files by opening them from the file explorer but .opus files do not play at all.
Title: Android 5 & OPUS
Post by: saratoga on 2015-10-25 22:34:50
Does anybody know how the things are going in Android 6?


Google music plays ordinary .opus files for me marshmallow.


Is that the Google Play Music app on a Nexus?


Correct.

Do you mind checking if Google have added full OS-wide support for Opus in an Ogg container, or whether it's just their music app?


Off hand i'm not sure how I would do this? 
Title: Android 5 & OPUS
Post by: Lear on 2015-10-26 10:58:08
Do you mind checking if Google have added full OS-wide support for Opus in an Ogg container, or whether it's just their music app?


Off hand i'm not sure how I would do this?

I'm not sure if it counts as OS-wide support, but I tried using .opus files as ring signal and alarm sound for the Google Clock app, and that worked fine on Android 6 (it didn't in 5.1). I tested this on a Nexus device.
Title: Android 5 & OPUS
Post by: darkbyte on 2015-10-26 15:21:54
I'm not sure if it counts as OS-wide support, but I tried using .opus files as ring signal and alarm sound for the Google Clock app, and that worked fine on Android 6 (it didn't in 5.1). I tested this on a Nexus device.

I think it counts  Good to hear that! Hopefully my Moto X Play gets Marshmallow love soon.
Title: Android 5 & OPUS
Post by: lothario15 on 2015-10-26 23:37:48
I'm not sure if it counts as OS-wide support, but I tried using .opus files as ring signal and alarm sound for the Google Clock app, and that worked fine on Android 6 (it didn't in 5.1). I tested this on a Nexus device.

I think it counts  Good to hear that! Hopefully my Moto X Play gets Marshmallow love soon.


Yeah, this seems to indicate that support is baked-in at OS level.  Thanks for testing, Lear.  I now have an incentive to upgrade to the next CM.

Saratoga, the other test I'd suggest would be simply opening a .opus file from the file explorer.  According to the comprehensive Marshmallow review at arstechnica.com, Marshmallow introduces the first out-of-the-box file explorer (http://arstechnica.co.uk/gadgets/2015/10/android-6-0-marshmallow-thoroughly-reviewed/7/#h2).  On 5.1, opening a .opus file in a file explorer throws up an error.  If it plays-back the audio or presents the intents menu on 6.0, then I'd take that as further confirmation.

[EDIT: added hyperlink]
Title: Android 5 & OPUS
Post by: m45t3r on 2015-11-15 00:35:14
I'm not sure if it counts as OS-wide support, but I tried using .opus files as ring signal and alarm sound for the Google Clock app, and that worked fine on Android 6 (it didn't in 5.1). I tested this on a Nexus device.

I think it counts  Good to hear that! Hopefully my Moto X Play gets Marshmallow love soon.

Just want to add: I just update my Moto X (2014) with Marshmallow. It does include .opus support, I can play .opus files with Google Play Music if I open them explicit. However Google Play Music does not seem to index them, so it is pretty useless.

And I can't select .opus files as ringtones too, so it seems Motorola did a half baked addition of .opus support in Marshmallow. While this may change until Marshmallow comes to Moto X Play, I wouldn't hold my hopes.
Title: Android 5 & OPUS
Post by: Lear on 2015-11-16 10:33:48
And I can't select .opus files as ringtones too, so it seems Motorola did a half baked addition of .opus support in Marshmallow. While this may change until Marshmallow comes to Moto X Play, I wouldn't hold my hopes.

I didn't think about it at the time, but I probably used Solid Explorer to select the ring tone. Opus tracks doesn't show up in the "Media Storage" app (i.e., the default ring tone selector) for me either.
Title: Android 5 & OPUS
Post by: m45t3r on 2015-11-16 13:03:33
I didn't think about it at the time, but I probably used Solid Explorer to select the ring tone. Opus tracks doesn't show up in the "Media Storage" app (i.e., the default ring tone selector) for me either.

What I am reporting is exactly this: I used ES Explorer (however the result should be the same with another File Manager), and got a toast notification after selecting my .opus file that roughly translates to this (my phone is setup to Portuguese, sorry):

Quote
This file format is not supported.


However, someone said that maybe renaming a .opus file to .ogg may work, without tag support though. Not really important for ringtones, however I would like to listen to those .opus files in Google Play Music too. So yeah, a half baked support of .opus files in anything that isn't a Nexus (or at least anything coming from Motorola).