-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Stream url opened in browser, different behaviour compared to navidrome #367
Comments
Hmm you should check the logs. I guess lms tries to transcode the file. See #351 |
I am using docker and the tag is Here are the logs, I don't seem to recognize a transcoding:
|
Yes you need to enable the debug logs in the lms.conf file (remove "-debug") |
Ok. But how do I change that file? If I enter the container with a docker exec and run /bin/sh, I am user 1000, I cannot modify lms.conf.
Can I change this file and restart the container? |
This is probably because I am using user 1000:1000 in my compose file ... |
You can map the file and specify the conf file to be used when running the container (this is the first arg of the executable being run) |
Hello, I finally could do the test, are the logs:
It seems to me there is no transcoding. |
Thanks for the logs, would you mind testing a new version (if yes, will generate you a docker image)? |
Sure, of course, will be waiting |
You can test 28a80b3
|
Ok, thank you, the library is scanning, I will report back asap |
Hello, there are very good improvements... I see mimetype is available now, along with bitrate. Logs when controlling playback with upnp client, playing to upmpdcli/mpd (seek not functional):
Logs when opening the url from the browser (chrome):
|
Thanks for testing! |
(btw I just noticed you "format=flac" parameter, lms is not able to transcode to "flac", but only to "mp3", "opus" and "vorbis") |
uhm, ok, I kinda suspected there was something there. |
If you ask for format "raw", you are garanteed the file is served without transcoding. Otherwise, it depends on other parameters like That being said, from the logs you pasted, the file is not transcoded and served as is. Maybe there is some header missing in this code path, we would need to compare output with navidrome to check what is missing/different. |
The headers are generated in the same way, it's the same code: the only difference is in the authentication method which is legacy with lms. So with navidrome there are "u" and "s", with lms there are "u" and "p", see the first post. Or are you referring to something else? |
Actually I was just saying that the parameter "format=flac" will not be honored by lms (and neither by navidrome I guess) |
Yes they were the same files! |
I probably added this query argument in the early stages of the development of the plugin, and probably never noticed it's not strictly required. Of course 'format=flac' is not hard-coded, it is taken from the suffix iirc. I will try and see if I can remove all of this, thank you |
I still have the mediainfo output for both url and I am quite positive it's the same file, if needed I can post those outputs |
Sorry to spam here, I see there is a new release, but I see that latest docker image is still from 9 days ago, are they maybe building? Thank you! |
Yes they are building, but it will be nearly the same as the snapshot you already have. |
I have done the test, they are identical: ➜ ~ mkdir test-file-md5 stream?id=tr-105597&format=fl 100%[=================================================>] 43.50M 99.1MB/s in 0.4s 2023-11-13 18:26:05 (99.1 MB/s) - ‘stream?id=tr-105597&format=flac&u=giovanni&p=enc:48456E254357676E5264667A3569417432243439357A6345&c=upmpdcli&v=1.16.1’ saved [45608799/45608799] ➜ test-file-md5 ls -la stream?id=782d67568d643d6ca22 100%[=================================================>] 43.50M 43.6MB/s in 1.0s 2023-11-13 18:27:10 (43.6 MB/s) - ‘stream?id=782d67568d643d6ca22a678f1186f910&format=flac&u=giovanni&s=7ad282d7def7&t=89eb0b011a12f5e7fb782520a9d12624&c=upmpdcli&v=1.16.1’ saved [45608799/45608799] ➜ test-file-md5 ls -la |
I just checked the mpd output and it says a very succint:
|
I just made the necessary changes and confirm that using the query argument 'format' is not strictly needed (both lms and navidrome), thank you |
Ah, it looks like lms does not return "accept-ranges" and according to mpd source code it is needed to consider the stream to be seekable |
oh yes sir, now it works, seeks like a charm :-) |
Thanks again for reporting and testing! |
Hello, I have these two urls for the very same track:
navidrome (traefik reverse proxy)
https://navidrome.mydomain.com:443/rest/stream?id=0f2638a69d0310e14d5e8c29b51a4194&format=flac&u=giovanni&s=111111111111111111&c=upmpdcli&v=1.16.1
lms (no reverse proxy)
http://gruesome04.homelab.local:5082/rest/stream?id=tr-105685&format=flac&u=giovanni&p=enc:111111111111111111111111111&c=upmpdcli&v=1.16.1
I just changed the domain names, the s and p fields.
When I open the navidrome url in the browser, it starts playing.
When I open the other one, the browser offers me a download file suggesting the name "stream".
Obviously it's the same browser.
Both tracks play perfectly on Music Player Daemon (proxied by upmpdcli), but seek operations fail with the lms url: playback would stop immediately if I try to seek the track.
I wonder if this has to do with some missing metadata, but I opened both URLs with 'mediainfo' and the result is identical.
I also tried to generate the url for navidrome skipping the reverse proxy, it still plays directly on the browser, nothing changes.
Do you know what can lead to this different behavior?
Thank you
The text was updated successfully, but these errors were encountered: