Hardware Encoding Blank Video on Linux with Radeon

Before posting this i looked the forums and google for 2 hours.
I know i cannot use nvenc because i don’t have a Nvidia.
But can i use vaapi with my radeon?

If i run “vainfo” it seems it says OK:

$ vainfo 
libva info: VA-API version 1.1.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_1
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Mesa Gallium driver 19.0.8 for AMD OLAND (DRM 2.50.0, 5.0.0-27-generic, LLVM 8.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

My card is:

$ lspci  | grep -i VGA
01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Oland PRO [Radeon R7 240/340]

However when rendering with any of the 4 detected encoders i get always a blank video with only audio.

Is it the h264_vaapi supposed to work with ANY cards supporting “libva” ?
Or the whole hardware encoding will work only with a Nvidia card anyway?
Do i need to buy a Nvidia? Do you have an hardware support matrix table?

Many thanks for writing such great software!

1 Like

@Antonio_Gallo Which Shotcut version are you using? (Help - About Shotcut)
Did you download Shotcut from this link? https://shotcut.org/download/

@Hudson555x Yes i installed it using “snap” on Linux Mint (Ubuntu Based).
My version is 19.08.16

It works on my Radeon 460 even in the snap. Shotcut can automatically detect what is available if you do not manually configure it by clicking Configure…, or uncheck everything, and then click the checkbox to enable the hardware encoder.
Your vainfo output shows your Radeon only supports decode and not encode. Here is my output for comparison:

vainfo: VA-API version: 1.1 (libva 2.1.0)
vainfo: Driver version: Mesa Gallium driver 19.0.8 for Radeon RX 560 Series (POLARIS11, DRM 3.23.0, 4.15.0-60-generic, LLVM 8.0.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointEncSlice
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointEncSlice
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointEncSlice
      VAProfileHEVCMain               :	VAEntrypointVLD
      VAProfileHEVCMain               :	VAEntrypointEncSlice
      VAProfileHEVCMain10             :	VAEntrypointVLD
      VAProfileJPEGBaseline           :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

VAEntrypointEncSlice means encoding.

So the key is to have “VAEntrypointEncSlice” ?

I will look for some new card that has it.

I am trying to compile a home video (a travelogue, really) out of video clips and photos on my old PC. Everything works just fine (including filters and transitions), albeit slowly, as long as I use 720p. An attempt to speed things up by checking the “Use hardware encoder” control results in the problems identical to those described earlier in another thread:

• If I click the checkbox, the message “Nothing found” appears
• If I open “Configure…”, and select one of the options (tried them all one by one), The resulting video is black (but with audio)

My system configuration:
• Windows 7 32 bit
• Shotcut 19.09.14
• Pentium 4 3GHz
2 GB RAM DDR-2, Intel 945G chipset
• ATI Radeon 3870 (512MB)

Shotcut is in the “Program files” folder – the path does contain a space.
I also found and installed the “AMD Media Codec Package”, so, if my understanding is correct, my system should now be properly configured for the task.

Q: (1) is there a way to use hardware assisted encoding with ATI Radeon 3870? If yes, what should I do to enable it? (2) Since 720p seems to work with my hardware, would 1080p work if I add 2GB of RAM, to a total of 4GB?

Many thanks in advance.

This device is not supported. Here is a good list of supported AMD devices

Many thanks Dan,
I guess for now I will continue with my old PC and 720p videos.
KR,
Vladimir

This topic was automatically closed after 90 days. New replies are no longer allowed.