Codec h264_cuvid is not supported
-
Hi, I'm new in Qt. There's a problem that's been bothering me for days: When I use QMediaPlayer to play mp4 videos, but there is only sound output but no video output.the console reports an error:
Codec h264_cuvid is not supported.
System environment:
System: Debian GNU/Linux 12 (bookworm) Kernal: Linux debian 6.1.0-17-amd64 Qt version: gcc_64 6.6.1
QT 6 uses Gstreamer by default on Linux, but I've already installed it:
trufane@debian:~$ apt list gstreamer* --installed 正在列表... 完成 gstreamer1.0-alsa/stable,stable-security,now 1.22.0-3+deb12u1 amd64 [已安装] gstreamer1.0-gl/stable,stable-security,now 1.22.0-3+deb12u1 amd64 [已安装] gstreamer1.0-gtk3/stable,stable-security,now 1.22.0-5+deb12u1 amd64 [已安装] gstreamer1.0-libav/stable,now 1.22.0-2 amd64 [已安装] gstreamer1.0-libcamera/stable,now 0.0.3-6 amd64 [已安装] gstreamer1.0-packagekit/stable,now 1.2.6-5 amd64 [已安装] gstreamer1.0-pipewire/stable,now 0.3.65-3 amd64 [已安装,自动] gstreamer1.0-plugins-bad/stable-security,now 1.22.0-4+deb12u4 amd64 [已安装] gstreamer1.0-plugins-base/stable,stable-security,now 1.22.0-3+deb12u1 amd64 [已安装] gstreamer1.0-plugins-base/stable,stable-security,now 1.22.0-3+deb12u1 i386 [已安装,自动] gstreamer1.0-plugins-good/stable,stable-security,now 1.22.0-5+deb12u1 amd64 [已安装] gstreamer1.0-plugins-good/stable,stable-security,now 1.22.0-5+deb12u1 i386 [已安装,自动] gstreamer1.0-plugins-ugly/stable,stable-security,now 1.22.0-2+deb12u1 amd64 [已安装] gstreamer1.0-pulseaudio/stable,stable-security,now 1.22.0-5+deb12u1 amd64 [已安装] gstreamer1.0-qt5/stable,stable-security,now 1.22.0-5+deb12u1 amd64 [已安装] gstreamer1.0-qt6/stable,stable-security,now 1.22.0-5+deb12u1 amd64 [已安装] gstreamer1.0-tools/stable,now 1.22.0-2 amd64 [已安装] gstreamer1.0-x/stable,stable-security,now 1.22.0-3+deb12u1 amd64 [已安装] gstreamer1.0-x/stable,stable-security,now 1.22.0-3+deb12u1 i386 [已安装,自动]
My CMakeLists.txt configuration is as follows:
# find_package set(REQUIRED_LIBS Core Gui Widgets Multimedia MultimediaWidgets) #target_link_libraries set(REQUIRED_LIBS_QUALIFIED Qt6::Core Qt6::Gui Qt6::Widgets Qt6::Multimedia Qt6::MultimediaWidgets)
This is normal when I use Qt5 to play mp4.
What causes this and how can I fix it?
Thank you. -