• 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 Migrating from Plex, seeing higher CPU usage

     
    • 0 Vote(s) - 0 Average

    Migrating from Plex, seeing higher CPU usage

    bbradley
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #1
    2025-01-07, 07:40 PM (This post was last modified: 2025-01-07, 07:51 PM by bbradley. Edited 2 times in total.)
    Hi,

    I am working on migrating away from Plex, and in the process of testing my setup. One hangup I have is that Jellyfin seems to need about twice the CPU resources when transcoding compared to Plex, and I am wondering if there is something I am missing.

    • I am using the linuxserver docker image for both services. I have installed the linuxserver dockermod to support OpenCL for HDR tone mapping.
    • I have enabled hardware transcoding of course, and enabled all relevant settings (I believe) for my CPU (Intel i5 13500 (Alder Lake))
    • I am testing by forcing transcoding on a 4k video (4K HDR10 HEVC Main 10 down to 720kbps for the test) with HDR tone mapping
    • Jellyfin is using 15-20% CPU to do it (uses 60% when software decoding, so hardware acceleration definitely working), and Plex barely uses more than idle (5-7%)
    • Both are transcoding audio (direct streaming)
    • I am not including subtitles
    • Both are played on web player in Chrome

    Maybe I am missing some setting to tweak the performance. Any thoughts? Any logs that would be useful?


    Here are the logs from a random playback session

    Code:
    [14:15:23] [INF] [21] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
    [14:15:23] [INF] [21] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -f matroska -init_hw_device vaapi=va:/dev/dri/renderD128,driver=iHD -init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/data/movies/Oppenheimer (2023) {imdb-tt15398776}/Oppenheimer (2023) {imdb-tt15398776} [Remux-2160p][PQ][DTS-HD MA 5.1][HEVC]-GHD.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_qsv -tag:v:0 hvc1 -low_power 1 -preset veryfast -b:v 336000 -maxrate 336000 -bufsize 672000 -profile:v:0 main -level 50 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,scale_vaapi=w=960:h=540:extra_hw_frames=24,hwmap=derive_device=opencl:mode=read,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwmap=derive_device=qsv:mode=write:reverse=1:extra_hw_frames=16,format=qsv" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "54cf77258ba7d5b94255a7b409edb8ac-1.mp4" -start_number 0 -hls_segment_filename "/config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac.m3u8"
    [14:15:32] [INF] [20] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for /config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac.m3u8
    [14:15:32] [INF] [20] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 0
    [14:15:32] [INF] [20] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
    [14:15:32] [INF] [20] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -ss 00:21:27.000 -noaccurate_seek -f matroska -init_hw_device vaapi=va:/dev/dri/renderD128,driver=iHD -init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device qs -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/data/movies/Oppenheimer (2023) {imdb-tt15398776}/Oppenheimer (2023) {imdb-tt15398776} [Remux-2160p][PQ][DTS-HD MA 5.1][HEVC]-GHD.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 hevc_qsv -tag:v:0 hvc1 -low_power 1 -preset veryfast -b:v 336000 -maxrate 336000 -bufsize 672000 -profile:v:0 main -level 50 -g:v:0 72 -keyint_min:v:0 72 -vf "setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,scale_vaapi=w=960:h=540:extra_hw_frames=24,hwmap=derive_device=opencl:mode=read,tonemap_opencl=format=nv12:p=bt709:t=bt709:m=bt709:tonemap=bt2390:peak=100:desat=0,hwmap=derive_device=qsv:mode=write:reverse=1:extra_hw_frames=16,format=qsv" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "54cf77258ba7d5b94255a7b409edb8ac-1.mp4" -start_number 429 -hls_segment_filename "/config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac.m3u8"
    [14:17:22] [INF] [19] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for /config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac.m3u8
    [14:17:22] [INF] [19] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 0
    [14:17:22] [INF] [19] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) /config/cache/transcodes/54cf77258ba7d5b94255a7b409edb8ac.m3u8
    [14:17:23] [INF] [24] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app Jellyfin Web 10.10.3 playing Oppenheimer. Stopped at 1397760 ms
    crobibero
    Offline

    Core Team (Server & Plugins)

    Posts: 243
    Threads: 0
    Joined: 2023 Jun
    Reputation: 17
    Country:United States
    #2
    2025-01-07, 09:31 PM
    Plex and Jellyfin are different softwares that use different builds of ffmpeg and different transcoding flags, so a direct comparison isn’t possible.

    The closest you can get is by looking at both ffmpeg logs and playing spot the difference.
    1
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #3
    2025-01-07, 11:05 PM
    If I had to guess, Plex is still using ffmpeg 6 while Jellyfin currently uses ffmpeg 7. ffmpeg 7 is significantly more multi-threaded and will use more CPU for equivalent tasks, but the result will be increased performance on jellyfin-ffmpeg 7.
    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]
    bbradley
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2025 Jan
    Reputation: 0
    #4
    2025-01-07, 11:49 PM
    (2025-01-07, 09:31 PM)crobibero Wrote: Plex and Jellyfin are different softwares that use different builds of ffmpeg and different transcoding flags, so a direct comparison isn’t possible.

    The closest you can get is by looking at both ffmpeg logs and playing spot the difference.

    Definitely fair enough. I just was hoping to minimize CPU load for transcodes if possible. In Plex I set option for "prefer faster transcodes" over prefer higher quality. I tried setting the flag for the encoder in jellyfin to super fast thinking it was that, but no major success.

    Is there a way to find the actual ffmpeg command from Plex that you're aware of? I had the same thought but unfortunately the logs don't show all the options I don't think.

    Thanks again though, I appreciate the input.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #5
    2025-01-08, 12:05 AM
    You could probably see the full command on the command line.

    Code:
    ps -aux | grep ffmpeg > ffmpeg_command.txt
    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