• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting High CPU usage when audio transcoding?

    Pages (3): 1 2 3 Next »

     
    • 0 Vote(s) - 0 Average

    High CPU usage when audio transcoding?

    FuzzyJelly
    Offline

    Junior Member

    Posts: 12
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Germany
    #1
    2024-10-30, 03:55 PM
    Got a bit of an odd one; seems as though I'm getting massive CPU spikes when playing files that need to have their audio transcoded. For example - if I watch a file on my TV, everything is direct play but if I try from my browser it's playing the video fine but transcoding the audio. Normally this wouldn't have done anything significant but now it causes Jellyfin to come to a crawl and eventually pause the video altogether and can only be fixed by restarting the application / container.

    I've never had an issue in previous versions but seems as though maybe this version (10.10.0) caused it? It's entirely possible something else is causing this but I can 100% reproduce this by playing a file from a browser (have tried both Edge and Firefox, as well as Windows and MacOS)

    JF: 10.10.0
    Setup: Docker
    OS: Synology

    (screenshot attached is from Portainer)


    Attached Files Thumbnail(s)
       
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-10-30, 03:59 PM
    Can you share the ffmpeg log?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    FuzzyJelly
    Offline

    Junior Member

    Posts: 12
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Germany
    #3
    2024-10-30, 05:35 PM
    I was doing a lot of testing earlier so hopefully this is the right log: https://pastebin.com/08SEUam8 (FFmpeg.DirectStream-2024-10-30_16-47-34.....)
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-10-30, 06:35 PM
    What kind of CPU does your server have? It shouldn't require that much CPU power to transcode stereo DD+/TrueHD. Unless something else was causing high IO latency, which can inflate apparent CPU usage.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    FuzzyJelly
    Offline

    Junior Member

    Posts: 12
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Germany
    #5
    2024-10-31, 04:44 PM (This post was last modified: 2024-10-31, 05:24 PM by TheDreadPirate. Edited 2 times in total.)
    Apologies for the late reply - CPU is a AMD Ryzen V1500B (Synology 1821+) and hasn't had issues before. I did have a scan running yesterday, which likely skewed the results but here is a fresh log after scanning completed if it makes a difference: https://pastebin.com/wftAaiGF.

    I do see a a few files that are {things we don't talk about - TDP} but none are the files I'm trying to watch. Would that have a difference?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-10-31, 06:12 PM
    After speaking with the devs, the theory is that changes in ffmpeg7 made ffmpeg itself significantly more multi-threaded than it was with ffmpeg6.

    I did some audio-only transcode testing (also TrueHD to AAC) and the difference in CPU usage between ffmpeg6 and 7 was not small. Not significant for my system, but could be significant for other systems. My testing with ffmpeg6 had CPU usage about about 105-110% (one thread fully utilized, one thread lightly utilized). With ffmpeg7 it was around 160-170% (one thread fully utilized, three threads 15-30% utilized). But was also transcoding about 40-50% faster.

    And since your CPU is also 4 cores/8 threads and of similar performance to my 12100, I don't see why your system is struggling.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    FuzzyJelly
    Offline

    Junior Member

    Posts: 12
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Germany
    #7
    2024-10-31, 07:16 PM
    I thought it may have been due to my Gluetun enabled apps (not sure how else to phrase that) since they were doing a lot of disk read operations but I killed that and saw similar behavior in Jellyfin
    FuzzyJelly
    Offline

    Junior Member

    Posts: 12
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Germany
    #8
    2024-11-03, 10:19 AM
    I'm still not sure why this is happening. Even after I close Jellyfin post-CPU spike, the container still pulls CPU and RAM while idling. The only things I can think of now would be to try having JF be the ONLY container running to test it further or see if downgrading fixes it (likely the better of the two for long term use)
    FuzzyJelly
    Offline

    Junior Member

    Posts: 12
    Threads: 2
    Joined: 2023 Dec
    Reputation: 0
    Country:Germany
    #9
    2024-11-03, 07:05 PM
    Just an update - issue is still present in 10.10.1.

    One surprising thing I noticed; when playing an HEVC file on an iPhone (official JF iOS app btw) the CPU usage was half of that of an x264 file. Very strange and confusing Face-with-raised-eyebrow
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #10
    2024-11-03, 07:39 PM
    Is Jellyfin's DB and transcode directory on a HDD or SSD?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Pages (3): 1 2 3 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode