Page 1 of 1

Video Freezes / Glitches [avcodec error: hardware acceleration picture allocation failed]

Posted: 03 Aug 2018 18:26
by VideoklipBG
When seeking rapidly through a long video there are no issues. But in a certain situations the picture completely freezes for about 5 seconds, scrambling and glitches occur for another 5-10 seconds, then the video continues to play fine.
I did some research after I noticed this and found a few very old bugs that have been marked as fixed back in 2015-2016. I couldn't find any recent suggestions or fixes about similar issues.

This doesn't happen randomly, though only in a certain situations. I can reproduce it almost every time:

1. Seek forward through a video
2. Quickly click pause (or hit space for convenience)
3. Immediately go a few seconds back, then unpause (resume)

- The video becomes completely frozen for about 5 seconds, then random colors / pixelation / scramble occurs and after a few more seconds continues to play fine. (The audio isn't affected at all when this issue occurs)

An error pops up in "Messages":

Code: Select all

[avcodec error: hardware acceleration picture allocation failed]

Also when the video is frozen and the glitches occur, there are a lot of errors for skipping frames:

Code: Select all

...avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?) avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?) avcodec error: more than 5 seconds of late video -> dropping frame (computer too slow ?)...

Image
Image
Image
Image


The game videos in the screenshots above are just examples. They were recorded / rendered with completely different softwares, some of them a long time ago.
This happens with many containers, formats, codecs but mainly with mp4 H.264 / H.265 HEVC

I have tested a lot of settings / combinations and found that this issue is related to the Hardware Acceleration (Decoding). When using Software Decoding (CPU) the freezes / glitches don't occur, but then the playback isn't very smooth.
It's not worth it to manually disable HW Decoding on a high-end system, just to solve this weird issue...

Messages (Error Verbosity): https://hastebin.com/xoboluzone
Messages (Debug Verbosity): https://hastebin.com/ebocimoluk
Full Debug Log: https://hastebin.com/setazubone

PC Specs:

CPU: Intel Core i7 6700K 4.00GHz
GPU: NVIDIA GeForce GTX 1070 (MSI Gaming X 8GB)
RAM: 2 x 8GB DDR4 2666MHz
SSD: Samsung PM961 PCI-E M.2 256GB (2800 MB/s Read, 1100 MB/s Write)
HDDs: 1 x 1TB 7200 RPM, 64MB Cache, 1 x 2TB 7200 RPM, 64MB Cache

Other:

Windows 10 Pro x64, Version 1803, Build 17134.48
VLC 3.0.3 x64

I really hope that there will be a solution to this problem. I will provide additional information if needed, thanks in advance!

Re: Video Freezes / Glitches [avcodec error: hardware acceleration picture allocation failed]

Posted: 03 Aug 2018 19:34
by Jean-Baptiste Kempf
Can you share logs in D3D11 ?

Re: Video Freezes / Glitches [avcodec error: hardware acceleration picture allocation failed]

Posted: 03 Aug 2018 20:31
by VideoklipBG
Here's the log using D3D11: https://hastebin.com/okufimicer

Re: Video Freezes / Glitches [avcodec error: hardware acceleration picture allocation failed]

Posted: 22 Dec 2023 11:15
by YeetDabMcFapDab
I have the EXACT same problem

CPU: AMD Ryzen 9 7945HX with Radeon Graphics, 2501 Mhz, 16 Core(s), 32 Logical Processor(s)
GPU: NVIDIA GeForce RTX 4070 Laptop GPU
RAM: 2 x 16GB
SSD: SAMSUNG MZVL2512HDJD-00BL2 512 GB
Windows 11 Home x64, Version 22H2 Build 22621.2861
VLC 3.0.20 x64

https://pastebin.com/40tbHhXY

happens with any hardware-accelerated decoding and any video output