mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.24k stars 2.9k forks source link

Can't allocated context buffer with vaapi hardware decoding. #6648

Closed laichiaheng closed 5 years ago

laichiaheng commented 5 years ago

mpv version and platform

Latest build with mpv-build-git in AUR OS: Manjaro Testing Branch GPU: AMD RX460 2GB

Reproduction steps

Play a 4K HDR HEVC 10bit movie.

Expected behavior

Play it as expected.

Actual behavior

It doesn't play some 4K HDR HEVC 10bit movies with AMD RX460 2G via NFS on my HTPC, but it gives me an error message. However, I can play them without problem on my hosting PC with AMD RX580 8G.

Log file

Make a log file made with -v or --log-file=output.txt, paste it to https://0x0.st/ or a similar site, and replace this text with a link to it. (I will upload it as soon as possible if I am able to use the HTPC.)

It is a part of the error message in the terminal:

Cannot load libcuda.so.1
amdgpu: Failed to allocate a buffer:
amdgpu:    size      : 3221311488 bytes
amdgpu:    alignment : 4096 bytes
amdgpu:    domains   : 4
amdgpu: Failed to allocate a buffer:
amdgpu:    size      : 3221311488 bytes
amdgpu:    alignment : 4096 bytes
amdgpu:    domains   : 4
EE ../mesa-19.0.2/src/gallium/drivers/radeon/radeon_uvd.c:1147 ruvd_end_frame UVD - Can't allocated context buffer.

Sample files

Sample files needed to reproduce this issue can be uploaded to https://0x0.st/ or similar sites. (Only needed if the issue cannot be reproduced without it.) Do not use garbage like "cloud storage", especially not Google Drive.

zc62 commented 5 years ago

3221311488 bytes = 3.2 GB > 2 GB. Not even a bug. Simply because RX460 does not have enough VRAM.

laichiaheng commented 5 years ago

@zc62 How much VRAM is needed for most of the 4K HDR videos? I didn't expect that it needs so much VRAM to play videos. It says it's HDR ready on the box.

zc62 commented 5 years ago

If you got such kind of errors, then it is not enough, isn't this clear?

I don't care what's on the box. Just blame vaapi for consuming so much VRAM, or sue AMD for cheating you then. Anyway, this is not a mpv issue. Next time when you have such kind of questions, ask on the IRC channel first. https://mpv.io/community/

laichiaheng commented 5 years ago

@zc62 I have tried, but I can't. 2019-04-21 11-52-00 的螢幕擷圖