Playback keeps restarting

Issue description:

Songs keep abruptly restarting. They’ll stop part way through the song and just restart from the beginning. This is isn’t happening on every track I’m listening to, but seems to happen for specific tracks (as in, if a track restarts, it’ll restart every time I listen to it at roughly the same time).

I’ve tried disabling transcoding, disabling Upnp gapless, disabling the Samsung background battery optimisation crap with no luck. I’ve also tried streaming the same tracks from the same server using Symfonium on a different device and had no issues.

The only error I can see in the logs is below, but google leads me nowhere.

2023-11-12 15:30:29.668 Error/ExoPlayer: internalError [eventTime=57716.79, mediaPos=343.43, window=0, period=0, loadError
  t3.x: rt.f0: stream was reset: PROTOCOL_ERROR
      at v3.c.p(Unknown Source:55)
      at cd.d.p(Unknown Source:2)
      at t3.n.p(Unknown Source:5)
      at cd.b.p(Unknown Source:2)
      at t3.e0.p(Unknown Source:2)
      at n4.m.r(Unknown Source:10)
      at n4.m.p(Unknown Source:27)
      at i4.q0.e(Unknown Source:23)
      at d5.d.k(Unknown Source:1085)
      at i4.g0.i(Unknown Source:218)
      at Source:36)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(
      at java.util.concurrent.ThreadPoolExecutor$
  Caused by: rt.f0: stream was reset: PROTOCOL_ERROR
      at rt.y.R(Unknown Source:38)
      at ot.c.R(Unknown Source:10)
      at v3.c.p(Unknown Source:34)
      ... 13 more

Logs: (8.5 KB)

Technical Details:

Symfonium: 6.0.0-1148 Android: 13 - 33 [arm64-v8a,armeabi-v7a,armeabi]
Device: samsung - SM-A346B [a34xeea - a34x]

This kind of error is http 2/0 so usually caused by the proxy.

The logs are not complete I do not see the start of the playback but Gonic … So it does transcode if you enable transcoding on server side even if i do not ask for it.

More detailed logs here

debug.log (970.4 KB)

The device which is failing is connecting to my gonic server over the internet, so a proxy error sounds reasonable. I’m using HAproxy/acme and cloudflare for my DNS if this is relevant. Where can I find more information on the error?

Seems there’s no transcoding but you are downloading at the same time when it fails.

You can enable the option slower downloads in the settings to avoid using http 2/0 for downloads, on some bad proxy this helps as use less http 2/0 connection.

The other case is often that you need to increase buffers and timeouts in the proxy configuration, I think there’s posts here about that from users you can find.

Thanks, I’ve increased the timeouts and buffers for the frontend and will test that out soon.

As for transcoding, under details I’m seeing Mime type mp3 at 320kbps, and when downloading through symfonium they’re being saved as .flac with mp3 codec. Is there an issue with my gonic setup?

version: "2.4"
    image: sentriz/gonic:latest
      TZ: Etc/UTC
      - 4747:80
      - /home/REDACTED/.config/appdata/gonic/data:/data # gonic db etc
      - /mnt/storage/medialibrary/music:/music:ro # your music
      - /mnt/storage/medialibrary/podcasts:/podcasts # your podcasts
      - /mnt/storage/medialibrary/playlists:/playlists # your playlists
      - /home/REDACTED/.config/appdata/gonic/cache:/cache # transcode / covers / etc cache dir

Maybe an issue with Ffmpeg?

Gonic currently have a very personal way to handle transcoding.

If you enable server side it force transcoding in all cases, all the clients can do is request lower bitrate but 0 control over format and can’t disable it …