• 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 On Arch, Jellyfin does something with ffmpeg eating up alll cores

     
    • 0 Vote(s) - 0 Average

    On Arch, Jellyfin does something with ffmpeg eating up alll cores

    All cores are pegged at near 100%
    el_toro_2022
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:Colombia
    #1
    2025-02-16, 01:32 PM
    For some reason, after I start up the Jellyfin daemon, eventually all cores are consumed doing something with Jellyfin / ffmpeg.

    I have to shut down the daemon for my cores to go quiet again and cool off!

    I am not even using Jellyfin at the time I observed this, but it happens all the time, to the point that I cannot leave the daemon up and running all the time.

    Any ideas on what's going on? Obviously it is doing SOMETHING, but I don't have the time to delve into this deeper.

    Any help will be appreciated.

    Thanks in advance.
    Efficient_Good_5784
    Offline

    Community Moderator

    Posts: 1,167
    Threads: 3
    Joined: 2023 Jun
    Reputation: 50
    #2
    2025-02-16, 01:38 PM
    I would share the server logs found in the dashboard to see what is being used at a time.
    el_toro_2022
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:Colombia
    #3
    2025-02-17, 12:11 PM
    After waiting for about 24 hours after starting the daemon, it has approached consuming the CPU.

    systemctl status jellyfin
    ● jellyfin.service - Jellyfin Media Server
        Loaded: loaded (/usr/lib/systemd/system/jellyfin.service; disabled; preset: disabled)
        Active: active (running) since Sun 2025-02-16 10:32:40 -05; 20h ago
    Invocation: 277a8cd7bbe44e7e9d2e636de27db028
      Main PID: 1558490 (jellyfin)
          Tasks: 43 (limit: 38117)
        Memory: 679.9M (peak: 1G)
            CPU: 23h 1min 12.719s
        CGroup: /system.slice/jellyfin.service
                ├─1558490 /usr/bin/jellyfin --webdir=/usr/share/jellyfin/web --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg
                └─1983812 /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -i "fileConfused-facesrv/deluge/Downloads/The X-Files (1993) S01-S11 (1080p BluRay x265 10bit EAC3 5.1 Silence)/T>

    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext(Thread threadPoolThread)
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.Tasks.Task.DelayPromise.CompleteTimedOut()
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.TimerQueueTimer.Fire(Boolean isThreadPool)
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
    Feb 17 06:53:25 miranda jellyfin[1558490]: --- End of stack trace from previous location ---
    Feb 17 06:53:25 miranda jellyfin[1558490]:    at Rssdp.Infrastructure.SsdpCommunicationsServer.SendFromSocket(Socket socket, Byte[] messageData, IPEndPoint destination, Canc>
    lines 1-22/22 (END)

    also, filtering the log on ffmpeg:
    Feb 17 05:41:51 miranda jellyfin[1558490]: [05:41:51] [INF] Trickplay generation: /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -i file:"/srv/deluge/Downloads/The X-Files (1993) S01-S11 (1080p BluRay x265 10bit EAC3 5.1 Silence)/The X-Files (1993) S01/The X-Files (1993) - S01E07 - Ghost in the Machine (1080p BluRay x265 Silence).mkv" -an -sn -vf "fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*(a*sar))\,320)/2)*2:trunc(ow/(a*sar)/2)*2,format=yuv420p" -threads 2 -c:v mjpeg -qscale:v 4 -fps_mode passthrough -f image2 "/tmp/jellyfin/ab70575ea82d4fcba56c2f0196513c98/%08d.jpg"
    Feb 17 05:46:24 miranda jellyfin[1558490]: [05:46:24] [INF] Trickplay generation: /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -i file:"/srv/deluge/Downloads/The X-Files (1993) S01-S11 (1080p BluRay x265 10bit EAC3 5.1 Silence)/The X-Files (1993) S01/The X-Files (1993) - S01E12 - Fire (1080p BluRay x265 Silence).mkv" -an -sn -vf "fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*(a*sar))\,320)/2)*2:trunc(ow/(a*sar)/2)*2,format=yuv420p" -threads 2 -c:v mjpeg -qscale:v 4 -fps_mode passthrough -f image2 "/tmp/jellyfin/491c5cdd85c84d70803c9195af4d9f12/%08d.jpg"
    Feb 17 05:51:00 miranda jellyfin[1558490]: [05:51:00] [INF] Trickplay generation: /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -i file:"/srv/deluge/Downloads/The X-Files (1993) S01-S11 (1080p BluRay x265 10bit EAC3 5.1 Silence)/The X-Files (1993) S01/The X-Files (1993) - S01E11 - Eve (1080p BluRay x265 Silence).mkv" -an -sn -vf "fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*(a*sar))\,320)/2)*2:trunc(ow/(a*sar)/2)*2,format=yuv420p" -threads 2 -c:v mjpeg -qscale:v 4 -fps_mode passthrough -f image2 "/tmp/jellyfin/617d87a3cc2847ad847291f14d6cf0bc/%08d.jpg"
    Feb 17 05:55:42 miranda jellyfin[1558490]: [05:55:42] [INF] Trickplay generation: /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -i file:"/srv/deluge/Downloads/The X-Files (1993) S01-S11 (1080p BluRay x265 10bit EAC3 5.1 Silence)/The X-Files (1993) S01/The X-Files (1993) - S01E15 - Lazarus (1080p BluRay x265 Silence).mkv" -an -sn -vf "fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*(a*sar))\,320)/2)*2:trunc(ow/(a*sar)/2)*2,format=yuv420p" -threads 2 -c:v mjpeg -qscale:v 4 -fps_mode passthrough -f image2 "/tmp/jellyfin/f9705f0fec204f2daab4b8b0038892b6/%08d.jpg"
    Feb 17 06:00:09 miranda jellyfin[1558490]: [06:00:09] [INF] Trickplay generation: /usr/lib/jellyfin-ffmpeg/ffmpeg -loglevel error -i file:"/srv/deluge/Downloads/The X-Files (1993) S01-S11 (1080p BluRay x265 10bit EAC3 5.1 Silence)/The X-Files (1993) S01/The X-Files (1993) - S01E05 - The Jersey Devil (1080p BluRay x265 Silence).mkv" -an -sn -vf "fps=0.10000000149011612,setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*(a*sar))\,320)/2)*2:trunc(ow/(a*sar)/2)*2,format=yuv420p" -threads 2 -c:v mjpeg -qscale:v 4 -fps_mode passthrough -f image2 "/tmp/jellyfin/91a0b465995241e09f8ba8793c8f4d65/%08d.jpg"

    It appears to be scanning my library of video content, but not clear what it's doing.
    el_toro_2022
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Feb
    Reputation: 0
    Country:Colombia
    #4
    2025-02-17, 12:19 PM (This post was last modified: 2025-02-17, 01:07 PM by el_toro_2022. Edited 1 time in total.)
    Upon deeper reflection, it appears to be doing trickplay generation. But it appears to be generating a large number of jpegs. I have reconfigured Jellyfin to go easier on the resources. So consider this matter closed.
    Efficient_Good_5784
    Offline

    Community Moderator

    Posts: 1,167
    Threads: 3
    Joined: 2023 Jun
    Reputation: 50
    #5
    2025-02-17, 01:47 PM (This post was last modified: 2025-02-17, 01:48 PM by Efficient_Good_5784. Edited 1 time in total.)
    If you want to see a visual of what trickplay files are, see this: https://forum.jellyfin.org/t-trickplay-t...dth-height

    I would suggest that you go to your Jellyfin dashboard and change the trickplay settings so that it uses keyframes. Keyframes make trickplay generation go by extremely fast.

    I would also avoid setting HWA for trickplays unless you got a really underpowered CPU. HWA is usually slower than keyframe generation too.

    By making Jellyfin have access to less resources, you're just making it take way longer for the task to finish.
    I'm assuming that you populated your server for the first time. Trickplay generation is probably the most resource-intensive task that Jellyfin has currently.
    Jellyfin basically has to open each video, read through it all linearly and pick frames to then convert to single images based on the time interval that's set in the settings.
    If you have a lot of media, this will take a while. But once your initial set of media have trickplays generated, your system won't be placed under prolonged heavy load as you won't be adding tons of new media at once afterwards.

    To give you an idea, a modern CPU can create a trickplay file with default settings for a 24 minute video in around 2 minutes or so. A 1.5 hour movie takes around 5-6 minutes.
    And by enabling keyframes, this goes by much faster.
    « 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