Page 1 of 1

Some H.265 media offline when using GPU accel. decoding

PostPosted: Sat Oct 17, 2020 4:20 am
by philhzss
I'll preface this by saying I know that H.264/H.265 are not editing codecs. I know. However I've been working on the same project for months, and it's always worked fine, this is a new issue.


Specs:
DaVinci Resolve Studio
i7 8700k
RTX 3080 on latest NVIDIA Studio drivers (tried the gaming driver too, no difference)
32GB RAM
Windows 10 Home
Resolve & media files are on an SSD


I'm running into an issue where Resolve will say "Media Offline" for some parts of some H.265 files when the media is clearly not offline. I can double click on the media in timeline, and see that it's there in my media pool, I can right click it there and choose "show file location", and its there. Even more weird, sometimes if I'm playing through a clip, parts of that clip will say "Media offline", and other parts won't, and if I play back the same file multiple times, it's occasionally different parts of the file that are offline...

I've tried exporting my project and even the final exported version has scenes saying "Media Offline" in the final Mp4.

This is a new issue, im not sure since when because I haven't used Resolve for almost a month but I used to be able to playback my files without problems. The only change I've done to my computer since then is upgraded my GPU to a 3080 but I haven't read of others having this issue on the 3080 so I don't think it's the card?


The only workaround I've found is to go to Resolve preferences and uncheck "Decode H.264/H.265 using hardware acceleration", this makes all my media-offline messages disappear and the export works. But the main reason I purchased the studio version was to get this feature... and it used to work. Also, without it, the program is extremely slow.

Does anyone know why this is happening? Strangely, many of my H.265 files actually work fine. But then many of them also don't. They're all in the same folder, on the same drive. Creating optimized media usually works but obviously I don't want to be exporting with optimized media.

I tried to purchase the 1$ HEVC codec thing on the Microsoft Store a few minutes ago, but that didn't change anything sadly.

Anyway, for now I'll keep GPU accelerated decoding off as its the only way to not have corrupted exported media, but I'm wondering if anyone has any advice. I'd really really like to keep GPU accelerated decoding enabled... and I don't understand why only certain random parts of certain random H.265 files are affected.

Thanks!!

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sat Oct 17, 2020 5:23 am
by Peter Chamberlain
Likely GPU driver.
List specific details of which u have tried.

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 3:54 am
by philhzss
Thanks for the reply,

I tried both versions (studio and gaming) of current driver (currently Studio is 456.38).
I tried:
    -Selecting OpenCL instead of CUDA
    -GPU Scopes on and off
    -Restart computer, restart Resolve multiple times
    -Create a blank project with the same H.265 media
    -Deleting all optimized media, trying with and without optimized media
    -Deleting fusion render cache, turning it off
    -Exporting the project (exported media has same issue)

I might have done more things but those are the main ones. Oddly enough, if I use the workaround (disabling GPU decoding), and launch the app, it's slow to use as I said but when I export, it uses the NVIDIA GPU to export/encode and I get no issues.

Also weird, I've noticed that the files that don't have this issue, just don't have this issue at all. I can scrub all over them all day without issue. Yet the other files... scrubbing sometimes work, sometimes it just plays the audio and says video only... Then sometimes the thumbnail says offline but it does play. Its weird, the files are all from the same source, same resolution, same bitrate and framerate.... same directory.
Some work and some don't, I am trying to see what those that don't work have in common but so far I haven't figured it out.


Edit: I was going to see if I can downgrade my GPU drivers but it seems I'm on the first Studio release that supports the RTX 3000 series. Perhaps this is just a driver bug and I need to wait. It's still really strange that it only affects certain files though

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 3:40 pm
by Jim Simon
Thinking back, did you copy the entire media card to your working drive, and then leave it untouched?

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 5:12 pm
by philhzss
Jim Simon wrote:Thinking back, did you copy the entire media card to your working drive, and then leave it untouched?


Sorry I'm not exactly sure what you mean but in this case for these files they are screen captured from OBS and then converted with handbrake. The strange thing is like I said, some of them are fine and some aren't, but they are all converted with the exact same settings in Handbrake (and recorded the same way with OBS).

Also, since we talked about how this is probably a driver issue, I just tried playing several 8k 60FPS clips at once using VLC, using GPU decoding. My GPU "video decode" was at 100% when I had 2-3 of those 8k clips playing at once, but everything worked fine... (of course if I opened more than 3 instances I got choppiness but this was overloading my GPU's decoding chip.

So, it may be a driver issue but so far it only affects Resolve


Also, just noticed that while playing back my files in Resolve and monitoring the "video decode" graph on task manager GPU page, it'll drop to 0% when Resolve says Media Offline so it just.. stops trying?? I tried relinking the files again, one at a time, most times it changes nothing, but sometimes I can get the thumbnail to properly show up, then it plays, and then randomly the same file says media offline again (and plays back audio only).

Once again switching to CPU only decoding works at all times but everything becomes slow

Thank you!

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 5:50 pm
by Andrew Kolakowski
Post mediainfo grabs of those which don't work. They may be 4:2:2 and won't GPU accelerate for sure.
If you turn off GPU decoding then they should work (assuming you are in Studio version), but will hit CPU hard.

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 7:33 pm
by philhzss
Ok sure thank you, here's one of the files which is sometimes okay for some parts of it and sometimes bugs out.

Also, I do see the video encoding graph spike up to ~50% when the video works in Resolve, but it randomly jumps to 0 while Resolve says "media offline" at the same time. So I think the GPU decoding is working (for part of the video), but then stops and restarts randomly..?? And yes, using CPU decoding (I am in the Studio version) does work but it's very slow like you say

Here's detailed info from Media Info on the file. I think I see 4:2:0 but I've never paid any attention to that so I wouldn't even be sure how to change it. I assume it would be a Handbrake setting. But either way, some clips work and they're all exported the same??

https://pastebin.com/Yx1rCZ5B

Thank you for your time!

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 8:49 pm
by Jim Simon
philhzss wrote:they are screen captured from OBS


I always recommend hardware recorders for screen capture you intend to edit. They typically offer editing friendly options like DNx and ProRes, whereas software normally doesn't.

https://www.blackmagicdesign.com/produc ... ideoassist

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Oct 18, 2020 9:22 pm
by philhzss
Thank you, I might look into that.. and I know H.265 is a bad codec for editing. I normally use optimized media in Resolve because I was too lazy to manually transcode into another format.

And also.. this entire video project I'm working on is a little thing for my family, so I didn't bother investing too much time (and disk space) into figuring out the best way to do it all, it's becoming a bit more than a small hobby for me so I might. But for now I was doing it this way.

But even though I know this isn't the way to do it (with these codecs) but it worked fine when I used to use Adobe Premiere last year (I switched about 10 months ago). And it worked fine with Resolve actually, until about a month ago! This is a new issue

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Mon Oct 19, 2020 1:46 am
by Uli Plank
Use H.264 and about 50% more data rate and you should be fine.

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Mon Oct 19, 2020 4:15 am
by philhzss
I'll definitely start using H.264 if this issue doesn't go away, but does anyone know why using these exact same H.265 files has worked fine for months, but suddenly doesn't?? Many of them have actually been in my timeline since April, and they worked fine... I haven't changed anything in my project and they do this now.

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Mon Oct 19, 2020 5:14 am
by Uli Plank
Are you sure Windows didn't do anything behind your back?

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Mon Oct 19, 2020 8:01 pm
by philhzss
I suppose I can't be completely sure.. perhaps I'll try to completely reinstall my GPU drivers again or something, I'm not sure what else to try

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Tue Oct 20, 2020 6:51 pm
by philhzss
Quick update, the latest NVIDIA studio drivers that came out today with a clean install did not solve the issue :(

Annd another update, more testing, some files ALWAYS refuse to export, and the next (or previous) clip in the export works fine. They were both encoded on the same day with the same settings in Handbrake. Using another other media playing app with GPU decoding and scrubbing all over the place gives me no errors at all. Scrubbing all over the same file in Resolve and I get "Media Offline". If I replay it though, it sometimes works...

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Fri Oct 23, 2020 6:28 pm
by steve_martin_usa
I think I'm having the exact same issue. ALL of the MP4s in my project show up as red icons that say "media offline". NONE of them play in Resolve. The files are 4k, 59.94 fps, in h265/hvec, from DJI Mavic Air 2. I’ve tried the relinking process, but no luck. 29.97 fps videos fail as well. 2.7k MP4s from my DJI Osmo Pocket in h264 all seem to work fine.

I’m using a new Acer ConceptD 7 laptop with an NVIDIA 2070 graphics card, and a RAID 0 disk setup.

I'm getting the problem using NVIDIA Studio Driver 456.71 released 10/20/2020, and the previous version. I didn't get this problem on my XPS 9500 with an RTX 1650 video card.

Uli Plank: are you suggesting we transcode our h265 video to h264 before trying to use them in Resolve, and that should be a standard practice for everyone?

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sat Oct 24, 2020 1:57 am
by philhzss
steve_martin_usa wrote:I think I'm having the exact same issue. ALL of the MP4s in my project show up as red icons that say "media offline". NONE of them play in Resolve. The files are 4k, 59.94 fps, in h265/hvec, from DJI Mavic Air 2. I’ve tried the relinking process, but no luck. 29.97 fps videos fail as well. 2.7k MP4s from my DJI Osmo Pocket in h264 all seem to work fine.

I’m using a new Acer ConceptD 7 laptop with an NVIDIA 2070 graphics card, and a RAID 0 disk setup.

I'm getting the problem using NVIDIA Studio Driver 456.71 released 10/20/2020, and the previous version. I didn't get this problem on my XPS 9500 with an RTX 1650 video card.

Uli Plank: are you suggesting we transcode our h265 video to h264 before trying to use them in Resolve, and that should be a standard practice for everyone?



Do you get this issue only on GPU decoding like me? As in, if you turn off GPU decoding in the Resolve preferences and relaunch, everything is fine with CPU decoding?

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sat Oct 24, 2020 2:28 am
by Uli Plank
[quote="steve_martin_usa"
Uli Plank: are you suggesting we transcode our h265 video to h264 before trying to use them in Resolve, and that should be a standard practice for everyone?[/quote]

Not at all, that would be degrading quality.
1. If your machine is not up to it, I suggest transcoding to a mezzanine codec, like ProRes, Cineform or DNxHR.
2. If you can't read some formats because you are on the free version under Windows, I also suggest such transcoding.

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sat Oct 24, 2020 3:48 am
by philhzss
Yeah, transcoding to something like DNxHR is probably what I should do too, but since H.265 + GPU rendering was fast enough for me before I hit this new bug, I wasn't doing it.. I'll probably start doing that too. I wonder if I can get away with just doing it through optimized media (on CPU).

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sat Oct 24, 2020 4:28 pm
by philhzss
If it helps anyone, I just created diagnostics logs from the Help menu in Resolve, and this is what it's filled with, there are a ton of entries similar to this:

Code: Select all
[0x000012d8] | IO | ERROR | 2020-10-24 12:20:37,151 | Nvidia codec fails to decode output after reaching maximum decode surfaces
[0x000012d8] | IO | ERROR | 2020-10-24 12:20:37,152 | 3rd Party Decode Err(Failed to decode the video frame.)
[0x000012d8] | IO | ERROR | 2020-10-24 12:20:37,152 | Failed to decode clip <C:\Users\Phil\Google Drive\Video Games\Video Game Screen Capture\Half-Life Alyx\Carl HLA Playthrough\HLA Carl 132 2020-09-03 20-18-00.mp4>, track 0, frame 1331: Failed to decode the video frame.


Not sure exactly what "Nvidia codec fails to decode output after reaching maximum decode surfaces" but maybe this'll help diagnose the issue! Will continue my research

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Tue Nov 10, 2020 10:57 pm
by steve_martin_usa
Who knows what that means...! It's weird though because every other program on my Windows 10 laptop can play the files ok.

Re: Some H.265 media offline when using GPU accel. decoding

PostPosted: Sun Dec 20, 2020 8:18 am
by philhzss
Just a quick update, the last few betas of DaVinci Resolve Studio 17 (Betas 3-4-5 I believe) have completely fixed this issue for me (I'm the OP). Not sure what you guys did or if its a combination of you and NVIDIA drivers but it's much better now!!