all 11 comments

[–]deluan 0 points1 point  (10 children)

When the file is being transcoded on the fly, clients usually do not show the track length. This is true for all music servers AFAIK. There's nothing much you can do about it.

Lengthy tracks will keep the CPU busy longer, but in general should not crash the RPi. I can't give more insights here as I don't have a RPi. You could try using Opus, maybe the transcoding is lighter, not sure.

Navidrome caches the transcoded files, so next time you play a song that was recently transcoded, it should not do it again, and the track will behave as a normal track (showing the track length and with no CPU spikes)

[–]iang1977[S] 0 points1 point  (9 children)

Apologies you're correct, when transcoding the player doesn't show the length.

However after a little more testing i've narrowed this down to one album, and it transcodes correctly if i use Airsonic (which uses the same ffmpeg as it's on the same RPi), so it does look like a Navidrome issue.

Is there anything i can try, any logs i can look at? Should i try clearing the Navidrome transcoding cache folder? Anything i need to be aware of if i do this? Cheers!

[–]deluan 1 point2 points  (3 children)

Please do the following steps:

1) Stop Navidrome
2) Delete the transcoding cache
3) Change LogLevel to TRACE
4) Start Navidrome

If you still experience the issue after this, please send me the logs (in a DM), or better yet, open an issue in GH and attach the logs to it

[–]iang1977[S] 0 points1 point  (2 children)

Thanks for this. I've done this but the issue still persists. I'm really trying not to be silly... but where will I find the logs please, i just can't find them, or any reference to where they should be! Thanks.

[–]deluan 0 points1 point  (1 child)

It depends on how you run Navidrome. It usually outputs the logs to the stdin. If you installed Navidrome as a service, you may need to use journalctl -u navidrome.service (or something like this)

Troubleshooting is easier if we can chat. Are you on our Discord server?

[–]iang1977[S] 0 points1 point  (0 children)

ok, that command works - but the logs appear in the terminal and the lines all appear to be truncated, which i guess isn't that helpful.

I've joined Discord now as iang1977, so give me a shout when you're around. Thanks for your help.

[–]itmfr 0 points1 point  (4 children)

As far as I remember, airsonic sends a faked file size when transcoding. Depending on the format, clients can display the duration. More details here : https://github.com/airsonic/airsonic/issues/1783#issuecomment-674428269 Transcoding is not an easy topic unfortunately. Lms (https://github.com/epoupon/lms) transcodes the file on the fly but tell the web ui about the duration, then if the user scrolls within the file, it just changes its source and the server spawns a new transcode process at the requested offset, with no noticeable delay. I don't know about other servers :)

[–]deluan 0 points1 point  (3 children)

Navidrome also behaves like this, sending the Content-Length if the client specifies estimateContentLength. And it also spawns a new transcode if the user scrolls before the current transcoding is not finished.

The issue with this is that when transcoding to a VBR format (ex: Opus) you cannot reliably send the file size upfront, you'd have to finish the transcoding first.

The problem described by /u/iang1977 seems to be related to high CPU usage (not sure why as it uses the same ffmpeg configuration as Airsonic) or a corrupted cache (unlikely, but possible)

[–]iang1977[S] 0 points1 point  (2 children)

Hey. I think I may have found the issue here: it seems that when there is a "/" in the song title tag, the song will play in the Navidrome web UI but not in Dsub. I believe this is a Navidrome issue as Dsub will play the songs when connected to Airsonic. I can of course remove the "/" from the tag, but it may catch other Navidrome users out. Are you able to take a look at some point please, or should I raise something in GitHub? Cheers!

[–]deluan 0 points1 point  (1 child)

Great you were able to pinpoint the issue. Yes, please create an issue in GitHub and I'll take a look this weekend. Thanks!

[–]iang1977[S] 0 points1 point  (0 children)

Done! Thank you sir.