zyrouge / symphony

🎵 Lightweight, elegant music player for Android 9+.
https://zyrouge.github.io/symphony/
GNU Affero General Public License v3.0
1.17k stars 77 forks source link

[Feature Request] Identify Opus audio as separate from Ogg in audio information #400

Open opusforlife2 opened 8 months ago

opusforlife2 commented 8 months ago

Description

Currently, Opus audio shows up as OGG in the player screen. I'm not sure if it's merely because the codec is missing in a list somewhere, or because the app shows the container instead of the actual codec.

Solution

If Opus merely needs to be added to a list, then that's fine. But if the app chooses to show the container instead of the codec, then my request is for that to be changed.

Checklist

zyrouge commented 7 months ago

Seems like I am deriving the container by using mimetype. I'm not sure if there is a way to identify the codec without actually manually doing it. Might look into this later when custom parsers are implemented.

opusforlife2 commented 7 months ago

How do other players like Vanilla do it? I think there must be a function to obtain the codec info.

zyrouge commented 7 months ago

How do other players like Vanilla do it? I think there must be a function to obtain the codec info.

Afaik, Vanilla has it's own metadata decoder. There is a way to do it but it doesn't seem to be suitable.

opusforlife2 commented 7 months ago

Oh, I see. What about Retro? That shows Opus correctly too. (Sorry, I would have checked and spared you the effort, but I've tried and I don't know how to find the relevant code.)

Edit: This maybe? https://github.com/RetroMusicPlayer/RetroMusicPlayer/blob/1859354f94a70456dc6fbe1c6b208245ab2f0c5b/app/src/main/java/code/name/monkey/retromusic/util/FileUtil.java#L172

zyrouge commented 7 months ago

Oh, I see. What about Retro? That shows Opus correctly too. (Sorry, I would have checked and spared you the effort, but I've tried and I don't know how to find the relevant code.)

Edit: This maybe? https://github.com/RetroMusicPlayer/RetroMusicPlayer/blob/1859354f94a70456dc6fbe1c6b208245ab2f0c5b/app/src/main/java/code/name/monkey/retromusic/util/FileUtil.java#L172

Mimetype can only be used to derive container. Also, most of the functionality of Retro uses JAudioTagger which requires direct access to file. There might be custom implementation of metadata decoder in Symphony to efficiently do that.

opusforlife2 commented 2 months ago

This looks like it's happening with 'metaphony'?

zyrouge commented 2 months ago

This looks like it's happening with 'metaphony'?

Has not been implemented yet.

opusforlife2 commented 2 months ago

I mean the base is being developed, right?