![]() |
SOLVED: Problems with TRANSCODING (TrueNAS) - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: SOLVED: Problems with TRANSCODING (TrueNAS) (/t-solved-problems-with-transcoding-truenas) Pages:
1
2
|
RE: Problems with TRANSCODING (TrueNAS) - imperyal - 2025-01-23 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 RE: Problems with TRANSCODING (TrueNAS) - TheDreadPirate - 2025-01-23 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 RE: Problems with TRANSCODING (TrueNAS) - imperyal - 2025-01-23 Ok, sorry... ffmpeg log at: https://www.dropbox.com/scl/fi/yewzgre8ia3jecs1w7pfl/Log_ffmpeg.txt?rlkey=rwierpxfcchdhiv2ch2aqn3bs&dl=0 RE: Problems with TRANSCODING (TrueNAS) - TheDreadPirate - 2025-01-23 Yep. But, as I said, what you are seeing is expected. Code: Stream mapping: 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. RE: Problems with TRANSCODING (TrueNAS) - imperyal - 2025-01-23 Ok... another test. This time a 1080p movie, no subtitles... Still 70%-80% CPU. Log1: https://www.dropbox.com/scl/fi/6c3eboe0gfgpyi25ishd1/Log_ini.txt?rlkey=u73pch251oqpge3n527dt048y&dl=0 Log2: https://www.dropbox.com/scl/fi/qhx0c2y89bgt7ago2mti1/Log_fim.txt?rlkey=mt4zrwcc9hhkklzvdeg4en6jf&dl=0 RE: Problems with TRANSCODING (TrueNAS) - TheDreadPirate - 2025-01-23 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. RE: Problems with TRANSCODING (TrueNAS) - imperyal - 2025-01-23 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 ![]() RE: Problems with TRANSCODING (TrueNAS) - TheDreadPirate - 2025-01-23 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. RE: Problems with TRANSCODING (TrueNAS) - imperyal - 2025-01-23 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. RE: Problems with TRANSCODING (TrueNAS) - TheDreadPirate - 2025-01-23 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. |