• 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 SOLVED: Problems with TRANSCODING (TrueNAS)

    Pages (2): « Previous 1 2

     
    • 0 Vote(s) - 0 Average

    SOLVED: Problems with TRANSCODING (TrueNAS)

    I'm on TrueNAS (ElectricEel-24.10-BETA.1)
    imperyal
    Offline

    Junior Member

    Posts: 7
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    Country:Portugal
    #11
    2025-01-23, 04:44 PM
    ffmpeg log:


    [2025-01-23 16:40:45.082 +00:00] [INF] [31] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "62.28.152.176" request
    [2025-01-23 16:40:55.705 +00:00] [INF] [29] Jellyfin.Api.Helpers.MediaInfoHelper: User policy for "imperyal". EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
    [2025-01-23 16:40:56.689 +00:00] [INF] [29] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
    [2025-01-23 16:40:56.690 +00:00] [INF] [29] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -f matroska -init_hw_device vaapi=va:,vendor_id=0x8086,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -canvas_size 1920x1080 -i file:\"/SMB/Movies 4K/Interstellar.2014/Interstellar.2014.2160p.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset veryfast -b:v 9616000 -maxrate 9616000 -bufsize 19232000 -profile:v:0 high -level 51 -g:v:0 72 -keyint_min:v:0 72 -filter_complex \"[0:3]scale,scale=1920:1080:fast_bilinear[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,1920)/2)*2:trunc(ow/a/2)*2,format=yuv420p[main];[main][sub]overlay=eof_action=pass:repeatlast=0\" -start_at_zero -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 \"9a3effbfc039c6166a7010def258c98b-1.mp4\" -start_number 0 -hls_segment_filename \"/cache/transcodes/9a3effbfc039c6166a7010def258c98b%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/9a3effbfc039c6166a7010def258c98b.m3u8\""
    [2025-01-23 16:41:07.263 +00:00] [INF] [35] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for "/cache/transcodes/9a3effbfc039c6166a7010def258c98b.m3u8"
    [2025-01-23 16:41:07.838 +00:00] [INF] [35] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 0
    [2025-01-23 16:41:07.839 +00:00] [INF] [35] Jellyfin.Api.Controllers.DynamicHlsController: Current HLS implementation doesn't support non-keyframe breaks but one is requested, ignoring that request
    [2025-01-23 16:41:07.841 +00:00] [INF] [35] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: "/usr/lib/jellyfin-ffmpeg/ffmpeg" "-analyzeduration 200M -probesize 1G -ss 01:15:03.000 -noaccurate_seek -f matroska -init_hw_device vaapi=va:,vendor_id=0x8086,driver=iHD -init_hw_device qsv=qs@va -filter_hw_device qs -canvas_size 1920x1080 -i file:\"/SMB/Movies 4K/Interstellar.2014/Interstellar.2014.2160p.mkv\" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset veryfast -b:v 9616000 -maxrate 9616000 -bufsize 19232000 -profile:v:0 high -level 51 -g:v:0 72 -keyint_min:v:0 72 -filter_complex \"[0:3]scale,scale=1920:1080:fast_bilinear[sub];[0:0]setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale=trunc(min(max(iw\,ih*a)\,1920)/2)*2:trunc(ow/a/2)*2,format=yuv420p[main];[main][sub]overlay=eof_action=pass:repeatlast=0\" -start_at_zero -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 \"9a3effbfc039c6166a7010def258c98b-1.mp4\" -start_number 1501 -hls_segment_filename \"/cache/transcodes/9a3effbfc039c6166a7010def258c98b%d.mp4\" -hls_playlist_type vod -hls_list_size 0 -y \"/cache/transcodes/9a3effbfc039c6166a7010def258c98b.m3u8\""
    [2025-01-23 16:41:47.031 +00:00] [INF] [32] MediaBrowser.Controller.MediaEncoding.TranscodingJob: Stopping ffmpeg process with q command for "/cache/transcodes/9a3effbfc039c6166a7010def258c98b.m3u8"
    [2025-01-23 16:41:47.103 +00:00] [INF] [40] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "62.28.152.176" closed
    [2025-01-23 16:41:47.473 +00:00] [INF] [32] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: FFmpeg exited with code 0
    [2025-01-23 16:41:47.473 +00:00] [INF] [32] MediaBrowser.MediaEncoding.Transcoding.TranscodeManager: Deleting partial stream file(s) "/cache/transcodes/9a3effbfc039c6166a7010def258c98b.m3u8"
    [2025-01-23 16:41:49.108 +00:00] [INF] [32] Emby.Server.Implementations.Session.SessionManager: Playback stopped reported by app "Jellyfin Web" "10.10.4" playing "Interstellar". Stopped at "4539578" ms
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #12
    2025-01-23, 05:05 PM (This post was last modified: 2025-01-23, 05:06 PM by TheDreadPirate. Edited 2 times in total.)
    That is not the ffmpeg log. That is the main jellyfin log. There is a separate log called FFmpeg.Transcode<insert random ID>.

    But the Jellyfin log does list out the ffmpeg command used, and you are GPU encoding with low power encoding.

    Code:
    -codec:v:0 h264_qsv
    Code:
    -low_power 1

    You are also audio transcoding, audio down mixing, and burning in subtitles. Which all occur on the CPU.

    Code:
    -codec:a:0 libfdk_aac -ac 2
    Code:
    [sub]overlay=eof_action=pass:repeatlast=0
    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]
    imperyal
    Offline

    Junior Member

    Posts: 7
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    Country:Portugal
    #13
    2025-01-23, 05:16 PM
    Ok, sorry...

    ffmpeg log at: https://www.dropbox.com/scl/fi/yewzgre8i...qn3bs&dl=0
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #14
    2025-01-23, 05:18 PM
    Yep. But, as I said, what you are seeing is expected.

    Code:
    Stream mapping:
      Stream #0:0 (hevc) -> setparams:default (graph 0)
      Stream #0:3 (pgssub) -> scale:default (graph 0)
      overlay:default (graph 0) -> Stream #0:0 (h264_qsv)
      Stream #0:1 -> #0:1 (dts (dca) -> aac (libfdk_aac))

    It is GPU transcoding, h264_qsv, but subtitle burn in and audio transcoding always happens on the CPU. And subtitle burn in is multi-threaded.
    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]
    imperyal
    Offline

    Junior Member

    Posts: 7
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    Country:Portugal
    #15
    2025-01-23, 05:33 PM
    Ok... another test. This time a 1080p movie, no subtitles... Still 70%-80% CPU.

    Log1: https://www.dropbox.com/scl/fi/6c3eboe0g...t048y&dl=0
    Log2: https://www.dropbox.com/scl/fi/qhx0c2y89...en6jf&dl=0
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #16
    2025-01-23, 05:42 PM
    Still audio transcoding. And because the resolution is lower, the GPU is transcoding the video faster which requires the CPU to keep up with the audio transcode.
    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]
    imperyal
    Offline

    Junior Member

    Posts: 7
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    Country:Portugal
    #17
    2025-01-23, 06:05 PM
    I was expecting transcoding was done in chunks not to hog the CPU soo much...
    Is there something I can do to optimize this? The subtitles must be burn-in, or could they be rendered on the player?
    Same for the audio, or a direct passthrough or something?

    Thank you for your help Winking-face
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #18
    2025-01-23, 06:17 PM (This post was last modified: 2025-01-23, 06:18 PM by TheDreadPirate. Edited 1 time in total.)
    By default ffmpeg will always transcoding as fast as possible all the way to the end of the file. You can enable transcoding throttling in Jellyfin. This will cause ffmpeg to pause when the transcode gets a few minutes ahead of the current playback position.

    Direct subtitle rendering varies per client. The videos you've shared all have PGS subs. Direct PGS rendering is only supported on jellyfin-web, at the moment. And that is still experimental.

    https://forum.jellyfin.org/t-native-pgs-support

    SRT subs can be directly rendered on pretty much all clients. ASS subs are supported in Jellyfin-web on most browsers and partial, unstyled, support in Android when using exoplayer. DVD/VOBSUB subtitles are always burned in.

    Audio passthrough also varies by device. If the device manufacturer paid for the license to do audio passthrough, Jellyfin should be able to do that if you enable it.
    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]
    imperyal
    Offline

    Junior Member

    Posts: 7
    Threads: 0
    Joined: 2025 Jan
    Reputation: 0
    Country:Portugal
    #19
    2025-01-23, 06:38 PM
    Just to be sure I tried the same file (4K HDR), on the other software (Pl**)... Same hardware, of course, on TrueNAS.

    Without hardware transcoding 80% CPU, same as Jellyfin. With hardware transcoding (Pl** pass) I'm getting 1% ~ 5%. Something is not setup properly on my Jellyfin, I'm concluding.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #20
    2025-01-23, 06:43 PM
    Plex uses their own, or some different, playback engine whereas Jellyfin relies on the playback engine built into the device. Exoplayer in the case of Android TV

    Their app is not going to behave the same as Jellyfin. It is probably direct playing in Plex.

    Your Jellyfin is configured correctly. You can try adjusting the settings on the client device to enable audio passthrough.
    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 (2): « Previous 1 2

    « 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