Jellyfin Forum
SOLVED: Directplay/Directstream constant buffering - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Directplay/Directstream constant buffering (/t-solved-directplay-directstream-constant-buffering)

Pages: 1 2


RE: Directplay/Directstream constant buffering - IceToast - 2023-10-15

Clientsystem:
7 3700x
32 GB RAM 2400 MT/s
6900XT
It can natively decode everything needed.
https://hastebin.skyra.pw/aqomotafuk.yaml


RE: Directplay/Directstream constant buffering - TheDreadPirate - 2023-10-15

Yeeeeep. Lots and lots of buffering.

Code:
2023-10-15 20:05:50.924 [debug] unknown @ 0 - cplayer: Enter buffering (buffer went from 100% -> 0%) [0.000000s].
2023-10-15 20:05:50.924 [info] unknown @ 0 - Entering state: buffering
2023-10-15 20:05:50.952 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 0% -> 23%) [0.234000s].
2023-10-15 20:05:50.953 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 23% -> 9%) [0.096000s].
2023-10-15 20:05:51.266 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 9% -> 11%) [0.112000s].
2023-10-15 20:05:51.269 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 11% -> 0%) [0.000000s].
2023-10-15 20:05:52.069 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 0% -> 17%) [0.176000s].
2023-10-15 20:05:52.571 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 17% -> 20%) [0.209000s].
2023-10-15 20:05:53.073 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 20% -> 43%) [0.432000s].
2023-10-15 20:05:53.876 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 43% -> 68%) [0.688000s].
2023-10-15 20:05:54.829 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 68% -> 94%) [0.944000s].
2023-10-15 20:05:55.837 [debug] unknown @ 0 - cplayer: End buffering (waited 4.909811 secs) [1.001000s].
2023-10-15 20:05:55.837 [info] unknown @ 0 - Entering state: playing
2023-10-15 20:05:55.844 [info] unknown @ 0 - JS: Requesting url without automatic networking: http://192.168.0.137:8096/Sessions/Playing/Progress
2023-10-15 20:05:56.786 [info] unknown @ 0 - JS: Sending web socket message: KeepAlive
2023-10-15 20:05:56.786 [info] unknown @ 0 - JS: Received KeepAlive from server.
2023-10-15 20:05:57.201 [debug] unknown @ 0 - cplayer: Enter buffering (buffer went from 100% -> 28%) [0.288000s].
2023-10-15 20:05:57.201 [info] unknown @ 0 - Entering state: buffering
2023-10-15 20:05:57.577 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 28% -> 16%) [0.166000s].
2023-10-15 20:05:57.837 [debug] unknown @ 0 - cplayer: Set property: pause=yes -> 1
2023-10-15 20:05:57.837 [info] unknown @ 0 - Entering state: paused
2023-10-15 20:05:57.842 [debug] unknown @ 0 - Enabling OS screensaver
2023-10-15 20:05:57.843 [info] unknown @ 0 - JS: Requesting url without automatic networking: http://192.168.0.137:8096/Sessions/Playing/Progress
2023-10-15 20:05:58.329 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 16% -> 20%) [0.209000s].
2023-10-15 20:05:58.435 [debug] unknown @ 0 - QWindow visibility set to QWindow::Minimized
2023-10-15 20:05:58.832 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 20% -> 42%) [0.422000s].
2023-10-15 20:05:59.632 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 42% -> 67%) [0.678000s].
2023-10-15 20:06:00.834 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 67% -> 93%) [0.934000s].
2023-10-15 20:06:01.587 [debug] unknown @ 0 - cplayer: Still buffering (buffer went from 93% -> 95%) [0.959000s].
2023-10-15 20:06:02.088 [debug] unknown @ 0 - cplayer: End buffering (waited 4.886531 secs) [1.190000s].

For testing. What happens when you play the same video in a browser? Try Edge since that browser SHOULD play HEVC directly. Trying to avoid transcoding HEVC to reduce the number of factors.

Is there any packet loss in your network? Do you have any QoS enabled?


RE: Directplay/Directstream constant buffering - IceToast - 2023-10-15

Interesting. Edge can direct play the same file but the issue is different. Instead of buffering every 2 seconds for 2 seconds (or similar) it's lagging and directly playing every frame it gets. So the playback is stuttering like you would play it in slowmo (hard to explain tbh).

JF Log:
https://hastebin.skyra.pw/azurupeduj.prolog

No packet loss in LAN and no real QoS enabled.


RE: Directplay/Directstream constant buffering - TheDreadPirate - 2023-10-15

This is a long shot. Do you happen to have transcode throttling enabled? I know your videos are direct playing, but on my last setup (not a problem on my current setup) having transcode throttling enabled caused buffering issues on SOME devices when direct playing/direct streaming.


RE: Directplay/Directstream constant buffering - IceToast - 2023-10-15

Nope, throttling is disabled ^^


RE: Directplay/Directstream constant buffering - IceToast - 2023-10-15

I've just tried to force transcode at the client side (JMP) which forces the server to transcode to h264. No buffering, bandwith limit does not apply, 24+ Mbps (= speed of transcode).


RE: Directplay/Directstream constant buffering - IceToast - 2023-10-15

Okay so i've investigated further. I did lie in my OP a little bit since i thought i have tested it enough. The files are on my smb share.
When having it locally (on the JF server) it plays nicely without a bandwidth limit to the client (directplay).
When playing it from smb share -> buffering not above 5Mbps.

But i can't get over it, that on the one hand transcoding works flawlessly and on the other hand the bandwith to the share is fast enough with way above 200 Mbps.

Edit:
So when direct playing the file from the share (file streaming) i only get about 2-5 Mbps. Which leads to buffering since the avg. bitrate is about 9 Mbps.
When transcoding the file i get about 6Mbps avg. Which doesn't lead to too bad buffering, since the bitrate goes down too.
When downloading the file using 'cp' directly to the local storage i get over 100MBps.

Those numbers are from the JF server.

In conclusion this seems to be a smb issue of file streaming, not a jellyfin issue really.


RE: Directplay/Directstream constant buffering - IceToast - 2023-10-15

Finally!

Since i tracked it down to the smb share or rather the smb (cifs) mount in particular i fixed this behaviour by setting the cifs cache to loose:

For reference: https://askubuntu.com/questions/1163520/find-extremely-slow-on-cifs-share

The default in kernels prior to 3.7 was "loose". As of kernel 3.7 the default is "strict".