epoupon / lms

Lightweight Music Server. Access your self-hosted music using a web interface.
http://lms-demo.poupon.dev
GNU General Public License v3.0
1.13k stars 62 forks source link

Song initially taking a long time to load under bad network conditions #72

Open ghost opened 4 years ago

epoupon commented 4 years ago

Hi! Some questions:

epoupon commented 4 years ago

Ok! Maybe the proxy is actually buffering the requested file? Please try the following directive to check if that helps:

    proxy_buffering off;
epoupon commented 4 years ago

Hmm I have another idea, could you please test with a MP3 file? (or enabling transcoding to MP3) Maybe the browser needs to download the whole file to get some metadata stuff at the end of the file or something

epoupon commented 4 years ago

Ok, so not sure I can do something about the opus start latency...

epoupon commented 4 years ago

I will try to reproduce to have more ideas.

epoupon commented 4 years ago

Ok, I reproduced the issue using the "Slow 3G" network profile of chrome. This is strange, it depends on the files. Some MP3 files need to get as few bytes (100/ 200KBytes) and play nearly instantly, some others need at least 1 or 2MB to start playing (that it to say you have indeed to wait for dozens of seconds). I guess it is related to the way they are encoded. Note there is no problem with transcoding, since the file is reencoded and streamed in another way, like a web radio. Really not sure about what I can do for this :/

epoupon commented 4 years ago

34 would help for sure, but the issue would remain in a lot of cases.

epoupon commented 4 years ago

Yes, that would help in some case, but not if the user decides to switch to a new song for example. Unfortunately, it would make #67 even worse.