我曾尝试在 Ubuntu 20.04 笔记本电脑上播放 WEBM 视频,但播放不流畅。使用 VLC 和 MPV,帧丢失,但视频仍然冻结并且与音频不匹配。Totem 播放视频很好,但 CPU 利用率达到 100%。
如果我将视频重新编码为 matroska(mkv),视频播放流畅,CPU 利用率约为 10%。WEBM
视频在相同硬件上的 Windows(双启动)上播放良好,没有丢帧。Ubuntu
-restricted-extras 已安装。
视频属性:
尺寸;2048 × 1080
编解码器;VP9
帧率;23.98 帧/秒
比特率;N/A
声音的;
编解码器;Opus
通道;立体声
采样率;48000 Hz
比特率;N/A
以下是终端的一些输出:
MPV 输出
regern@regern-Inspiron-15-3552:~$ mpv ./video1.webm
(+) Video --vid=1 (*) (vp9 2048x1080 23.976fps)
(+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vaapi] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
[ffmpeg/video] vp9: No support for codec vp9 profile 0.
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 2048x1080 yuv420p
AV: 00:00:03 / 00:04:34 (1%) A-V: 0.488 Dropped: 3
Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field).
(Paused) AV: 00:00:13 / 00:04:34 (4%) A-V: 22.512 Dropped: 92
VLC 输出
regern@regern-Inspiron-15-3552:~$ vlc ./video1.webm
VLC media player 3.0.9.2 Vetinari (revision 3.0.9.2-0-gd4c1aefe4d)
[0000562eaa0f15b0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
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
[00007f9788065b00] vaapi generic error: profile(19) is not supported
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f9794c04e50] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
我的电脑 (neofetch)
regern@regern-Inspiron-15-3552:~$ neofetch
.-/+oossssoo+/-. regern@regern-Inspiron-15-3552
`:+ssssssssssssssssss+:` ------------------------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 20.04.1 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: Inspiron 15-3552 4.4.0
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 5.4.0-52-generic
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 44 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 2276 (dpkg), 12 (snap)
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 5.0.17
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Resolution: 1366x768
ossyNMMMNyMMhsssssssssssssshmmmhssssssso DE: GNOME
ossyNMMMNyMMhsssssssssssssshmmmhssssssso WM: Mutter
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ WM Theme: farajas-light+orange
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Theme: farajas-light+orange [GTK2/3]
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/ Icons: farajas-icons-1.4 .1 [GTK2/3]
+sssssssssdmydMMMMMMMMddddyssssssss+ Terminal: gnome-terminal
/ssssssssssshdmNNNNmyNMMMMhssssss/ CPU: Intel Celeron N3060 (2) @ 2.480GHz
.ossssssssssssssssssdMMMNysssso. GPU: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx
-+sssssssssssssssssyyyssss+- Memory: 1821MiB / 3847MiB
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.