Jellyfin Forum
Stuttering (me too) when playing 4K files - 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: Stuttering (me too) when playing 4K files (/t-stuttering-me-too-when-playing-4k-files)



Stuttering (me too) when playing 4K files - Laozor - 2023-11-29

Hello friends! Raised-hand
 
(please forgive my English, it’s not my native language, I’m doing my best).
(oh and please forgive the long message, I first wrote it in word to be as exhaustive as possible and I now realize how long it is).
(I've seen that vitalessandro just posted a thread with the same issue, but he's having it through web player, which isn't my case)
 
Fairly new to NAS, selfhosting, Jellyfin and everything, so I’m trying to understand what I’m doing wrong in order to get this running smoothly.
 
My setup:
 
I recently built a NAS with the following specs:
  •     CPU: Intel® Core™ i3-10300T CPU @ 3.00GHz;
  • Motherboard: ASUS TUF Gaming B560M-PLUS WiFi;
  • RAM: 16Go (2x8Go) CRUCIAL DDR4 3200MHz CL22;
  • OS: OpenMediaVault 6.9.8-1 (Shaitan).
 
OMV6 is installed on a PNY CS900 120Go SATA III disk.
Jellyfin (version 10.8.12) is installed via Docker on a Crucial P3 500Go M.2 PCIe Gen3 NVMe SSD.
 All my medias are stored on 3x4To HDD (2x 4To WD RED WD40EFAX 5400 RPM / 1x 4To SEAGATE IRONWOLF ST4000VN006 5400 RPM) in RAID5.
 
NAS is wired to my local network through CAT6a cabling.
 
Here is my docker file:
 
Code:
version: "3"
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1001
      - PGID=100
      - TZ=Europe/Paris
      - DOCKER_MODS=linuxserver/mods:jellyfin-opencl-intel
    volumes:
      - /appdata/jellyfin/config:/config
      - /appdata/jellyfin/cache:/cache
      - /volumedata/data/medias:/media
    ports:
      - 8096:8096
    group_add:
      - "106"
   devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
    restart: unless-stopped
 
Everything works like a charm in local between my NAS and my laptop via WIFI (although I’m playing my 4K files with MPV SHIM because I’m feeling like a little latency otherwise).
 
The plan is to open remote access to my libraries to my brothers (and me when I’ll leave France and leave the NAS at my parents). But I’m having a hard time to get everything smooth between my NAS and the TV in the living room, can’t even imagine through internet (even more considering my brothers are cheaping on internet, even though it’s not expensive in France, but it’s another issue).
 
Jellyfin client is installed on a Xiaomi Mi Box S 4K 1st gen (2Go RAM + 8Go ROM eMMC) running Android TV (android 9, can’t update more). According to what I can find on internet, video codecs are:
-          H.264 (1080p @ 60 fps),
-          H.265 (4K UHD @ 60 fps),
-          VP9 (profile-2, 4k @ 60 fps),
-          VC-1 (1080p @ 60 fps),
-          AVS (1080p @ 60 fps),
-          MPEG-1 & MPEG-2 (1080p @ 60 fps), and
-          RealVideo 8, 9 & 10 (1080p @ 60 fps).
It should support Dolby Vision and HDR10 / HDR10+.
 
On the audio side, it should support DTS 2.0, Dolby Digital Plus, MP3, APE, FLAC, ACC, OGG.
 
[NOTE THAT I’M LISTING ALL OF THESE BECAUSE I’M GUESSING MY ISSUE MIGHT BE THERE, BUT I DON’T REALLY KNOW WHAT AM I TALKING ABOUT]
 
The Mi Box is connected to my local network through CAT6a cabling with a UGREEN USB to 1Gbps Ethernet adapter. It displays via HDMI to a SAMSUNG UE49MU6105 4K TV which should support (according to lcd-compare) all the listed above but AVS.
 
Obviously, both the Mi Box and the TV are up to date.
 
My issue:
 
At first, I mainly had issues with tone mapping with my 4K files. Exoplayer and external player MPV‑android where the only ones to get the tone mapping right. The other services I tried (LibVLC, MX Player, Just a Player, VLC) all displayed washed out colours.
On Exoplayer though, I only had one image every second or so.
On MPV-android, I had more images per second (although not fluid either) but the image was really disgusting.
The options “Enable VPP Tone mapping” and “Enable Tone mapping” weren’t activated. Every time, the server was reporting that the medias were Direct Play.
 
I tried to install Findroid but same issue, installed Kodi but same issue (and I find it less intuitive and ergonomic). From that point, I sometimes had HDR issues (where the TV didn’t detect the content was HDR or didn’t detect the HDR content wasn’t displayed anymore and was stuck in HDR mode).
 
Research on internet lead me to change “Home Network Quality” from ‘Auto’ to (4K – 120 Mbps) and “Maximum Allowed Video Transcoding Resolution” from ‘Auto’ to ‘4K’ or ‘Screen Resolution’.
 
I then found a Reddit thread where someone said that even though it says it’s Direct Play, if transcoding is enabled, it can cause interference with tone mapping. I created a new profile for that TV only and disable every hardware decoding / recoding option. I also cleared the app cache on the Mi Box and now every player (Exo, LibVLC, external) gets the tone mapping right.
 
But now, I have stuttering issues. More or less regarding the player and / or the movie played. Sometimes not much, but noticeable and repeated.
 
For the following, my tests are based on 3 movies: Big Bunny in the Sand, Big Bunny in the Colosseum, and Big Bunny is Dreaming. NFOs are linked. All my 4K files are H265 HDR10/HDR10+.
On the logs, for each of the Big Bunny movies, the order of players is: (1) Exoplayer, (2) libVLC, (3) external: VLC, (4) external: MX Player, (5) external: Just a Player. There are no FFMPEG logs.
MPV-android is still displaying the same porridge of pixels. It’s by far the worst one.
MX PLAYER was definitely the best on Big Bunny in the Sand (although the app doesn’t support DTS, but maybe it’s because I haven’t paid the pro version yet?). For Big Bunny in the Colosseum, it played for 2 seconds and then was stuck for 3 seconds on one image (while the sound goes on), updated the image, and so on before crashing after a minute. Finally, it was stuck on buffering with Big Bunny is Dreaming, I never had an image.
I had the same experience on VLC for “Big Bunny in the Sand” (stuck on one image, sound goes on, image caches up, stuck again, so on).
Otherwise, VLC, with Exoplayer and Just Video Player just have small stutters, like a few frames here and there, but once you notice, it’s the only thing you see.
 
Here are my test log and the crash log.
I must admit I’ve reached the limits my knowledge. I haven’t found a solution that applied to my situation on the reddit threads. Is there any obvious option I should’ve activated, is there any trick you have that could help me? Or is the Mi Box too limited and I should look for a replacement?
 
Thank you for your time and all the help you can provide 😊