koel / koel

🐦 A personal music streaming server that works.
https://koel.dev
MIT License
15.89k stars 1.95k forks source link

KO player progress bar in Microsoft Edge #1769

Closed CCO19 closed 2 months ago

CCO19 commented 3 months ago

Describe the bug In Microsoft Edge, the music playback progress bar shows no progress. There's an animation when the music is loading, but nothing during playback. What's more, when the mouse hovers over the progress bar, “aN:aN” is displayed instead of a duration. On the other hand, everything works under Firefox.

To reproduce How to reproduce the behavior :

  1. Run Microsoft Edge
  2. Open the Koel URL in the address bar
  3. Play any music
  4. Hover over Koel progress bar during playback

**Expected behavior The entire progress bar represents the duration of the music, and a playback progress indicator moves from left to right, allowing you to select a playback position with the mouse.

**Screenshots image

**Environment

CCO19 commented 3 months ago

I've noticed that on the few MP3 files in my library, the problem doesn't occur. This seems to be linked to the FLAC format or the file size.

And after checking, while Firefox does display a progress bar, this is inconsistent at the start of playback of a FLAC file (or a large file, depending on the source of the problem) and increases during playback. Apparently, Koel calculates the duration of the music rather than using the information provided in the file's metadata, which is time-consuming on large files.

Progressbar

CCO19 commented 3 months ago

This is perhaps another subject, but on FLAC format music of a certain length, the Koel cache seems insufficient and I find myself loading before the end of the song (the sound cuts out). I'm thinking that all this seems to be linked to the management of the FLAC format and/or large music files.

CCO19 commented 2 months ago

It seems that these problems are linked to the default activation of MP3 transcoding of audio tracks in FLAC format on Koel. In fact, my server has very few resources (Freebox Delta Server ISP box equipped with a Marvell Armada 8040 SoC at 2 GHz Quad core ARMv8 Cortex-A72 28 nm) and was unable to anticipate the transcoding of audio tracks longer than 4 minutes to FLAC format (perhaps a buffer problem, but I have 14 GB of RAM on my Docker container and more than quadruple that on the client computer).

In my case, the discovery of this "TRANSCODE_FLAC" variable is good news, because I don't want to degrade the quality of my audio files during playback, and because the server's fiber-optic Internet access and the clients' Ethernet or 4G/5G reception allow me to do so. But for those whose network requires MP3 transcoding, it would be preferable to find a solution so that transcoding continues during playback, so as not to cut off playback for a few seconds in the middle of a track lasting more than 4 minutes.

For those who need help, here's my command for running the Koel Docker container:

docker run -d --name koel --restart unless-stopped -p 80:80 -e DB_CONNECTION=mysql -e DB_HOST=koeldb -e DB_DATABASE=koel -e DB_USERNAME=koel -e DB_PASSWORD=koel -e TRANSCODE_FLAC=false --network=koel-net -v /path/to/music:/music -v covers:/var/www/html/public/img/covers -v search_index:/var/www/html/storage/search-indexes phanan/koel

With this command, on my tracks in FLAC format, I have a working progress bar and my music lasting more than 4 minutes is not interrupted by loading... all with top audio quality 👍