gateship-one / odyssey

Odyssey music player
GNU General Public License v3.0
231 stars 39 forks source link

Some FLAC files not playing #143

Open joubbi opened 6 years ago

joubbi commented 6 years ago

I have many music albums decoded in FLAC. Most of them play fine with odyssey, but there are some that don't play at all. The ones that don't play shows up as 00:00 seconds and the artist is in the id3 tag.

I am able to play the files without a problem with VLC for android. I am also able to play the files with Audacious on my computer, reading from the storage of my phone. I can't see anything wrong with the filenames or tags with Kid3.

Let me know if I can help with debugging the issue somehow.

ildar commented 6 years ago

I guess that the Android music player can't play those files too so that's not Odyssey's fault

gnome17 commented 6 years ago

Hi, in general FLAC files should be supported by odyssey. Does odyssey show an error message when you try to play these files? Are you able to play these files with a music player like Google Play Music or for example Vanilla Music (https://f-droid.org/packages/ch.blinkenlights.android.vanilla/)?

joubbi commented 6 years ago

There are no error messages in odyssey. I installed Vanilla Music. It doesn't even index these problematic FLAC files. This proves that the problem is not in odyssey.

I still would like to understand why and fix it.

ildar commented 6 years ago

ср, 28 марта 2018 г., 2:23 joubbi notifications@github.com:

I still would like to understand why and fix it. Well, you could at least try to share one such file privately.

joubbi commented 6 years ago

I found the culprit. The files that can't be played contain an ID3v2 tag. I don't know why since I did not convert them to flac.

I found the problem by trying to re-encode them with flac:

$ flac *.flac --force --best
ERROR: input file song.flac has an ID3v2 tag

I managed to remove the ID3v2 tag with this:

$ id3convert -s *.flac
Converting song.flac: attempting v1 and v2, stripped v2

After that it was possible to re-encode the file and play it in odyssey.

I still have some files that contain a ID3v2 tag but id3convert says that they don't. I guess I need to find another tool that can remove them.

Does VLC provide it's own codec for flac since it's able to play the files?

ildar commented 6 years ago

So if I got it right, the root of the issue is in container/layout, not in codec. And yes, I guess vlc has its own (different) container handling algo. Flac is usually packed in ogg container so id3 is kind of alien.

joubbi commented 6 years ago

Yes you are correct. The root of the issue is the id3 tags that should not be there. Still this is a very common thing to find. I have many albums ripped with id3 tags.

The developer of flac discusses this problem in this old thread: https://hydrogenaud.io/index.php/topic,30673.0.html See replies 10 to 20.

All my other players are able to handle/ignore the id3 tags besides my Android phone. I have played the files in my car stereo, two different hardware players, Audacious and foobar2000.

There is a tool in linux named id3v2 that is able to remove the tags from my flac files. I'm going through my collection with it at the moment.