obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
58.84k stars 7.84k forks source link

Decoding any recording in DaVinci Resolve results in Media Offline, video only, outputs in Advanced Mode #9477

Closed RaienryuuNoNatsu closed 1 year ago

RaienryuuNoNatsu commented 1 year ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

29.1.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/18sTFTymtyUuoLKg

OBS Studio Crash Log URL

No response

Expected Behavior

When recording in Advanced Mode, I would expect that just writing the preset and rate control in the custom settings would output a playable file in DaVinci Resolve, the same way it does in Simple Mode.

Current Behavior

Any type of recording within the Advanced Mode tab results in Media Offline outputs, spacing from a few second after a scene change for lossy encoding to a fully unusable file for lossless videos.

Steps to Reproduce

For any test but the lossless, these are the Advanced tab settings I used for any type of testing. In case someone is wondering, I have the range set to full in the NVidia Control Panel. image

Specifically for the lossless, these are the couple changes. image

In Simple Mode, we tested Indistiguishable Quality and High Quality, while the lossless is pointless, because Resolve didn't even bother reading UTVideo. image

In Advanced Mode, we tested the slowest and fastest presets, to first establish the extreme cases, but were greeted by issues on both ends. So, the way to reproduce this is to simply change Preset first to P7, and then to P1. Had P1 worked, we would've tried going through each Preset to see where it breaks, leading me to think it's a very specific setting in these presets that better works for compression, but causes issues at decoding level. Very likely how Profile Levels matter when deciding Referenced Frame Numbers based on resolution, as per H264 specifications. Max B-Frames is left to 0, because I'd imagine the Preset decides that, but I'm honestly not positive about which one of these settings takes priority. Rate Control mode (except for lossless) should not matter here. image image

Specifically for the lossless, this is what we have. image

NOTE: Game Capture or Window Capture, it makes no difference whatsoever in the final result.

Anything else we should know?

This issue has been confirmed by myself and a friend of mine, using two different configurations.

My build OS: Windows 10 Pro 22H2 CPU: Intel i7 8700K GPU: NVidia RTX 2070 (Driver version 536.23) Recorded on SSD, using OBS 29.1.3

My friend's build OS: Windows 11 Pro 22H2 CPU: Will update later when known GPU: NVidia RTX 3080 (Driver version: Will update later when known) Recorded on NVMe SSD, using OBS 29.1.3

Both cases used the very same settings, plus one HEVC HDR case on his build that I tried to decode after installing the HEVC extension (required in Resolve to play H265 videos). In this specific case, my friend was playing the PC version of Cyberpunk 2077. There was also a case, before realizing UTVideo doesn't play in Resolve, where we recorded such lossless, that was then transcoded to a Medium H264 preset. This case worked, but was discarded it wasn't a lossless file anymore. Just worth pointing out.

NOTE: Tests have been done on the stable version 29.1.3 for the past couple days, while the screenshots from today are posted after using the new Beta version.

Now that all the details have been explained, I'm gonna leave behind examples of what works and what not. Also, while I'm aware this could be a bug on Resolve's side of things, I don't understand why this happens specifically when moving into the custom settings. Thus why I decided to ask here first, and in case link this thread over at Blackmagic Design if at all unrelated to OBS. Furthermore, I'm gonna test the very same clips in the Vapoursynth framework to prove everything works properly.

NOTE: I'm writing this and doing tests at the same time for the sake of screenshots. What happens from here on out may differ from previous statements. For the sake of researching this, I would use the stable 29.1.3 version of OBS.

So, the very first test is going to be Indistiguishable Quality from Simple Mode. This one doesn't need a comparison with Vapoursynth, because it works. The timeline doesn't display any "Media Offline" frame at all. It's worth noting that in Simple Mode, I always lose frames due to Encoding Lag. I suspect it could be relevant. image

The next sample is High Quality, which once again doesn't need a Vapoursynth comparison. image

The next one is Advanced Mode, where we select the Slowest Preset. I'm surprised to see that, for the first time, this clip actually works in Resolve. In OBS 29.1.3, this would produce the Media Offline frames on scene changes, or when a game has multiple framerates behaviours. I did read about this Beta ditching FFMPEG versions prior to 4.4, which might be what did the trick for this one. Still worth nothing that, much like Simple Mode, this one causes Encoding Lag, which could be relevant. image

Next is going to be the Fastest Preset, but since the Slowest one worked, obviously this one was fine as well based on prior assumptions. Also worth nothing, this one DOES NOT cause Encoding Lag. image

So, at this point, I guess most of the lossy problems have been fixed simply by updating OBS to the Beta version. Now, for the lossless, which I tested before writing all this, and was still causing the issue. I took another clip I then threw at Resolve, with expected results. I also played the clip through Media Player Classic, and then decoded it into the Vapoursynth framework. image image image

At this point, I was expecting the same behaviour as version 29.1.3, but most of it, at least on paper, seems fixed in version 30 except for the lossless case. While seemingly fixed, I'd still appreciate if this could be looked into so I can finally wrap my head around where the issue came from to begin with. It could be a very simple setting in the presets, but there's just so much to it, and with this randomness, I'm kinda lost as to where to look for the answer.

Fenrirthviti commented 1 year ago

This sounds more likely to be a support request rather than a bug report, and we are not currently accepting support requests on GitHub Issues. Please use our forums or Discord for assistance. Particularly, the #encoding-talk channel in our Discord can probably shed light on a lot of this. If it's determined that there is actually a bug or issue with OBS, we can reopen it at that time.

Thank you!