icidasset / diffuse

A music player that connects to your cloud/distributed storage.
https://diffuse.sh
Other
808 stars 67 forks source link

FLAC - only format not processing #356

Closed g-dbs closed 1 year ago

g-dbs commented 2 years ago

Hi,

Thanks for this music player, it looks promising!

I've been playing around with it for a bit using Google Drive, and have noticed that while MP3, ALAC and M4A files sync, FLAC does not.

This is curious to me, as I saw suggested in another issue that it might be to do with the size of the file and Google Drive's API. ALAC, however, is just as big as FLAC.

So for the moment, M4A is the highest quality audio I can stream as ALAC is not a format supported by my browser.

Do you have any suggestions as to why it does not scan for FLAC at all, while other formats are supported? Ideally, I would like to stream lossless.

Many thanks.

Netherquark commented 2 years ago

Could you mention your browser and OS?

g-dbs commented 2 years ago

Firefox on Windows 10 and Kiwi Browser (Chromium) on Android. Neither process my FLAC folders.

icidasset commented 2 years ago

Thanks @g-dbs !

FLAC files do normally work, I just tried a 29MB file with Google Drive. There have been some other issues with Google Drive that might have been the cause, definitely some issues in Firefox. You could try out the nightly version that fixed most of those issues and see if that helps? I also just added support for the non-standard x-flac mime type, that could help too. You can find that at: https://nightly.diffuse.sh/

You may also send me a FLAC file for me to test. My email and twitter are on my profile if you want to DM me.

Also, just because the large ALAC file would work, doesn't necessarily mean the large FLAC would work, since they are different formats and thus differently parsed.

g-dbs commented 2 years ago

Hi guys,

Thanks for your replies, and apologies for my delayed response. I'm still having issues with this!

I've been playing around a bit more, and the only success I have had is when a folder with a single FLAC file occasionally syncs when the source is first connected, and every time thereafter. However, any additional tracks added to the folder will not.

I have not successfully been able to sync any more than one FLAC file at a time! Indeed, it seems to stop processing after the first successful occasion. I would need to test more, but could multiple sub-folders also cause problems? My tracks are buried two or three folders deep.

Also worth noting is that I'm using a shared drive.

I may send you a FLAC folder to test with the same conditions, Steven, if you could.

Many thanks,

icidasset commented 1 year ago

but could multiple sub-folders also cause problems? My tracks are buried two or three folders deep.

Could be yeah! Thanks for the detailed notes. If you could share a folder that'd be great 👍 If not, if you could write down the exact folder structure that would help too.

g-dbs commented 1 year ago

but could multiple sub-folders also cause problems? My tracks are buried two or three folders deep.

Could be yeah! Thanks for the detailed notes. If you could share a folder that'd be great 👍 If not, if you could write down the exact folder structure that would help too.

Hi mate. Sorry for the slow response. Been very busy. I've given you access to my Google Drive. You should have received an email. Let me know if not. Many thanks!

icidasset commented 1 year ago

Finally had some time to look at this. Apparently the Google Drive API is telling Diffuse those flac files aren't audio files 🤦

{
  "id": "...",
  "name": "Copy of 14 N.E.W..flac",
  "mimeType": "application/x-flac",
  "trashed": false
}

Normally the mime type should be audio/x-flac. Not sure why it's doing that for all those flac files, but not 01 - Black Mirror.flac 🤔

I'll see if I can ignore the mime type and just check the extension of the file.

icidasset commented 1 year ago

Looks like Diffuse can't get the metadata from the files either, even if I ignore the mime type. Maybe there is something wrong with those files after all... Maybe try re-encoding them and add them again to Google Drive? If it Google thinks it's an audio file it should the proper icon (compare the icon for your 01 - Black Mirror.flac file and the other flac files).