|
Post by imgmling on Jan 16, 2017 1:45:37 GMT -5
GoneMAD is the best player I've ever used. Of course I bought it. Keep up the good work!
However I found an issue. When using the GMMP's custom engine, playback of opus streams inside ogg container doesn't work. My device is Nexus 5X, Android 7.1.1. Can you please reproduce this issue and fix it? Disabling GMPP's custom engine solves this problem, but I lose some other functionality.
|
|
|
Post by GoneMAD on Jan 16, 2017 9:56:09 GMT -5
it most certainly works opus in an ogg container needs the .opus extension to work in gmmp en.wikipedia.org/wiki/Opus_%28audio_format%29"Containers Opus was originally specified for encapsulation in Ogg containers, specified as audio/ogg; codecs=opus, and for Ogg Opus files the .opus filename extension is recommended"
|
|
|
Post by imgmling on Jan 17, 2017 2:19:27 GMT -5
"Google's Android supports the Opus audio codec natively since version 5.0 ("Lollipop"),[40][41] though built-in players require files to be encapsulated in Ogg, WebM or Matroska containers with a .ogg, .webm or .mka filename extension instead of .opus, for them to be treated like other supported audio formats and indexed by the media scanner service."
Why is the file extension relevant for GMMP? In both cases (.opus or .ogg) this is a valid ogg container. The problem with .opus in Android is that when you try to open such file, Android doesn't recognize it as a media file (try it in any file browser), so it can not be opened in GMMP externally.
My proposal is for GMMP to play opus streams from files with both extensions. It should already play vorbis from ogg (I haven't tried), so I see no reason not to play opus from ogg.
|
|
|
Post by GoneMAD on Jan 17, 2017 10:34:35 GMT -5
because gonemads audioengine uses the extension to pick the decoder. .ogg will use the vorbis decoder and .opus will use the opus decoder. GMMP follows the recommended naming scheme and supported opus way before android natively did ( was added in Jan 2013, lollipop came out Nov 2014.. essentially 2 years later). I cannot simple rewrite the engine just because google decided to do it a different way. One of the reasons i cannot modify the engine is the tagging library GMMP uses requires the extension as well. github.com/taglib/taglib/blob/master/taglib/fileref.cppif(ext == "OPUS") return new Ogg::Opus::File(arg, readAudioProperties, audioPropertiesStyle);
|
|
|
Post by imgmling on Jan 18, 2017 9:50:13 GMT -5
I understand your position and the current situation. However don't you think that the decoder should be chosen based on container description rather than file extension? After all OGG containers can support Vorbis, Opus, FLAC and so forth. For example this would mean that you don't support FLAC in OGG container. Google didn't decide anything. They proposed an additional .opus extension. Just like other valid container extensions like .ogg, .webm, .mka. Codec selection should be independent from file container.
And then from 2016 we have RFC7845.
However in order to keep the current design, I propose something like (pseudo code as I don't know taglib's internals and don't speak C++ since long time ago):
if(ext == "OGG") { File *f = new Ogg::Vorbis::File(arg, readAudioProperties, audioPropertiesStyle); if (f == null) { f = new Ogg::Opus::File(arg, readAudioProperties, audioPropertiesStyle); } if (f == null) { f = new Ogg::Flac::File(arg, readAudioProperties, audioPropertiesStyle); } return f; }
Of course the Ogg class can have a method which just returns the codec inside the container, so based on this result, the correct codec can be initialized.
|
|
|
Post by imgmling on Jan 18, 2017 9:52:42 GMT -5
If you would like, I can contribute to taglib and make a pull request.
|
|
|
Post by GoneMAD on Jan 18, 2017 11:17:29 GMT -5
"However don't you think that the decoder should be chosen based on container description rather than file extension?" Yeah it definitely should, however that information is not provided to gmmp at this time for ogg. For m4a gmmp will do something like that.. taglib reads whether its aac or alac and the engine sets the decoder according. Now to be fair.. yeah i could code my own solution for opus, but just from looking at the trello board trello.com/b/JCyp2kas/gonemad-music-player-development there is no shortage of work that affects a higher % of the userbase which is where i try to focus my efforts Definitely put in a pull request if you are able to. I will probably be updating all of the libs for GMMP 3.0
|
|
|
Post by imgmling on Mar 5, 2017 3:35:01 GMT -5
Thank you so much for fixing this issue in the latest version! You made me really happy today. Now GMMP recognizes correctly Opus inside OGG containers.
Cheers
|
|