Skip to main content
Topic: Android 5 and 6 Opus support via .opus.ogg double filename extension (Read 3406 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Android 5 and 6 Opus support via .opus.ogg double filename extension

On my 2 year old Moto G (2nd Gen) phone now running Marshmallow (Android 6.0) opus files, while I could play them in certain apps like VLC, tended to generate Windows warnings that they may not be compatible with the device when I transfer over USB and weren't supported by Google Music or my file managers.

I found reference to a workaround that renaming the files to filename.ogg would work, so to make it obvious to me, I renamed a couple to filename.opus.ogg and they work great in Google Music.

I'm not a foobar2000 titleformat expert, so couldn't figure out how to make it work in File Operations/Rename, but I found a good Command Prompt line that works recursively through subfolders renaming all .opus files to .opus.ogg, so if you want to rename all .opus files on your PC, modify the first line to get to your Music folder then use the second line to work recursively through them all renaming any .opus files you have:

Code: [Select]
cd C:\Users\MyUserName\Music
for /R %x in (*.opus) do ren "%x" *.opus.ogg

For new encoding using the Foobar2000 converter, I simply use the Custom Encoder and set the extension to .opus.ogg instead of .opus
Dynamic – the artist formerly known as DickD

Re: Android 5 and 6 Opus support via .opus.ogg double filename extension

Reply #1
Thanks for posting this.

I just did a check on a few Samsung devices (i9100, i9305, SM-G900F) running Android 6 (CyanogenMod 13).  The native music player does indeed recognise and play Opus files without issues when the extension is changed from '.opus' to '.ogg'.

There's no need to append a '.ogg' extension to an existing '.opus' extension; simply substituting '.opus' with '.ogg' is sufficient (as far as I'm aware, the system would only recognise the extension after the last dot anyway, anything before is seen as part of the filename).

We knew that Android 6.0 made it mandatory to decode Opus streams in Matroska containers (as discussed in an earlier thread and outlined in the compatibility document here).  We now know that it treats Opus encoded files just like Vorbis encoded files when the file extension is changed.  Heaven knows why Google dislikes the '.opus' extension.

Re: Android 5 and 6 Opus support via .opus.ogg double filename extension

Reply #2
Of course there is no need to append but if you do you'll know which one is the Opus file, for example for comparisons.

Re: Android 5 and 6 Opus support via .opus.ogg double filename extension

Reply #3
I know the thread is old, but my question is kinda relevant (and I don't mind the neat workaround to be bumped):

A .opus file is still nothing but an .ogg file with a different file extension, right? If I change back and forth the file extension, there is no way to tell whether it was created as .opus or as .ogg?

(Everything assuming that the file has only one audio stream and that is of type Opus blah blah blah.)
Memento: this is Hydrogenaudio. Do not assume good faith.

 

Re: Android 5 and 6 Opus support via .opus.ogg double filename extension

Reply #4
Ogg is the container format, originally used for the Vorbis coding format (hence "Ogg Vorbis"), but now also used for Opus (which should actually be "Ogg Opus").

So using the extension ".opus.ogg" describes the file format quite well.

 
SimplePortal 1.0.0 RC1 © 2008-2018