HEVC x265 10 位无法在 Ubuntu 20.04 上播放

HEVC x265 10 位无法在 Ubuntu 20.04 上播放

我知道在这个平台上已经有无数次类似的问题被问到了,但似乎都没有帮助到我。有一段时间,我可以在我的系统上使用 mpv 媒体播放器播放 x265 10 位视频,但在更新到 Ubuntu 20.04 后,视频又恢复到了以前的播放状态,延迟非常严重,字幕/视频不同步,有时视频甚至不会显示而音频继续播放。我以前也遇到过这些问题,但在获得软件包后gstreamer1.0-libde265,问题得到了解决,至少在 mpv 上是这样。所有 x265 视频播放都很流畅。但自从更新以来,我再也无法在 mpv 上流畅播放 x265 视频了,事实上在任何媒体播放器上都无法流畅播放。不过在 Windows 上我仍然可以流畅播放它们。我猜是因为我用来添加上述包的 ppa 在升级到 20.04 时被禁用了。

如果有人需要信息,这里是 vainfo 的输出:

libva info: VA-API version 1.7.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_7
libva error: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_1_6
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.7 (libva 2.6.0)
vainfo: Driver version: Intel i965 driver for Intel(R) CherryView - 2.4.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointEncSlice
      VAProfileH264StereoHigh         : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointEncSlice
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD

以下是 lscpu 的输出:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   36 bits physical, 48 bits virtual
CPU(s):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           76
Model name:                      Intel(R) Celeron(R) CPU  N3060  @ 1.60GHz
Stepping:                        4
CPU MHz:                         1968.194
CPU max MHz:                     2480.0000
CPU min MHz:                     480.0000
BogoMIPS:                        3200.00
Virtualization:                  VT-x
L1d cache:                       48 KiB
L1i cache:                       64 KiB
L2 cache:                        2 MiB
NUMA node0 CPU(s):               0,1
Vulnerability Itlb multihit:     Not affected
Vulnerability L1tf:              Not affected
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT disabled
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Spec store bypass: Not affected
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user
                                  pointer sanitization
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB condit
                                 ional, IBRS_FW, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtr
                                 r pge mca cmov pat pse36 clflush dts acpi mmx f
                                 xsr sse sse2 ss ht tm pbe syscall nx rdtscp lm 
                                 constant_tsc arch_perfmon pebs bts rep_good nop
                                 l xtopology tsc_reliable nonstop_tsc cpuid aper
                                 fmperf tsc_known_freq pni pclmulqdq dtes64 moni
                                 tor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse
                                 4_1 sse4_2 movbe popcnt tsc_deadline_timer aes 
                                 rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb 
                                 stibp tpr_shadow vnmi flexpriority ept vpid tsc
                                 _adjust smep erms dtherm ida arat md_clear

PS:抱歉,我发了这么多牢骚,我是个菜鸟,所以如果能给我一个低级的解释就更好了。

答案1

我在新安装的 Ubuntu 20.04 上遇到了类似的问题,我无法播放 x265 编码的视频(并且没有生成视频缩略图;我只会得到一个相当通用的缩略图,如下所示:通用缩略图

我通过启用受限格式使用命令sudo apt install ubuntu-restricted-extras

答案2

我通过安装错误报告底部提到的缺失驱动程序来改进https://bugs.launchpad.net/ubuntu/+source/libva-utils/+bug/1890815

使用 18.04 LTS 中的软件包进行修复,如下所示:

cd ~/Downloads
wget -c http://archive.ubuntu.com/ubuntu/pool/universe/v/vdpau-video/vdpau-va-driver_0.7.4-6ubuntu1_amd64.deb
sudo apt-get install ./vdpau-va-driver_0.7.4-6ubuntu1_amd64.deb

相关内容