Jellyfin Forum
High CPU usage when audio transcoding? - 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: High CPU usage when audio transcoding? (/t-high-cpu-usage-when-audio-transcoding)

Pages: 1 2 3


RE: High CPU usage when audio transcoding? - FuzzyJelly - 2024-11-03

Those are usually defaulted to the Jellyfin root directory correct? If so, they're both on an SSD


RE: High CPU usage when audio transcoding? - TheDreadPirate - 2024-11-03

I'm out of ideas then. I was thinking maybe there was some sort of situation where your HDD wasn't able to keep up with the IO, causing the CPU usage to spike (this happens a lot of users running JF on a RPi).


RE: High CPU usage when audio transcoding? - FuzzyJelly - 2024-11-04

Beginning to wonder if it's the file themselves or the server starved for resources. Tried a few A/B tests with 10.9.11 and 10.10.1 and both played fine with no buffering but I:
1) killed docker containers I installed in the last week and
2) tried different media files than my original post

Tests:
10.9.11 | Firefox (131.0.3): https://pastebin.com/5w0zM6kD
10.9.11 | Chrome (130.0.6723.92): https://pastebin.com/fjiMxnV1

10.10.1 | Firefox: https://pastebin.com/PffQLTaZ
10.10.1 | Chrome: https://pastebin.com/5n1vUEV6

Original files that were buffering: https://pastebin.com/9iXA9TpM


RE: High CPU usage when audio transcoding? - FuzzyJelly - 2024-11-10

I'm still at a loss for words on this. For now it seems using the Jellyfin app is the way forward on a computer since it direct plays from there (whereas browsers are transcoding and causing lags all of a sudden)


RE: High CPU usage when audio transcoding? - luckman212 - 2024-11-11

I just installed Jellyfin on my DS1621+ (same CPU as OP, Ryzen 1500B) and wondering if there is any support in this CPU for HW accel. Should I leave it at "None" or can I enable one of the modes? I read https://jellyfin.org/docs/general/administration/hardware-selection but stil unclear.


RE: High CPU usage when audio transcoding? - TheDreadPirate - 2024-11-11

I can't find documentation regarding whether the V embedded CPUs have encoders. If it does have an encoder, you'd use VAAPI. As for the codec support, probably VCN 1.0 level codec support.

MPEG2
VC1
H264
HEVC
HEVC 10-bit (MAYBE)
VP9


RE: High CPU usage when audio transcoding? - FuzzyJelly - 2024-11-18

(2024-11-11, 02:19 PM)luckman212 Wrote: I just installed Jellyfin on my DS1621+ (same CPU as OP, Ryzen 1500B) and wondering if there is any support in this CPU for HW accel. Should I leave it at "None" or can I enable one of the modes? I read https://jellyfin.org/docs/general/administration/hardware-selection but stil unclear.

Are you still seeing issues? I haven't tried 10.10.2 yet but something is definitely wonky in the audio transcoding with ffmpeg7 in my experience


RE: High CPU usage when audio transcoding? - SVRUM - 2025-01-12

Hello @FuzzyJelly , did you ever solve this issue? I get high CPU usage when doing a basic audio transcode as well. 50%-70% CPU usage when Direct Streaming (transcoding audio .thd/.ac3 to .acc, no video transcoding).


RE: High CPU usage when audio transcoding? - TheDreadPirate - 2025-01-12

50-70% on a single core? Or all cores? Can you share your ffmpeg log?


RE: High CPU usage when audio transcoding? - SVRUM - 2025-01-12

(2025-01-12, 04:09 PM)TheDreadPirate Wrote: 50-70% on a single core?  Or all cores?  Can you share your ffmpeg log?

Continuing discussion from this thread so it's all ion one place: https://forum.jellyfin.org/t-hardware-transcoding-is-not-working

@gnattu @TheDreadPirate I will just post my replies in this thread since it is more correct at identifying the issue.

https://pastebin.com/xBftTbYq - Logs, playing movie on Jellyfin ios app -transcoding 7.1.4 Surroudn .thd to .aac and nothing else. "Use Native Player" is unchecked.

    Resource usage

    Majority of usage is coming from ffmpeg command line


As soon as playback begins it spikes to 70% and hovers around 50%-70% the entire time playback is happening. The weird thing is that it seems to do it in bursts, dropping to 2%-5% for a few seconds, then going again up to 50%-70% for a minute or so, and repeating the entire time playback is happening. The high CPU usage makes it impossible to have two streams playing on the network at the same time. This does not happen with Direct Play, if my device/player can play .ac3 or .thd files natively, no transcoding happens and I get like 2%-3% CPU usage and 0% iGPU usage

Keep in mind I also have the exact same usage when doing 5.1 Surround .ac3 on the Jellyfin  AND Swiftfin iOS app as well, my apologies @gnattu, I was mistaken, I tested in three differnet places, jellyfin iOS app, Swiftfin iOS app, and connecting to jellyfin through Safari, my CPU usage is high in Jellyfin AND Swiftfin, but not in Safari (when doing .ac3 5.1 surround), safari doesn't transcode .ac3 to .aac , while jellyfin and swiftfin are. (I get the same CPU usage spikes when  switching to 7.1.4 (.thd) audio stream in safari)


https://pastebin.com/Jjt2hmg4 - logs of safari 5.1 .ac3 playback

    - Play back begins at that intitial spike in the beginning of the chart.