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


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

Hello,

i'm a total noob with Jellifyn and i'm trying to understand what i'm doing wrong.

I've setup Jellyfin in a docker environment with NVIDIA GPU for Transcoding (NVIDIA RTX 4060).

Jellyfin is hosted locally via direct http.

This are the settings:

   
   

The NVIDIA card is recognized successfully:
   

It happens that when i try to play certain files starts transcoding that takes 100%  CPU (should not use GPU instead?) and results in buffering every 1-2 seconds:

.txt   log.txt (Size: 1.2 KB / Downloads: 13)


Transcoding logs:


.txt   transconding_logs.txt (Size: 50.1 KB / Downloads: 16)

I use Jellyfin app on Android Smartphone and Tablet with default values in the local lan via Wi-Fi.

Given this data these are my questions:

- Are my settings right?
- Why is transcoding instead of direct play?
- Why when transcoding takes 100% CPU and seems not using GPU?

Any help will be really appreciated.
Best regards


RE: Transcoding & Buffering - TheDreadPirate - 2025-01-13

Are we talking 100% of a single core or 100% of the entire CPU? The audio is transcoding, which will always occur on the CPU. The video is transcoding via NVENC.

Also, are there other background tasks that are still running that are contributing to the CPU usage?

For the record, you can check every codec box. Both decoding and encoding. And ensure tone mapping is checked. The 4000 series RTX cards support everything.


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

(2025-01-13, 03:09 PM)TheDreadPirate Wrote: Are we talking 100% of a single core or 100% of the entire CPU?  The audio is transcoding, which will always occur on the CPU.  The video is transcoding via NVENC.

Also, are there other background tasks that are still running that are contributing to the CPU usage?

For the record, you can check every codec box.  Both decoding and encoding.  And ensure tone mapping is checked.  The 4000 series RTX cards support everything.

thanks for your fast reply.

Here is the the CPU while playing the video:
   

Enabling all the settings you suggested has solved the CPU usage, on the Smartphone is all OK but the tablet still buffering even worse than before:
   

Data from Jellyfin app on tablet:
   

Seems that not only audio is not supported, also video from h265 to h264.

Any ideas?
Thank you


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

Can you share your entire jellyfin log? So I can see what background tasks are running.

Your screenshot is showing that it is transcoding to AV1, so I'm assuming you enabled that in the transcode settings. Did you also check the rest of the codec boxes to ensure that the GPU is decoding and not the CPU.


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

(2025-01-13, 03:47 PM)TheDreadPirate Wrote: Can you share your entire jellyfin log?  So I can see what background tasks are running.

Your screenshot is showing that it is transcoding to AV1, so I'm assuming you enabled that in the transcode settings.  Did you also check the rest of the codec boxes to ensure that the GPU is decoding and not the CPU.

Sure:


.txt   full_log.txt (Size: 71.84 KB / Downloads: 11)

.txt   transcode_log.txt (Size: 135.52 KB / Downloads: 11)

Here are the settings:

   
   
   

Thanks


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

I forgot to ask. What CPU do you have? All I know is that it has 12 threads.


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

(2025-01-13, 04:11 PM)TheDreadPirate Wrote: I forgot to ask.  What CPU do you have?  All I know is that it has 12 threads.

CPU AMD Ryzen 5 5600X AM4


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

Can you spin up a test container and switch to using the official jellyfin/jellyfin image instead of the linuxserver/jellyfin image?


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

(2025-01-13, 04:50 PM)TheDreadPirate Wrote: Can you spin up a test container and switch to using the official jellyfin/jellyfin image instead of the linuxserver/jellyfin image?

Done, same results in the stream:


.txt   transcode_logs.txt (Size: 49.5 KB / Downloads: 10)

.txt   full_logs.txt (Size: 109.97 KB / Downloads: 7)


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

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?