Index | Thread | Search

From:
Rafael Sadowski <rafael@sizeofvoid.org>
Subject:
Re: Enable VA-API in x11/qt6/qtmultimedia
To:
ports <ports@openbsd.org>
Date:
Sun, 28 Jul 2024 22:06:58 +0200

Download raw body.

Thread
Long story short: I'll wait

Now that I have a VA-API digikam version, I can test it.
We enable ffmpeg and gstreamer in our qt6multimedia.

It looks like gstreamer is the default. The Qt documentation says
"FFmpeg as the default backend"[1] but also assumes 6.X and not our 4.X

However, this gives me the message that our gstreamer does not support
vaapi:

qt.multimedia.player: Warning: No decoder available for type
'video/x-h264, stream-format=(string)avc, alignment=(string)au,
level=(string)4.2, profile=(string)high,
codec_data=(buffer)0164802affe1000b6764802aacb403c0113f2a01000468ee0d8b,
width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1,
colorimetry=(string)bt709, framerate=(fraction)0/1,
coded-picture-structure=(string)frame, chroma-format=(string)4:2:0,
bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true'.
qt.multimedia.player: Warning: No decoder available for type
'audio/mpeg, mpegversion=(int)4, framed=(boolean)true,
stream-format=(string)raw, level=(string)2, base-profile=(string)lc,
profile=(string)lc, codec_data=(buffer)1190, rate=(int)48000,
channels=(int)2'.

We can force ffmpeg with QT_MEDIA_BACKEND=ffmpeg. It works but from my
point of view our ffmpeg does not work properly.

For example:

[h264 @ 0x295678a7000] get_buffer() failed
[h264 @ 0x295678a7000] thread_get_buffer() failed
[h264 @ 0x295678a7000] decode_slice_header error
[h264 @ 0x295678a7000] no frame!
[h264 @ 0x2956ffd3800] get_buffer() failed
[h264 @ 0x2956ffd3800] thread_get_buffer() failed
[h264 @ 0x2956ffd3800] decode_slice_header error
[h264 @ 0x2956ffd3800] no frame!
[h264 @ 0x2956ffb0800] get_buffer() failed
[h264 @ 0x2956ffb0800] thread_get_buffer() failed
[h264 @ 0x2956ffb0800] decode_slice_header error
[h264 @ 0x2956ffb0800] no frame!
[h264 @ 0x29482c4b000] get_buffer() failed
[h264 @ 0x29482c4b000] thread_get_buffer() failed
[h264 @ 0x29482c4b000] decode_slice_header error
[h264 @ 0x29482c4b000] no frame

..


[1]: https://doc.qt.io/qt-6/qtmultimedia-index.html

On Sun Jul 28, 2024 at 09:59:49AM GMT, Rafael Sadowski wrote:
> OK to enable VA-API support in qt6multimedia?
> 
> I've been using it for a few weeks and haven't noticed any problems so
> far.
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/x11/qt6/qtmultimedia/Makefile,v
> diff -u -p -r1.13 Makefile
> --- Makefile	17 Jul 2024 07:30:57 -0000	1.13
> +++ Makefile	28 Jul 2024 07:58:12 -0000
> @@ -1,7 +1,7 @@
>  QT6NAME =	QtMultimedia
>  COMMENT =	Qt6 multimedia components
>  PKGSPEC =	qt6-qtmultimedia-${QT6_PKGSPEC}
> -REVISION =	0
> +REVISION =	1
>  
>  SHARED_LIBS +=  Qt6Multimedia             6.0 # 6.6
>  SHARED_LIBS +=  Qt6MultimediaQuick        4.0 # 6.6
> @@ -16,7 +16,7 @@ WANTLIB += Xrandr avcodec avformat avuti
>  WANTLIB += gstallocators-1.0 gstapp-1.0 gstaudio-1.0 gstbase-1.0
>  WANTLIB += gstgl-1.0 gstpbutils-1.0 gstphotography-1.0 gstreamer-1.0
>  WANTLIB += gstvideo-1.0 gthread-2.0 intl m pulse swresample swscale
> -WANTLIB += xkbcommon
> +WANTLIB += va va-drm xkbcommon
>  
>  BUILD_DEPENDS =	graphics/vulkan-loader \
>  		x11/qt6/qtshadertools \
> @@ -35,8 +35,7 @@ LIB_DEPENDS =	audio/pulseaudio \
>  		x11/xkbcommon
>  
>  CONFIGURE_ARGS =	-DQT_FEATURE_ffmpeg=ON \
> -			-DQT_FEATURE_gstreamer_1_0=ON \
> -			-DQT_FEATURE_vaapi=OFF
> +			-DQT_FEATURE_gstreamer_1_0=ON
>  
>  MODCMAKE_LDFLAGS +=	-L${X11BASE}/lib
>  
>