Score:0

How can I get 8K H265 MP4 files to play better on VLC?

al flag

My Samsung Galaxy S21 Ultra records videos in 8K (24 fps), and I'd like to be able to play those videos in VLC using Ubuntu 22.04. 4K videos play OK, but the 8K ones are very choppy and distorted. Is there a way to improve their performance? They play fine in VLC on Windows 10, so I figure there must be a way to get the same (or better) output within Ubuntu.

I have an RTX 3080 mobile processor with 16 GB of VRAM, an i7 11th-gen 8-core CPU, and 64 GB of RAM, so I don't think my system specs are the issue. I'm also playing the videos off an SSD. The problem still occurred when I launched VLC in dedicated graphics mode, and based on the output of watch nvidia-smi, the dedicated GPU does appear to be powering the video output.

Here is a copy of the log that I received when I opened VLC in Terminal and tried to play back a video:

VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
[0000555cdc533580] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0000555cdc5d3450] main playlist: playlist is empty
[00007fb3d40029a0] gl gl: Initialized libplacebo v4.192.1 (API v192)
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nvidia_drv_video.so
libva info: Found init function __vaDriverInit_1_0
libva info: va_openDriver() returns 0
[00007fb3d40029a0] glconv_vaapi_x11 gl error: vaCreateSurfaces: attribute not supported
[00007fb3f0000d80] main video output error: video output creation failed
[00007fb3e401ee90] main decoder error: failed to create video output
[00007fb3d44a41f0] gl gl: Initialized libplacebo v4.192.1 (API v192)
[00007fb3e401ee90] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library  525.89.02  Wed Feb  1 23:08:15 UTC 2023 for hardware decoding
[hevc @ 0x7fb3e403bf00] Failed setup for format vdpau: hwaccel initialisation returned error.
[00007fb3e401ee90] avcodec decoder error: existing hardware acceleration cannot be reused
[00007fb3d44a41f0] gl gl: Initialized libplacebo v4.192.1 (API v192)
[00007fb3d44a41f0] gl gl: Initialized libplacebo v4.192.1 (API v192)
[hevc @ 0x7fb3e4126500] Could not find ref with POC 4
[hevc @ 0x7fb3e4136e00] Could not find ref with POC 6
[hevc @ 0x7fb3e403bf00] Could not find ref with POC 8
[hevc @ 0x7fb3e40b2d80] Could not find ref with POC 10
[hevc @ 0x7fb3e40c3380] Could not find ref with POC 12
[hevc @ 0x7fb3e40d3a00] Could not find ref with POC 14
[hevc @ 0x7fb3e40e40c0] Could not find ref with POC 16
[hevc @ 0x7fb3e40f4a00] Could not find ref with POC 18
[hevc @ 0x7fb3e4105300] Could not find ref with POC 20
[hevc @ 0x7fb3e4115c00] Could not find ref with POC 22
[hevc @ 0x7fb3e4126500] Could not find ref with POC 0
[hevc @ 0x7fb3e4136e00] Could not find ref with POC 2
[hevc @ 0x7fb3e403bf00] Could not find ref with POC 4

(There were many similar 'Could not find ref' videos. Since my video has 24 frames per second, I'm guessing that the numbers refer to individual frames.)

Update: Interestingly, on a separate Ubuntu 22.04 installation on another drive, the videos played fine in VLC after I first opened one video in the default Ubuntu Videos app. I tried this approach in my main Ubuntu 22.04 installation, but it didn't work.

My separate Ubuntu installation uses intel graphics by default, so it's possible that the issue is with my NVIDIA setup on Ubuntu rather than with VLC. However, I found that switching my default graphics card back to Intel prevented my display from appearing on my second monitor, so I would like to find a solution that lets me play VLC videos using the NVIDIA graphics card (or lets me selectively run VLC within Intel if necessary).

Additional info:

When trying to play 8K videos using Ubuntu's Videos app, the frame rate was fine but the dimensions were way off: the video was much taller than it was wider (even though the original videos were in 16:9 resolution).

andrew.46 avatar
in flag
It is a long chance but try SMPlayer with an MPV backend, this may give you better playback. Certainly does on my own system...
KBurchfiel avatar
al flag
Thanks for the recommendation--I installed it, but the playback frame rate is well below 24 fps. Worth a try though.
Score:0
ao flag

You should retry mpv with smplayer but compile it to use NVidia acceleration

git clone https://github.com/mpv-player/mpv-build.git

and put the options

mpv-build]$ cat ffmpeg_options --enable-libx264 --enable-libx265 --enable-nvenc --enable-nvdec --enable-ffnvcodec --enable-vdpau --enable-cuvid --enable-cuda --enable-libaom --enable-libvpx --enable-libfdk-aac --enable-nonfree --enable-libbluray --enable-libdrm --enable-libxvid --enable-vaapi --enable-libass

KBurchfiel avatar
al flag
I cloned the repository, entered into the new mpv-build directory, and then tried running the cat commands. However, I received the message 'cat: unrecognized option '--enable-libx264'. The videos still weren't playing correctly in smplayer after I ran these commands. I also tried following the steps in the readme within the mpv-build clone, but running sudo ./install produced the error: scripts/mpv-install: 8: meson: not found.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.