• 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 General Questions Audio transcoding question

     
    • 0 Vote(s) - 0 Average

    Audio transcoding question

    GPU or CPU?
    the_slug
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:United Kingdom
    #1
    2025-02-14, 04:30 PM
    Hi guys,

    Very quick and (hopefully) easy question.

    When forcing transcoding through the Jellyfin Media Player by dropping the bitrate I've noticed that there is a load placed on my CPU. Albeit a small one, about 10-15%.
    I have an Intel A310 which I can see is handling the video side of the transcoding. (Great GPU for Jellyfin btw)

    Would I be right in saying the ffmpeg load I'm seeing on my CPU is being caused by the audio being transcoded? 
    I know my CPU definitely isn't doing any video transcode work as intel_gpu_top correctly shows the MMX engine at work. 

    Apologies if this is already outlined in the documentation, I did take a look but I couldn't find a definitive answer.

    Advice appreciated.

    Cheers.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2025-02-14, 04:54 PM
    We'd need to see your ffmpeg log to determine what the CPU is doing. Also, is 10-15% the load on a single core? Or is that the all core average? If that is the all core average, can you tell if a SINGLE core is at 100%?

    The following tasks will always happen on the CPU.

    1) Audio transcoding/downmixing
    2) Subtitle burn in: GPU (decode frame) -> CPU (composes and renders subtitles on video frame) -> GPU (encodes frame)
    3) Remuxing
    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]
    the_slug
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:United Kingdom
    #3
    2025-02-14, 05:21 PM
    Hey,

    No worries, here is a copy of my transcode log: https://pastebin.com/4j8NzeZV

    >Also, is 10-15% the load on a single core? Or is that the all core average? If that is the all core average, can you tell if a SINGLE core is at 100%?

    That's the average reported by Truenas. When checking the output in top I can see a single FFMPEG process running. So I'm guessing 1 core is likely under quite a bit of load, and the others are idle.

    If it helps the CPU is a Ryzen 5 2600 (Non x) So it's got 6 cores and 12 threads.

    Cheers!
    the_slug
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:United Kingdom
    #4
    2025-02-14, 05:29 PM
    Just a follow up. Kicked off another transcode while keeping an eye on top. ffmpeg uses 150 - 200% CPU. Seeing as 600% would be the entirety of my CPU consumed, it looks like ffmepg is using about 1.5 - 2.0 cores of the CPU doing whatever it is that it's doing.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2025-02-14, 05:36 PM (This post was last modified: 2025-02-14, 05:37 PM by TheDreadPirate. Edited 1 time in total.)
    The ffmpeg log is showing just a video transcode, no audio transcode. So the CPU load you are seeing is probably all of the non-encoding tasks related with transcoding. Demuxing, sending the video to the GPU, remuxing the new video with original audio, etc.

    150-200% CPU load sounds like audio transcoding is also happening. One core is pegged at 100% (audio transcoding is single threaded), and the remaining CPU usage above 100% is all of the non-encoding tasks mentioned above.

    Also, since you have 12 threads 1200% would be a full load. And one process can have more than one thread. I forget the command to print out all the threads that a process spawns.
    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]
    the_slug
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:United Kingdom
    #6
    2025-02-14, 05:43 PM
    Thank you for explaining that. It makes sense.
    Is there anywhere that audio transcoding would be logged? It would be nice to confirm that's indeed where the CPU load is coming from.

    I assume the logging I've provided so far shows video transcoding happening on the GPU successfully?

    Cheers.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #7
    2025-02-14, 05:58 PM
    Yes. It is encoding on the GPU.

    Code:
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_qsv))
      Stream #0:1 -> #0:1 (copy)

    "h264_qsv". You can also tell it is DEcoding on the GPU with this parameter in the ffmpeg command that is printed in the log.

    Code:
    -hwaccel vaapi

    For the record, QSV is a superset of VAPPI. You can straight up use VAAPI on both Intel and AMD GPUs. But if you checked "Prefer OS native DXVA or VA-API hardware decoders" it will use VAAPI for decoding and QSV for encoding. And we recommend you keep it checked. VAAPI is slightly less performant that QSV, but more flexible for some odd ball video files.
    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]
    the_slug
    Offline

    Junior Member

    Posts: 5
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:United Kingdom
    #8
    2025-02-14, 06:06 PM
    Thank you.

    One final question if I may. Is there a way for me to confirm if audio transcoding is indeed happening?
    I would like to know how nearly 2 CPU cores are being pegged when most of the heavy lifting should be getting done by the GPU.

    Thanks for all your help so far Pirate.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #9
    2025-02-14, 06:16 PM
    Similar to the "Stream mapping" I quoted from your log above. Instead of "copy" you'd see this (an example from one of my logs).

    Code:
    Stream #0:1 -> #0:1 (opus (native) -> aac (libfdk_aac))
    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]
    « 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