Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: OPUS not working on Android 6.0+ phone. (Read 6539 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

OPUS not working on Android 6.0+ phone.

It looks like there is something odd with the implementation or I am doing something wrong.

This thread says that after changing the extension from .opus to .ogg Google Music player seems to play OPUS files without any problem.
https://hydrogenaud.io/index.php/topic,112798.0.html

I just tried to do the same on a Samsung Galaxy S7 running Nougat (7.0) and while the track now appears on the player, pressing play results in silence.

Did something between 2016 (that the thread was created) and now changed on the encoder that broke native Android support on Android or it's an issue that I'm the only one encountering?

Re: OPUS not working on Android 6.0+ phone.

Reply #1
I have just tried to replicate your problem on my S7 Edge running stock Nougat 7.0 and renamed opus file played fine in Google Play music and Samsung's player.

If age or weaknes doe prohibyte bloudletting you must use boxing

Re: OPUS not working on Android 6.0+ phone.

Reply #2
I'm having a feeling there is something wrong with some settings I use or something that puts off the decoder.

EDIT: I found the issue. I guess I just found a bug. Setting --framesize to 60 results into this issue. Setting it to 2.5, 5, 10, 20, 40, seems to work.
I would like to know is this issue is with the encoder or the decoder so I could report this bug on the correct place.

Google claims that their decoder is based on libopus 1.2.1
I don't know if back then it was a known problem that got fixed since then or framesize 60 was simply not supported yet.

Re: OPUS not working on Android 6.0+ phone.

Reply #3
From the OpusFAQ:

"A 20ms frame size works well for most applications. Smaller frame sizes may be used to achieve lower latency, but have lower quality at a given bitrate.
Sizes greater than 20 ms increase latency and are generally beneficial only at fairly low bitrates, or when used to reduce external overhead (e.g. by reducing the number of packets that are sent). For file encoding, using a frame size larger than 20 ms will usually result in worse quality for the same bitrate because it constrains the encoder in the decisions it can make. "

The default (i.e. not specified) framesize is 20ms when using opusenc.exe.  Did you encode your own Opus files or get them from a third party?  If the latter, it would be a good idea to let them know this.

Re: OPUS not working on Android 6.0+ phone.

Reply #4
I encoded them myself using the --framesize 60 parameter. If I encode files with any other compatible value but 60 it works. Files with a framesize of 60 though upset Android's native decoder. Considering that Android' s native decoder is based on libopus 1.2.1 I think it wouldn't hurt if I'd report this bug over here.

Re: OPUS not working on Android 6.0+ phone.

Reply #5
Confirmed in LOS 14.1. OGG opus files with framesize=60 fail to play.

if you have to use  --framesize 60, you can remux to mka or use other players like vlc.

Re: OPUS not working on Android 6.0+ phone.

Reply #6
Confirmed in LOS 14.1. OGG opus files with framesize=60 fail to play.

if you have to use  --framesize 60, you can remux to mka or use other players like vlc.
This is not what I want to do though.


Re: OPUS not working on Android 6.0+ phone.

Reply #8
I encoded them myself using the --framesize 60 parameter. If I encode files with any other compatible value but 60 it works. Files with a framesize of 60 though upset Android's native decoder. Considering that Android' s native decoder is based on libopus 1.2.1 I think it wouldn't hurt if I'd report this bug over here.

I guess what I don't understand is why you chose that framesize over the recommended, default one.  Were you trying to make them compatible with some non-Android device that would not decode the default framesize?

Re: OPUS not working on Android 6.0+ phone.

Reply #9
At what bitrate are you encoding your files?
Does it matter? The bug is happening whatever the bitrate.
I guess what I don't understand is why you chose that framesize over the recommended, default one.  Were you trying to make them compatible with some non-Android device that would not decode the default framesize?
No, it was mostly a test for lower bitrates.


Re: OPUS not working on Android 6.0+ phone.

Reply #11
At what bitrate are you encoding your files?
Does it matter? The bug is happening whatever the bitrate.

I'm asking because there is no reason to use --framesize 60 unless you're encoding at a very very low bitrate and trying to save every last bit.
True but when it makes sense to use it, it still doesn't work. Remember this is a bug report. It supposed to bring up the fact that using that parameter it creates files that are not working on Android when they should, not whether I should or not use that parameter. My guess is that either the encoder creates a somewhat flawed stream that most decoders tolerate it but Android doesn't or simply Android's decoder simply sucks. Heh!