Trouble with Hardware Accelerated Transcoding

Hey there, I’m not exactly sure where to post this, but I have been trying to solve this issue for hours now. I have an old Intel NUC which runs Ubuntu/Docker with Sonarr, Jellyfin etc. I’ve found that it is slightly too slow for ‘live’ transcoding through Jellyfin. Enabling hardware transcoding I’m experiencing speeds at around 22fps, which isn’t ideal. So, I’m currently attempting to use unmanic to avoid it altogether, but I’m running into issues when trying to get hardware acceleration to work.

I’ve followed the official documentation as well as the guide provided here: Link to the guide you mentioned. I’ve tried 6 or 7 different plugins related to GPU transcoding, but the problem remains. I also experimented with tdarr, but it had the same issue and it would always fall back to CPU.

Looking at the logs for Unmanic I see this error:


<span style="color:#323232;">[hevc_vaapi @ 0x56224b97db80] No usable encoding entrypoint found for profile VAProfileHEVCMain (17).
</span><span style="color:#323232;">Error initializing output stream 0:16 -- Error while opening encoder for output stream #0:16 - maybe incorrect parameters such as bit_rate, rate, width or height
</span><span style="color:#323232;">Conversion failed!
</span>

But, when I run ‘vainfo’, it does show a ‘VAProfileHEVCMain’ entrypoint:


<span style="color:#323232;">vainfo: Supported profile and entrypoints
</span><span style="color:#323232;">      VAProfileMPEG2Simple            : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileMPEG2Simple            : VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileMPEG2Main              : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileMPEG2Main              : VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileH264Main               : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileH264Main               : VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileH264High               : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileH264High               : VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileH264MultiviewHigh      : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileH264StereoHigh         : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileH264StereoHigh         : VAEntrypointEncSlice
</span><span style="color:#323232;">      VAProfileVC1Simple              : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileVC1Main                : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileVC1Advanced            : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileNone                   : VAEntrypointVideoProc
</span><span style="color:#323232;">      VAProfileJPEGBaseline           : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileJPEGBaseline           : VAEntrypointEncPicture
</span><span style="color:#323232;">      VAProfileVP8Version0_3          : VAEntrypointVLD
</span><span style="color:#323232;">      VAProfileVP8Version0_3          : VAEntrypointEncSlice
</span><span style="color:#323232;">----> VAProfileHEVCMain               : VAEntrypointVLD
</span>

While the CPU is quite dated, it’s worth noting that hardware-accelerated transcoding works with Jellyfin. The CPU is an Intel® Celeron® CPU J3060 @ 1.60GHz.

I am trying to convert to either H.264 or H.265.

poVoq,
@poVoq@slrpnk.net avatar

There are multiple Jellifin and in-house streaming communities on Lemmy. Why not post these type of support question there?

Jellyfin is not really self-hosted in the classical sense and I think these off-topic posts are really getting too much lately.

Eideen,
@Eideen@lemmy.world avatar
MoonlitSanguine,

I just tried it with

ffmpeg -c:v h264_qsv -i Kimetsu no Yaiba Yuukaku Hen - 01 [Blu-Ray][1080p][10bit][BCEFB086].mkv -map 0 -c copy -c:v hevc_qsv -preset slow -global_quality 22 -look_ahead 1 output.mkv

and got:


<span style="color:#323232;">[h264_qsv @ 0x5647e6354780] Error initializing the MFX video decoder: invalid handle (-6)
</span><span style="color:#323232;">Error while decoding stream #0:0: Invalid argument
</span><span style="color:#323232;">[h264_qsv @ 0x5647e6354780] [IMGUTILS @ 0x7fffc3312e40] Picture size 0x0 is invalid
</span><span style="color:#323232;">[h264_qsv @ 0x5647e6354780] video_get_buffer: image parameters invalid
</span><span style="color:#323232;">[h264_qsv @ 0x5647e6354780] get_buffer() failed
</span><span style="color:#323232;">Error while decoding stream #0:0: Invalid argument
</span>

Could this mean it is a driver issue?

Eideen,
@Eideen@lemmy.world avatar

You arguments looks incorrect, -c:v h264_qsv and -c:v hevc_qsv .

I can be a driver issue, you can try with a Live disk to see if the issue persist.

ninjan,

H.264 should absolutely work since it supports Intel Quick Sync Video (QSV), which is mainly focused on H.264. I guess it then depends on if there is QSV support in unmanic / the plugins you’re trying?

MoonlitSanguine,

There is 1 plugin that seems to support H.264, the rest are H.265. I tried the following plugins:

  • “Transcode Video Files” with the following options selected
    • Video Code = H264
    • Video Encoder = hvec_qvc
  • "Video Encoder H265/HEVC - hevc_vaapi (INTEL/AMD)"
  • “Video Encoder H265/HEVC - hevc_qsv (Intel)”

None of them worked.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • selfhosted@lemmy.world
  • DreamBathrooms
  • magazineikmin
  • hgfsjryuu7
  • Durango
  • Youngstown
  • slotface
  • everett
  • ngwrru68w68
  • rosin
  • kavyap
  • mdbf
  • PowerRangers
  • InstantRegret
  • osvaldo12
  • Leos
  • thenastyranch
  • vwfavf
  • khanakhh
  • tacticalgear
  • cisconetworking
  • modclub
  • GTA5RPClips
  • ethstaker
  • cubers
  • normalnudes
  • tester
  • anitta
  • provamag3
  • All magazines