jmshrv / finamp

A Jellyfin music client for mobile
Mozilla Public License 2.0
1.97k stars 130 forks source link

Some Songs Skipping During Transcoded Streams #855

Closed midwesternrodent closed 1 month ago

midwesternrodent commented 2 months ago

The Problem

Transcoding supported files

When transcoding is enabled in Finamp, it is attempting to transcode .mp3 files and .flac files which can be directly played from finamp without transcoding. Unless I misunderstand something about the transcoding toggle for streaming, this should not be happening.

Transcoded streams and downloads skipping

Additionally some of the files finamp tries to transcode end up skipping at very predictable moments when they are transcoding through finamp, but not through the native Jellyfin app or when played directly in something like VLC. I have transcoding enabled in Jellyfin but this is happening with .mp3 files which I assume should not be transcoded when played by finamp.

From the examples I've found this appears to only be happening consistently with .mp3 files. Although two of the songs I found were broken in the past were working when I went to go gather logs are .flac files and I've noticed other songs that are .flac have this issue in the past.

Note: In the example video I've attached, ignore the Bo Burnham song. I looked into that and it's a file issue, not a jellyfin issue.

Client Information:

Version: 0.9.9 (though it has happened on previous versions of the beta) Finamp is installed via obtanium (direct download of the apk) Pixel 8 running the latest version of Graphene OS Finamp is installed in the owner profile and given network and sensor permissions (no permissions are blocked)

Server Information

Jellyfin Version: 10.9.8.0

This is where things get unique. I have Jellyfin running in an unprivileged LXC on a proxmox host, I'm passing an Intel 12th gen i5 iGPU to the LXC via mount entries in the node.conf file, and I'm accessing the files for Jellyfin over an NFS share mounted to my proxmox host and passed through to the LXC in a similar manner. In case it's relevant, I've shared my conf below.

arch: amd64  
cores: 2  
features: nesting=1  
hostname: jamjar  
memory: 4096  
mp0: /mnt/pve/jellyshare,mp=/mnt/truenas/jellyshare  
nameserver: [redacted]  
net0: name=eth0,bridge=vmbr0,gw=[redacted],hwaddr=[redacted],ip=[redacted]  
/24,tag=[redacted],type=veth  
ostype: debian  
rootfs: local-lvm:vm-2010-disk-1,size=32G  
swap: 4096  
unprivileged: 1  
lxc.cgroup2.devices.allow: c 226:0 rwm  
lxc.cgroup2.devices.allow: c 226:128 rwm  
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=fi  
le 0, 0  
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir  
lxc.idmap: u 0 100000 65536  
lxc.idmap: g 0 100000 44  
lxc.idmap: g 44 44 1  
lxc.idmap: g 45 100045 61  
lxc.idmap: g 106 104 1  
lxc.idmap: g 107 100107 65429

Workarounds and findings so far

  1. Turning off transcoding in finamp solves this issue if the file can be direct-played
    1. I have some songs that cannot be direct-played though so I like to leave this on for that reason.
  2. This issue doesn't appear to happen on the flatpak version of finamp I have installed on my debian 12 laptop
  3. This same issue happens whether finamp is installed via f-droid or the APK directly
  4. There are warnings in the jellyfin server log about transcoding failures. I think I recall seeing somewhere finamp cannot correctly report the transcoding status back to the server at the moment so I'm not sure if these are relevant but they are the best lead I've found.

I can provide the files if someone wants to try to replicate on their end. I'm not attaching them to the issue for obvious copyright concerns but I think the example video should be fine.

I have a spare samsung phone I'm going to try to install the apk on and see if I can replicate the issue myself and report back.

ScreenRecording on Youtube

finamp-logs.txt Jellyfin-Server-Logs-Using-Finamp.txt Jellyfin-ServerLogs-Using-Standard-App.txt #

midwesternrodent commented 2 months ago

Jusy popping back in to say I could not replicate the issue on a Samsung A42-5G running Android 13.

Graphene is on Android 14 at the moment, not sure if that may be a potential cause.

midwesternrodent commented 2 months ago

And....

Popping back in to say that I can replicate this on my SO's Galaxy Z Flip3 5G running Android 14. Same spots in the songs freeze up and everything.

I think that's the main culprit.

midwesternrodent commented 2 months ago

I swear the issue was happening before 0.9.9 but downgrading to 0.9.8 seems to have resolved the issues on these 4 songs. I'll report back if I find any others.