Jellyfin Forum
Expected transcoding performance? - 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: Expected transcoding performance? (/t-expected-transcoding-performance)



Expected transcoding performance? - DailyBadger5423 - 2024-06-25

Hello everyone,

I feel like the transcoding performance of my setup is unexpectedly bad so I came here for a sanity check.

I'm running jellyfin via rootless podman on a ThinkCentre M720q with the following specs:
Intel® Core™ i5-8400T CPU @ 1.70GHz
8GB RAM
Intel UHD Graphics 630
Samsung 250GB SSD

Whenever I try watch a movie that needs to be transcoded it looks similar to the attached gif.
The png attachment shows what it the movie is being transcoded to.

The peak load I've seen so far was at 9 which is obviously not ideal with a 6 core processor.
Is this kind of CPU load expected even WITH hardware acceleration?


RE: Expected transcoding performance? - Mel_Gibson_Real - 2024-06-25

When tone mapping maybe, try transcoding a video thats not hdr and see if you see similar cpu usage.

Check to see if you have all the packages for hw tone mapping. I dont have the names but the intel hw acceleration guide on jellyfins website will list them.


RE: Expected transcoding performance? - Efficient_Good_5784 - 2024-06-25

The transcoding speed is fine. Your system is transcoding at 143fps from your picture.

The issue is that your client is dropping frames. You have 7 dropped frames recorded in the picture. Are you using the same system to play the video as what the server is installed on?


RE: Expected transcoding performance? - DailyBadger5423 - 2024-06-25

(2024-06-25, 08:59 PM)Mel_Gibson_Real Wrote: When tone mapping maybe, try transcoding a video thats not hdr and see if you see similar cpu usage.
As far as I can see my source video file in the screenshot already is SDR.

(2024-06-25, 08:59 PM)Mel_Gibson_Real Wrote: Check to see if you have all the packages for hw tone mapping. I dont have the names but the intel hw acceleration guide on jellyfins website will list them.
According to the docs the official Docker-Image should bring everything that's required. https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#configure-with-linux-virtualization

(2024-06-25, 09:05 PM)Efficient_Good_5784 Wrote: The transcoding speed is fine. Your system is transcoding at 143fps from your picture.
I was more asking about the amount of resources required on the server side. The video playback itself is fine (apart from an audio desync issue but I don't think those two issues are linked).

(2024-06-25, 09:05 PM)Efficient_Good_5784 Wrote: The issue is that your client is dropping frames. You have 7 dropped frames recorded in the picture. Are you using the same system to play the video as what the server is installed on?
I'm watching the video via Firefox in my main PC which is a different machine


In case this is relevant I am using QSV and this is the output from vainfo and ffmpeg:
Code:
[redacted@redacted ~]$ podman exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo
Trying display: drm
libva info: VA-API version 1.21.0
libva info: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_21
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.21 (libva 2.21.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.2.3 (7c1c775)
vainfo: Supported profile and entrypoints
      VAProfileNone                  : VAEntrypointVideoProc
      VAProfileNone                  : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointVLD
      VAProfileH264Main              : VAEntrypointEncSlice
      VAProfileH264Main              : VAEntrypointFEI
      VAProfileH264Main              : VAEntrypointEncSliceLP
      VAProfileH264High              : VAEntrypointVLD
      VAProfileH264High              : VAEntrypointEncSlice
      VAProfileH264High              : VAEntrypointFEI
      VAProfileH264High              : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointVLD
      VAProfileJPEGBaseline          : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain              : VAEntrypointVLD
      VAProfileHEVCMain              : VAEntrypointEncSlice
      VAProfileHEVCMain              : VAEntrypointFEI
      VAProfileHEVCMain10            : VAEntrypointVLD
      VAProfileHEVCMain10            : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
[redacted@redacted ~]$ podman exec -it jellyfin /usr/lib/jellyfin-ffmpeg/ffmpeg -v verbose -init_hw_device vaapi=va -init_hw_device opencl@va
ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Debian 12.2.0-14)
  configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
  libavutil      58.  2.100 / 58.  2.100
  libavcodec    60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter    9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample  4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
[AVHWDeviceContext @ 0x562029835480] Trying to use DRM render node for device 0.
[AVHWDeviceContext @ 0x562029835480] libva: VA-API version 1.21.0
[AVHWDeviceContext @ 0x562029835480] libva: Trying to open /usr/lib/jellyfin-ffmpeg/lib/dri/iHD_drv_video.so
[AVHWDeviceContext @ 0x562029835480] libva: Found init function __vaDriverInit_1_21
[AVHWDeviceContext @ 0x562029835480] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x562029835480] Initialised VAAPI connection: version 1.21
[AVHWDeviceContext @ 0x562029835480] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 24.2.3 (7c1c775).
[AVHWDeviceContext @ 0x562029835480] Driver not found in known nonstandard list, using standard behaviour.
[AVHWDeviceContext @ 0x56202985ae80] 0.0: Intel(R) OpenCL Graphics / Intel(R) UHD Graphics 630
[AVHWDeviceContext @ 0x56202985ae80] Intel QSV to OpenCL mapping function found (clCreateFromVA_APIMediaSurfaceINTEL).
[AVHWDeviceContext @ 0x56202985ae80] Intel QSV in OpenCL acquire function found (clEnqueueAcquireVA_APIMediaSurfacesINTEL).
[AVHWDeviceContext @ 0x56202985ae80] Intel QSV in OpenCL release function found (clEnqueueReleaseVA_APIMediaSurfacesINTEL).
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'



RE: Expected transcoding performance? - Efficient_Good_5784 - 2024-06-25

(2024-06-25, 09:13 PM)DailyBadger5423 Wrote: I was more asking about the amount of resources required on the server side. The video playback itself is fine (apart from an audio desync issue but I don't think those two issues are linked).
Ohh sorry. I misread your first post and thought you meant the playback looked like a GIF.

From what your server specs are, that does seem normal. While the video can be sent to the iGPU to transcode it, the audio has to be sent to the CPU cores to transcode that. So since the CPU you're using is on the lower-end in terms of performance, having a higher CPU utilization is normal.


RE: Expected transcoding performance? - DailyBadger5423 - 2024-06-25

Okay, thank you.
Is there a way to limit the threads the transcoder can use for the audio transcoding?
Or am I better off just transcoding the source material once on my main pc and use the new x264 copy on my server?


RE: Expected transcoding performance? - Efficient_Good_5784 - 2024-06-25

Audio transcodes don't really take advantage of multiple cores & threads.

Also, just because HWA is enabled doesn't mean that the CPU won't stop handling parts of the video transcode too.


RE: Expected transcoding performance? - nyanmisaka - 2024-06-26

It seems that HEVC 10-bit hw decoder is not enabled, which causes swdec+hwenc. You can enable it in Dashboard->Playback.