Jellyfin Forum
Transcoding takes 100% CPU then goes 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: Transcoding takes 100% CPU then goes Buffering (/t-transcoding-takes-100-cpu-then-goes-buffering)

Pages: 1 2


RE: Transcoding takes 100% CPU then goes Buffering - dynux - 2025-01-13

(2025-01-13, 06:22 PM)TheDreadPirate Wrote: Can you share your docker compose.  I don't see why it would use so much CPU.  It is using the GPU for decoding, tone mapping, and encoding.  Only the audio should be using the CPU and shouldn't be anywhere close to this much.

What kernel version are you running on the host?  And what distro?

Code:
Linux muletto 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Code:
  jellyfin:
    image: linuxserver/jellyfin:latest
    container_name: jellyfin
    labels:
      io.portainer.accesscontrol.public:
    networks:
      - mynetwork
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Rome
      - NVIDIA_VISIBLE_DEVICES=all
      - NVIDIA_DRIVER_CAPABILITIES=all
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /docker/appdata/jellyfin-config:/config
      - /media/data:/data
    devices:
      - /dev/nvidiactl:/dev/nvidiactl
      - /dev/nvidia0:/dev/nvidia0
      - /dev/nvidia-modeset:/dev/nvidia-modeset
      - /dev/nvidia-uvm:/dev/nvidia-uvm
      - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
    runtime: nvidia
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]
    ports:
      - 8096:8096
      - 7359:7359/udp
      - 8920:8920
    restart: unless-stopped
    logging:
      driver: json-file

this is the part about jellyfin.

But wait, the CPU is now resolved as i wrote before.
The problem now is that the Android Tablet (Xiaomi Redmi Pad SE, codename xun) has issues playing.
It is using the default Jellyfin app player and it cannot decode x265 video so the transcoding starts.
If i set the ExoPlayer the stream does not even start.


RE: Transcoding takes 100% CPU then goes Buffering - TheDreadPirate - 2025-01-13

The specs on that tablet should support HEVC. Can you share the logs from when you play a video with the web player and then exoplayer?


RE: Transcoding takes 100% CPU then goes Buffering - dynux - 2025-01-13

(2025-01-13, 07:55 PM)TheDreadPirate Wrote: The specs on that tablet should support HEVC.  Can you share the logs from when you play a video with the web player and then exoplayer?

logs for webplayer:

.txt   webplayer_logs.txt (Size: 57.66 KB / Downloads: 10)

.txt   webplayer_transcode.txt (Size: 35.8 KB / Downloads: 13)

logs for exoplayer:

.txt   ExoPlayer_logs.txt (Size: 12.84 KB / Downloads: 13)
(no transcoding logs, i have only this from the app)
   


RE: Transcoding takes 100% CPU then goes Buffering - TheDreadPirate - 2025-01-13

The video is 4K HDR10. AFAICT the chipset in your tablet supports decoding HEVC 10-bit. I don't see why it would transcode the video unless the device is mis-reporting what it supports.

You can try using Findroid. It has a bit better codec support. If you use exoplayer instead of MPV, it will properly render HDR if your screen can display it.


RE: Transcoding takes 100% CPU then goes Buffering - dynux - 2025-01-13

(2025-01-13, 08:43 PM)TheDreadPirate Wrote: The video is 4K HDR10.  AFAICT the chipset in your tablet supports decoding HEVC 10-bit.  I don't see why it would transcode the video unless the device is mis-reporting what it supports.

You can try using Findroid.  It has a bit better codec support.  If you use exoplayer instead of MPV, it will properly render HDR if your screen can display it.

Findroid has the same behaviour.

Just for curiosity i've tried Jellyfin App for Android TV and (LOL), i can play everything without any issue...but it is unusable.

Also i've found a couple of issues here, don't sure if related:
https://github.com/jellyfin/jellyfin-android/issues/1538
https://github.com/jellyfin/jellyfin-android/issues/1495


RE: Transcoding takes 100% CPU then goes Buffering - TheDreadPirate - 2025-01-13

I recall there was a PR that fixed this issue, but a new version of our Android hasn't been cut since the fix was merged.

Hopefully 2.6.3 will fix this issue whenever it gets released.