enricocid / Music-Player-GO

🎢🎼 Very slim music player πŸ‘¨β€πŸŽ€ 100% made in Italy πŸ•πŸŒ³πŸŒžπŸπŸŒ„
GNU General Public License v3.0
1.79k stars 216 forks source link

Improving formats support #68

Open Knusper opened 5 years ago

Knusper commented 5 years ago

My favorite app would become even more fun if it would be able to play ogg vorbis files.

enricocid commented 5 years ago

Sorry for the late reply and Thanks for feedback. Can you please provide some samples here so I can test the app against them?

Actually, I can play ogg vorbis on my device. I tried this sample. and it is working. In facts, ogg vorbis is supported in Android media player.

There may be any other issue related to the files I want to investigate.😁 Maybe there's something wrong in the songs retrieval mechanism I have to fix/improve.

riveravaldez commented 4 years ago

Hi, sorry if this is not the right place, but I think it's related enough:

I can confirm that some .opus files (ogg-related, by the Xiph.Org Foundation and standardized by the Internet Engineering Task Force [1]) are also unable to be played by my beloved Music Player GO - at least the .opus files generated from YT via youtube-dl -x URL.

I attach an example. C.R.O - Beso Amargo (Shot by BALLVE)-iMvQPR1y2.zip

Hardware/Software: LG-H735AR Android 6.0 kernel 3.10.49 Music Player GO 3.6.9.1

[1] https://en.wikipedia.org/wiki/Opus_(audio_format)

enricocid commented 4 years ago

@riveravaldez Thanks for reporting. Gonna try exo player to see if I can fix the problem πŸ˜‰

enricocid commented 4 years ago

Screenshot_20191204-092358

I got it working by changing the extension of the file from .opus to .ogg or .mkv.

.opus is not even recognized by Android itself, at least not on Files by Google, Telegram x etc. MPGO implements native MediaPlayer support, so it seems that this is an Android limit, unfortunately. In fact, looking on supported MediaPlayer formats:

https://developer.android.com/guide/topics/media/media-formats

one understand that the supported container/file type for .opus files is .mkv. The supported container for vorbis instead is .ogg or .mkv. So for .opus files one can rename .opus to .ogg or .mkv.

Edit: unfortunately I can't fix this. All You can do is rename opus and vorbis files to match the supported container. To do that check the link above (Supported File Type(s) / Container Formats column to know the extension) πŸ‘ŒπŸ˜

riveravaldez commented 4 years ago

@enricocid, you're right, thanks a lot for all the work and the info.

BTW, I've checked that while the Android default file-browser doesn't recognize the file-format with .opus extension, some others file-browsers (from F-Droid, in my case) offer to open the file with MPGO and the Android default music-player. This last one plays the file (but doesn't show it if you look for it from the app itself). And MPGO will play the file if you just change the extension to any recognized extension (I tried with .ogg, .mkv, .mp3 and .mp4, and in all cases MPGO played the file).

Just to add some info. If I can do anything else to help please let me know.

Best regards and thanks again!

curbengh commented 4 months ago

.opus is recognised by MediaStorage since Android 10 and I can play it just fine with this app. One issue I found is the DATE field in Vorbis Comment (used by Vorbis .ogg and Opus .opus) is not parsed by the MediaStorage, so any music apps that utilise that database couldn't show the year. This issue still persists in Android 14.

MediaStorage probably does parse the field and store it in the DATE column instead of YEAR column?

I have some samples for anyone wanted to test. mp3-vorbis-opus.zip contains 6 audio files: 3 types (mp3, vorbis, opus) each with 2 names, "date" has DATE=1938-08-06 tagged while "year" has DATE=1938.