You are not logged in.

#1 2022-07-10 06:01:15

rajhlinux
Member
Registered: 2022-07-08
Posts: 58

How to get HEVC VAAPI hardware encoding to work on FFMPEG?

Hello,

How can I get HEVC VAAPI hardware encoding to work on FFMPEG?

I installed all of the AMD proprietary drivers, it seems like I would need the open source MESA drivers, but I believe MESA drivers are already installed by default since this command:

glxinfo | grep "OpenGL vendor string" | cut -f2 -d":" | xargs

shows:

Mesa/X.org

Are there any articles or links which explains on how to get HEVC VAAPI hardware encoding to work on FFMPEG?

Thanks.

Last edited by rajhlinux (2022-07-10 07:28:17)

Offline

#2 2022-07-10 07:27:29

rajhlinux
Member
Registered: 2022-07-08
Posts: 58

Re: How to get HEVC VAAPI hardware encoding to work on FFMPEG?

I was using the terminal via the XRDP and XRDP uses the open source mesa driver.

When logging into using a regular LCD monitor or using "nomachine" remote desktop, and using the terminal from there, it will show AMD (the proprietary AMD's GPU driver)...

Either way, would like to know how I can get HEVC VAAPI hardware encoding working on FFMPEG.

I tried installing "obs-hevc-vaapi" AUR package and like many before me had said it does not build, which happened the same to me.

Thanks.

Last edited by rajhlinux (2022-07-10 07:30:02)

Offline

#3 2022-12-22 16:07:31

obelisk
Member
Registered: 2021-01-10
Posts: 54

Re: How to get HEVC VAAPI hardware encoding to work on FFMPEG?

It depends, what the name of the encoder is. Ans maybe of which driver you're using.

I have an Nvidia card, there I use ffmpeg with:

ffmpeg -hwaccel vdpau  -i INPUTFILE.mkv   -vcodec hevc_nvenc -profile:v main -level:v auto -preset:v default     -c:a copy   -f matroska  OUT.mkv

You can also use option -map 0:0   -map 0:1 for each stream. Check streams of file with

ffprobe FILENAME

Your your AMD graphic ard, check the outputs:

ffmpeg --help
ffmpeg -hwaccels
ffmpeg -encoders
ffmpeg -encoders | grep -i 265
ffmpeg -encoders | grep -i 264

The h265 graphic card encoder for my nvidia is hevc_vaapi.
The h264 graphic card encoder for my nvidia is h264_nvenc.

I have no AMD card, so I cannot say which one you have to choose.

The AMD encoder are:
AMD Encoder: Video Code Engine (VCE) (obsolet)    https://en.wikipedia.org/wiki/Video_Coding_Engine
AMD Decoder: Unified Video Decoder (UVD) (obsolet)   https://en.wikipedia.org/wiki/Unified_Video_Decoder
New/current: UVD and VCE were succeeded by Video Core Next (VCN)   https://en.wikipedia.org/wiki/Video_Core_Next
So I think you have to look at ffmpeg -encoders output, if there is something with VCN

Check also the tables in:   https://en.wikipedia.org/wiki/Video_Coding_Engine

Offline

#4 2022-12-23 18:23:19

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: How to get HEVC VAAPI hardware encoding to work on FFMPEG?

hevc_vaapi is not specific to nvidia but useful for all cards.

Check https://wiki.archlinux.org/title/FFmpeg#VA-API


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2022-12-23 18:29:17

obelisk
Member
Registered: 2021-01-10
Posts: 54

Re: How to get HEVC VAAPI hardware encoding to work on FFMPEG?

Oh, I confused hevc_vaapi with hevc_nvenc, sorry.

Offline

Board footer

Powered by FluxBB