VA-API support for hardware transcoding?

I'm considering upgrading the machine I'm using as my DVR, and I'm investigating my options. I know the DVR advertises support for Intel QSV, but Channels' included ffmpeg not only includes the h264_qsv encoder, but also the h264_vaapi. Can I use any chipset supported by VA-API, or only Intel processors with QSV support.

One of the options I'm looking at is an AMD Vega chipset, which works well with VA-API on Linux. However, if Channels' won't be able to use it for transcoding for remote viewing, then I suppose I need to change my options to only include Intel chipsets.

At the moment we only support Intel transcoding on Linux

Looking at the spawned processes when streaming to a remote client, it looks like the calls to ffmpeg all reference vaapi, not qsv. Since AMD graphics use VA-API (just like Intel graphics), this ought to work with graphics chipsets that use the radeon or amdgpu (and possibly amdgpu-pro and others) drivers to hardware accelerate transcoding for remote clients, yes?

Are there any users with AMD chipsets who are able to hardware transcode from a Linux-based server to a remote client? Or anyone with an AMD chipset who can test this? (I might be able to check this when I get access back to one of my machines with a Radeon card to test with ...)

It's more complicated than that and I can tell you with 100% certainty that only Intel transcoding will work with our transcoder.

Is there any chance to get vaapi radeon drivers supported for docker in linux? It works great in Emby. Would love to be able to transcode live tv for my super slow upload speed.

I can take a look. Can you tell me what GPU model and which drivers you're using with the other setup?

Oh great! I appreciate you taking a look at it. I'm using a ryzen 5600g APU on Linux. I am using the Channels Docker, albeit the custom one for user permissions and having the linuxserver base https://github.com/timstephens24/channelsdvr-docker, inside Ubuntu 21.10.

Emby is working (same config) by just passing in the /dev/dri folder and enabling hardware encoding.

I'm not sure exactly which driver is enabling it for my specific gpu, but if I install "vainfo" along with it's dependencies in ubuntu or debian, the hw accel is enabled. I believe it is "libva-mesa-driver" package that installs the required driver. The driver ffmpeg is using is "radeonsi".

Here is the archwiki article that discusses enabling amd gpus in vaapi. Hardware video acceleration - ArchWiki.

It would be amazing to get this working! It'd be the last piece of the puzzle for me. So far I have been successful with emby, jellyfin, and tdarr for hardware accel.

Thanks!

Hey, I know you guys are busy, were you able to make any progress on including VA-API support in your version of ffmpeg for hardware transcoding?

Thanks!

I think you need to be more specific hardware-wise. My Channels servers runs on a Linux host, and my transcoding is hardware-assisted via VAAPI.

Have you looked at the logs generated from:

POST /hls/hwaccel

That would give an indication for which devices were being queried on your hardware.

The current VA-API implementation is Intel only. I'm using an AMD APU as stated above. I don't have the hardware option under transcoding.

I think I have an old AMD card in a tower I can put an instance of Channels on and see the output. I have other obligations this week that take precedence so it won't be for at least another week or two.

Assuming the proper drivers are installed on the host, I really don't see anything that disqualifies discrete AMD graphics from using Ffmpeg's hwaccel tools via VAAPI.

No update on this yet. It does not work at the moment.

Yeah same here. That's why I'm hoping with fingers crossed that it's an easy fix for the devs. It would be great to have the hardware transcoding for watching remotely with my crappy upload speed.

Ok, thanks for chiming in. Hopefully it's as easy as using a different version of ffmpeg. It seems that the fix for other applications with the same issue is to use the jellyfin version of ffmpeg that is compiled with all the required drivers. https://github.com/HaveAGitGat/Tdarr/issues/452#issuecomment-962490079

I'd like to test this, but I have a couple of device with discrete AMD cards that I can't fully get around to for at least 2 weeks. I know you've been waiting this long, but sorry I can't be of more concrete help right now.

No problem at all. You are welcome to test it as well.