finamp icon indicating copy to clipboard operation
finamp copied to clipboard

Corrput audio files downloaded

Open brainiac19 opened this issue 1 year ago • 7 comments

When testing the recommended way for music syncing provided in #864, I found another problem. The downloader does not seem to care about whether the audio file is intact, instead it keeps everything it gets. So when a network interruption happens, the songs being downloaded at the time would be corrupted. Maybe this can be fixed by adding an audio length check after the download? And probably add retry mechanism?

brainiac19 avatar Sep 12 '24 05:09 brainiac19

Could you share the finamp logs?

Also are you transcoding downloads, and if so in what format? I've seen similar behavior before as part of #857 so I'm just trying to see if this may be related.

If you are using transcoded downloads, could you share the transcode logs for a song with the issue? They should be located in /var/log/jellyfin on your jellyfin server by default (unless you've changed the location yourself)

midwesternrodent avatar Oct 06 '24 22:10 midwesternrodent

@brainiac19 without additional info we can't really look into this! Any logs (Finamp, server, ffmpeg) that you can give us would help. Concrete steps to reproduce the issue would also be helpful!

Chaphasilor avatar Jan 31 '25 23:01 Chaphasilor

Not OP, but I've run into this issue as well, but unfortunately haven't figured out how to reliably reproduce the issue. Typically it presents where the song appears to download properly, and some amount of the song will play correctly, then it will abruptly skip to the next song. The issue happens consistently with the same downloaded song - if I play it again, it skips to the next song at the same spot.

It doesn't seem to be an issue with the source since it plays fine in other players, and if I delete the problematic track and redownload it, it fixes the issue.

Here are some of my logs from today, starting from the first mention of the problematic track (which is 'desiree' by Bladee) and ending at the last. 'desiree' was already downloaded before these logs, but I looked back and the only previous mentions of it were a line that said it was downloading and a line that said it completed. And like I said, after deleting and redownloading the song, it works fine (which is what I did during these logs). My transcoding is set to MP4 / AAC / 256kbps.

iPhone 14 Pro Max iOS 18.3.1 Jellyfin 10.10.3 Finamp 0.9.13

Zedniac avatar Feb 28 '25 23:02 Zedniac

Yes I was using transcode. But I don't think I can help in any meaningful way as of now, since I've decided to go back to spotify for a few more months.

brainiac19 avatar Feb 28 '25 23:02 brainiac19

Not OP, but I've run into this issue as well, but unfortunately haven't figured out how to reliably reproduce the issue. Typically it presents where the song appears to download properly, and some amount of the song will play correctly, then it will abruptly skip to the next song. The issue happens consistently with the same downloaded song - if I play it again, it skips to the next song at the same spot.

I'm pretty certain I can reliably reproduce the issue.

I am also transcoding downloads, and have a rather large library (a few thousand songs or so at least) and I am running jellyfin in a container using podman. The combination of a large library and podman's default PID limit of 4096 (https://docs.podman.io/en/v4.3/markdown/options/pids-limit.html) leads to the container, or rather the transcoding ffmpeg processes, being killed at some point, and results in partial downloads. A similar behavior might be seen when simply going outside of my local Wifi while downloading, but I'm not sure. Those partial downloads are then marked as completed in jellyfin, with no way to even manually mark a corrupted track for redownload additionally the repair library function will not catch the broken tracks.

Currently using Finamp 0.9.13; going to update to 0.9.15 and see if that helps, but I don't think there's been any relevant changes.

bauen1 avatar Apr 05 '25 13:04 bauen1

I am having this issue as well. It's definitely bad tracks being downloaded. On Finamp 0.9.18 and see the issue.

Tried running a download repair and that did not fix it.

infinitytec avatar Jul 15 '25 13:07 infinitytec

Maybe the length of the track could be compared to the expected length when running repairs? That wouldn't directly fix this issue, but it would help with mitigating it after downloads, because right now I'm stuck redownloading my songs when I notice this, which is quite often. My flac collection is quite heavy, so while I can have it downloaded in the original format on my phone for now, I'm not sure for how much longer I can do that without transcoding.

Bu156 avatar Aug 26 '25 14:08 Bu156