Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No usable profile found for h264 vaapi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
zeio
n00b
n00b


Joined: 01 Nov 2023
Posts: 3

PostPosted: Tue Nov 28, 2023 8:03 pm    Post subject: No usable profile found for h264 vaapi Reply with quote

Hi, I am trying to enable screencasting through OBS with Hyprland. My attempts to use pipewire for this purpose have failed, and now I am trying to use wf-recorder. I am running the following command:

Code:
wf-recorder -f /dev/video2 --muxer=v4l2 -d /dev/dri/renderD128 --codec=h264_vaapi -l <<< y


Which outputs:

Code:
Output file "/dev/video2" exists. Overwrite? Y/n: selected region 0,0 0x0
[AVHWDeviceContext @ 0x7f440c005260] libva: VA-API version 1.20.0
[AVHWDeviceContext @ 0x7f440c005260] libva: Trying to open /usr/lib64/va/drivers/r600_drv_video.so
[AVHWDeviceContext @ 0x7f440c005260] libva: va_openDriver() returns -1
[AVHWDeviceContext @ 0x7f440c005260] libva: Trying to open /usr/lib64/va/drivers/radeonsi_drv_video.so
[AVHWDeviceContext @ 0x7f440c005260] libva: Found init function __vaDriverInit_1_20
[AVHWDeviceContext @ 0x7f440c005260] libva: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7f440c005260] Initialised VAAPI connection: version 1.20
[AVHWDeviceContext @ 0x7f440c005260] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x36313050 -> unknown.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x56595559 -> unknown.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x30303859 -> gray.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x50343434 -> yuv444p.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x7f440c005260] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x7f440c005260] VAAPI driver: Mesa Gallium driver 23.1.8 for KABINI (, LLVM 16.0.6, DRM 2.50, 6.1.57-gentoo-x86_64).
[AVHWDeviceContext @ 0x7f440c005260] Driver not found in known nonstandard list, using standard behaviour.
detected 4 logical cores
[Source @ 0x7f440c27d6a0] Setting 'video_size' to value '1366x768'
[Source @ 0x7f440c27d6a0] Setting 'pix_fmt' to value '119'
[Source @ 0x7f440c27d6a0] Setting 'time_base' to value '1/1000000'
[Source @ 0x7f440c27d6a0] Setting 'pixel_aspect' to value '1/1'
[Source @ 0x7f440c27d6a0] w:1366 h:768 pixfmt:rgb0 tb:1/1000000 fr:0/1 sar:1/1
Using video filter: hwupload,scale_vaapi=format=nv12
[AVFilterGraph @ 0x7f440c1fe0a0] Setting 'format' to value 'nv12'
[AVFilterGraph @ 0x7f440c1fe0a0] query_formats: 4 queried, 3 merged, 0 already done, 0 delayed
[hwupload @ 0x7f440c1c4a80] Surface format is rgb0.
[AVHWFramesContext @ 0x7f440c21dac0] Created surface 0x1.
[AVHWFramesContext @ 0x7f440c21dac0] Direct mapping possible.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x3.
[AVHWFramesContext @ 0x7f440c372aa0] Direct mapping disabled: deriving image does not work: 1 (operation failed).
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x4.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x5.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x6.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x7.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x8.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0x9.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0xa.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0xb.
[AVHWFramesContext @ 0x7f440c372aa0] Created surface 0xc.
################################################################################
+----------+
|  Source  |default--[1366x768 1:1 rgb0]--Parsed_hwupload_0:default
| (buffer) |
+----------+

                                                           +--------------+
Parsed_scale_vaapi_1:default--[1366x768 1:1 vaapi]--default|     Sink     |
                                                           | (buffersink) |
                                                           +--------------+

                                            +-------------------+
Source:default--[1366x768 1:1 rgb0]--default| Parsed_hwupload_0 |default--[1366x768 1:1 vaapi]--Parsed_scale_vaapi_1:default
                                            |    (hwupload)     |
                                            +-------------------+

                                                        +----------------------+
Parsed_hwupload_0:default--[1366x768 1:1 vaapi]--default| Parsed_scale_vaapi_1 |default--[1366x768 1:1 vaapi]--Sink:default
                                                        |    (scale_vaapi)     |
                                                        +----------------------+


################################################################################
[h264_vaapi @ 0x7f440c001c40] Input surface format is nv12.
[h264_vaapi @ 0x7f440c001c40] Compatible profile VAProfileH264High (7) is not supported by driver.
[h264_vaapi @ 0x7f440c001c40] Compatible profile VAProfileH264Main (6) is not supported by driver.
[h264_vaapi @ 0x7f440c001c40] Compatible profile VAProfileH264ConstrainedBaseline (13) is not supported by driver.
[h264_vaapi @ 0x7f440c001c40] No usable encoding profile found.
avcodec_open2 failed: Function not implemented


Then if I execute
Code:
vainfo
, it outputs:

Code:
Trying display: wayland
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/va/drivers/r600_drv_video.so
libva info: va_openDriver() returns -1
libva info: Trying to open /usr/lib64/va/drivers/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.0)
vainfo: Driver version: Mesa Gallium driver 23.1.8 for KABINI (, LLVM 16.0.6, DRM 2.50, 6.1.57-gentoo-x86_64)
vainfo: Supported profile and entrypoints
      VAProfileNone                   :   VAEntrypointVideoProc


It sounds strange that vaapi doesn't have the required profiles, because I have a discrete AMD GPU:

Code:
VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] (rev 05)


Here is the content of `VIDEO_CARDS` variable in `/etc/portage/make.conf`:

Code:
VIDEO_CARDS="amdgpu radeonsi"


I have 'mesa' installed as well with the following USE flags:

Code:
U I
 + + X                    : Add support for X11
 - - abi_x86_32           : 32-bit (x86) libraries
 + + cpu_flags_x86_sse2   : Use the SSE2 instruction set
 - - d3d9                 : Enable Direct 3D9 API through Nine state tracker. Can be used together with patched wine.
 - - debug                : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - gles1                : Enable GLESv1 support.
 + + gles2                : Enable GLESv2 support.
 + + llvm                 : Enable LLVM backend for Gallium3D.
 - - lm-sensors           : Enable Gallium HUD lm-sensors support.
 - - opencl               : Enable the Rusticl Gallium OpenCL state tracker.
 - - osmesa               : Build the Mesa library for off-screen rendering.
 + + proprietary-codecs   : Enable codecs for patent-encumbered audio and video formats.
 - - test                 : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 - - unwind               : Add support for call stack unwinding and function name resolution
 + + vaapi                : Enable Video Acceleration API for hardware decoding
 - - valgrind             : Enable annotations for accuracy. May slow down runtime slightly. Safe to use even if not currently using dev-util/valgrind
 - - vdpau                : Enable the VDPAU acceleration interface for the Gallium3D Video Layer.
 - - video_cards_d3d12    : VIDEO_CARDS seeting to build driver for Microsoft WSL video cards
 - - video_cards_intel    : VIDEO_CARDS setting to build driver for Intel video cards
 - - video_cards_lavapipe : VIDEO_CARDS setting to build Vulkan software rasterizer using LLVMpipe
 - - video_cards_nouveau  : VIDEO_CARDS setting to build reverse-engineered driver for nvidia cards
 - - video_cards_r300     : VIDEO_CARDS setting to build only r300, r400 and r500 based chips code for radeon
 - - video_cards_r600     : VIDEO_CARDS setting to build only r600, r700, Evergreen and Northern Islands based chips code for radeon
 - - video_cards_radeon   : VIDEO_CARDS setting to build driver for ATI radeon video cards
 + + video_cards_radeonsi : VIDEO_CARDS setting to build only Southern Islands based chips code for radeon
 - - video_cards_virgl    : VIDEO_CARDS setting to build driver for virgil (virtual 3D GPU)
 - - video_cards_vmware   : VIDEO_CARDS setting to build driver for vmware video cards
 + + vulkan               : Add support for 3D graphics and computing via the Vulkan cross-platform API
 - - vulkan-overlay       : Build vulkan-overlay-layer which displays Frames Per Second and other statistics
 + + wayland              : Enable support for dev-libs/wayland
 - - xa                   : Enable the XA (X Acceleration) API for Gallium3D.
 - - zink                 : Enable the Zink OpenGL-over-Vulkan Gallium driver
 + + zstd                 : Enable support for ZSTD compression


Here are my USE flags for 'ffmpeg':

Code:
 U I
 + + X                      : Add support for X11
 - - abi_x86_32             : 32-bit (x86) libraries
 + + alsa                   : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - amr                    : Enables Adaptive Multi-Rate Audio support
 - - amrenc                 : Enables Adaptive Multi-Rate Audio encoding support with media-libs/vo-amrwbenc.
 - - bluray                 : Enable playback of Blu-ray filesystems
 - - bs2b                   : Enables media-libs/libbs2b based Bauer stereo-to-binaural filter.
 + + bzip2                  : Enable bzip2 compression support
 - - cdio                   : Enables audio CD grabbing with dev-libs/libcdio.
 - - chromaprint            : Enables audio fingerprinting support with media-libs/chromaprint.
 - - chromium               : Builds libffmpeg.so to enable media playback in Chromium-based browsers like Opera and Vivaldi.
 - - codec2                 : Enables codec2 low bit rate speech codec support via media-libs/codec2.
 - - cpu_flags_x86_3dnow    : Use the 3DNow! instruction set
 - - cpu_flags_x86_3dnowext : Use the Enhanced 3DNow! instruction set
 + + cpu_flags_x86_aes      : Enable support for Intel's AES instruction set (AES-NI)
 + + cpu_flags_x86_avx      : Adds support for Advanced Vector Extensions instructions
 - - cpu_flags_x86_avx2     : Adds support for Advanced Vector Extensions 2 instructions
 - - cpu_flags_x86_fma3     : Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)
 - - cpu_flags_x86_fma4     : Use the Fused Multiply Add 4 instruction set
 + + cpu_flags_x86_mmx      : Use the MMX instruction set
 + + cpu_flags_x86_mmxext   : Use the Extended MMX instruction set (a subset of SSE) ([mmxext] or [sse] in cpuinfo)
 + + cpu_flags_x86_sse      : Use the SSE instruction set
 + + cpu_flags_x86_sse2     : Use the SSE2 instruction set
 + + cpu_flags_x86_sse3     : Use the SSE3 instruction set ([pni] in cpuinfo, NOT ssse3)
 + + cpu_flags_x86_sse4_1   : Enable SSE4.1 instruction support
 + + cpu_flags_x86_sse4_2   : Enable SSE4.2 instruction support
 + + cpu_flags_x86_ssse3    : Use the SSSE3 instruction set (NOT sse3/pni)
 - - cpu_flags_x86_xop      : Enable the XOP instruction set
 - - cpudetection           : Enables runtime CPU detection (useful for bindist, compatibility on other CPUs)
 + + dav1d                  : Enables AV1 decoding via media-libs/dav1d.
 - - debug                  : Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
 - - doc                    : Add extra documentation (API, Javadoc, etc). It is recommended to enable per package instead of globally
 + + encode                 : Add support for encoding of audio or video files
 - - fdk                    : Use external fdk-aac library for AAC encoding
 + + fftools_aviocat        : cat's a URL to another one, useful for dumping streams.
 + + fftools_cws2fws        : converts cws files (Macromedia Flash, compressed) to fws ones (Macromedia Flash, uncompressed).
 + + fftools_ffescape       : Escapes an input string, adopting the av_get_token() escaping logic.
 + + fftools_ffeval         : A simple expression evalutor.
 + + fftools_ffhash         : Computes a file's digest using libavutil algorithms.
 + + fftools_fourcc2pixfmt  : Shows the relationships between rawvideo pixel formats and FourCC tags.
 + + fftools_graph2dot      : A tool to convert a libavfilter graph to a dot file.
 + + fftools_ismindex       : A tool for creating smooth streaming manifests.
 + + fftools_pktdumper      : Dumps packets as demuxed by libavformat.
 + + fftools_qt-faststart   : Rearranges a Quicktime file to facilitate network streaming.
 + + fftools_sidxindex      : Write an MPD file for fragmented MP4 files with a sidx index at the start of the file.
 + + fftools_trasher        : Writes burts of random data into a file. Great for testing error robustness/resilience/concealment.
 - - flite                  : Adds a text-to-speech filter based on app-accessibility/flite.
 - - fontconfig             : Support for configuring and customizing font access via media-libs/fontconfig
 - - frei0r                 : Enable frei0r wrapping in libavfilter
 - - fribidi                : Enables fribidi support in the drawtext filter.
 - - gcrypt                 : Enables gcrypt support: Needed for rtmp(t)e support if openssl, librtmp or gmp is not used.
 - - gme                    : Enables support for media-libs/game-music-emu for playing various video game music formats.
 - - gmp                    : Add support for dev-libs/gmp (GNU MP library)
 + + gnutls                 : Prefer net-libs/gnutls as SSL/TLS provider (ineffective with USE=-ssl)
 + + gpl                    : Build GPL code. Should be enabled unless you require LGPL binaries.
 - - gsm                    : Add support for the gsm lossy speech compression codec
 - - hardcoded-tables       : Use pre-calculated tables rather than calculating them on the fly. It results in an increase of approximately 15% in the size of libavcodec, the main library impacted by this change. It enables
                              savings in table generation time, done once at codec initialization, since by hardcoding the tables, they do not need to be computed at runtime. However, the savings are often negligible (~100k
                              cycles is a typical number) especially when amortized over the entire encoding/decoding operation. Improvements are being made to the runtime initialization, and so over time, this option will
                              have an impact on fewer and fewer codecs.
 + + iconv                  : Enable support for the iconv character set conversion library
 - - iec61883               : Support for FireWire DV/HDV input device using media-libs/libiec61883.
 - - ieee1394               : Enable FireWire/iLink IEEE1394 support (dv, camera, ...)
 - - jack                   : Add support for the JACK Audio Connection Kit
 - - jpeg2k                 : Support for JPEG 2000, a wavelet-based image compression format
 - - jpegxl                 : Add JPEG XL image support
 - - kvazaar                : Enables media-libs/kvazaar based HEVC encoder.
 - - ladspa                 : Enable the ability to support ladspa plugins
 + + lcms                   : Enable ICC profile support via media-libs/lcms.
 - - libaom                 : Enables media-libs/libaom based AV1 codec support.
 - - libaribb24             : Enables ARIB text and caption decoding via media-libs/aribb24.
 - - libass                 : SRT/SSA/ASS (SubRip / SubStation Alpha) subtitle support
 - - libcaca                : Add support for colored ASCII-art graphics
 - - libdrm                 : Enables x11-libs/libdrm support for better screen grabbing and hardware accelerated codecs.
 - - libilbc                : Enables iLBC de/encoding via media-libs/libilbc.
 - - libplacebo             : Adds flexible GPU-accelerated processing filter based on media-libs/libplacebo.
 - - librtmp                : Enables Real Time Messaging Protocol using librtmp (media-video/rtmpdump) in addition to FFmpeg's native implementation.
 - - libsoxr                : Enables audio resampling through media-libs/soxr.
 - - libtesseract           : Enables the OCR filter via app-text/tesseract.
 - - libv4l                 : Uses media-libs/libv4l for video4linux instead of direct calls. Adds support for more devices via the userspace library.
 - - libxml2                : Uses dev-libs/libxml2 to enable dash demuxing support.
 - - lv2                    : Enables lv2 audio filter wrapper.
 - - lzma                   : Support for LZMA compression algorithm
 - - modplug                : Add libmodplug support for playing SoundTracker-style music files
 + + mp3                    : Add support for reading mp3 files
 + + network                : Enables network streaming support
 - - nvenc                  : Add support for NVIDIA Encoder/Decoder (NVENC/NVDEC) API for hardware accelerated encoding and decoding on NVIDIA cards (requires x11-drivers/nvidia-drivers)
 - - openal                 : Add support for the Open Audio Library
 - - opencl                 : Enable OpenCL support
 + + opengl                 : Add support for OpenGL (3D graphics)
 + + openh264               : Enables H.264 encoding suppoprt via media-libs/openh264.
 - - openssl                : Enables dev-libs/openssl support. Adds support for encrypted network protocols (TLS/HTTPS).
 + + opus                   : Enable Opus audio codec support
 - - oss                    : Add support for OSS (Open Sound System)
 - - pic                    : Force shared libraries to be built as PIC (this is slower)
 + + postproc               : Build and install libpostproc.
 + + pulseaudio             : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
 - - rav1e                  : Enables AV1 encoding support via media-video/rav1e.
 - - rubberband             : Adds time-stretching and pitch-shifting audio filter based on media-libs/rubberband.
 - - samba                  : Add support for SAMBA (Windows File and Printer sharing)
 + + sdl                    : Add support for Simple Direct Layer (media library)
 - - snappy                 : Enable app-arch/snappy support. Required for e.g. Vidvox Hap encoder.
 - - sndio                  : Enable support for the media-sound/sndio backend
 - - speex                  : Add support for the speex audio codec (used for speech)
 - - srt                    : Enable support for Secure Reliable Transport (SRT) via net-libs/srt
 - - ssh                    : Enable SSH/sftp support via net-libs/libssh.
 - - static-libs            : Build static versions of dynamic libraries as well
 + + svg                    : Add support for SVG (Scalable Vector Graphics)
 - - svt-av1                : Enables AV1 encoding support via media-libs/svt-av1.
 - - test                   : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 - - theora                 : Add support for the Theora Video Compression Codec
 + + threads                : Add threads support for various packages. Usually pthreads
 + + truetype               : Add support for FreeType and/or FreeType2 fonts
 - - twolame                : Enables MP2 encoding via media-sound/twolame as an alternative to the internal encoder.
 + + v4l                    : Enable support for video4linux (using linux-headers or userspace libv4l libraries)
 + + vaapi                  : Enable Video Acceleration API for hardware decoding
 - - vdpau                  : Enable the Video Decode and Presentation API for Unix acceleration interface
 - - verify-sig             : Verify upstream signatures on distfiles
 - - vidstab                : Enables video stabilization filter using vid.stab library (media-libs/vidstab).
 + + vorbis                 : Add support for the OggVorbis audio codec
 - - vpx                    : Enables VP8 and VP9 codec support using libvpx: Decoding does not require this to be enabled but libvpx can also be used for decoding; encoding requires this useflag to be enabled though.
 + + vulkan                 : Add support for 3D graphics and computing via the Vulkan cross-platform API
 - - webp                   : Add support for the WebP image format
 + + x264                   : Enable h264 encoding using x264
 - - x265                   : Enables HEVC encoding with media-libs/x265.
 + + xvid                   : Add support for xvid.org's open-source mpeg-4 codec
 - - zeromq                 : Enables net-libs/zeromq support with the zmq/azmq filters.
 - - zimg                   : Enables media-libs/zimg based scale filter.
 + + zlib                   : Add support for zlib compression
 - - zvbi                   : Enables media-libs/zvbi based teletext decoder.


Off course, I can do without hardware acceleration and just run

Code:
wf-recorder -m v4l2 -c rawvideo -f /dev/video2 -t <<< y


But it is damn slow. Don't see what's the problem with vaapi. Did anyone have the same problem?
Back to top
View user's profile Send private message
gorg86
Apprentice
Apprentice


Joined: 20 May 2011
Posts: 299

PostPosted: Wed Nov 29, 2023 8:55 pm    Post subject: Reply with quote

Please post your
Code:
emerge --info
and the output of
Code:
zcat /proc/config.gz | grep -i amdgpu
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum