Page 1 of 1

Davinci Resolve and OBS recordings

PostPosted: Wed Feb 24, 2021 2:48 pm
by albertocv
I'm using Davinci Resolve 17 Beta 9. I'm recording on my PC in OBS. It produces MKV files. I use OBS utility to Remux them to MP4. Usually I record 15-30 minutes in a single file. I always use optimized media.

Recently Davinci is slowing down. CPU usage is high. Could it be that the remuxed MP4 encoding is too heavy for Davinci resolve?

Re: Davinci Resolve and OBS recordings

PostPosted: Wed Feb 24, 2021 2:54 pm
by Jim Simon
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

Also:

viewtopic.php?f=21&t=125567

Re: Davinci Resolve and OBS recordings

PostPosted: Wed Feb 24, 2021 6:55 pm
by smunaut
If he uses optimized media, it shouldn't matter AFAIU. (at least during the edit).

Re: Davinci Resolve and OBS recordings

PostPosted: Thu Feb 25, 2021 2:34 am
by Uli Plank
You will have audio sync problems for sure and maybe even worse.

Re: Davinci Resolve and OBS recordings

PostPosted: Thu Feb 25, 2021 7:44 am
by albertocv
smunaut wrote:If he uses optimized media, it shouldn't matter AFAIU. (at least during the edit).

This is what I thought.

Can it be a problem related to version 17?

Re: Davinci Resolve and OBS recordings

PostPosted: Thu Feb 25, 2021 9:24 am
by smunaut
Uli Plank wrote:You will have audio sync problems for sure and maybe even worse.


Why ?

OBS doesn't mean VFR. I record my desktop screen when working with OBS all the time and I get CFR unless I overload my PC and it starts dropping frame (and even that I can prevent, under linux I can just set obs process to "realtime priority" so it has priority over anything else)

That might be different under windows or when recording games, I wouldn't know. I know shadowplay is VFR just due to the nature of how it works, but AFAIK OBS really just screenshots at regular interval (or maybe on windows it has a shadow play integration ? no idea ...).


@albertocv : What content did you record ? Also can you check for VFR with ffmpeg ( see https://superuser.com/questions/1487401 ... frame-rate for how you can use ffmpeg to check the PTS of all frames are aligned with timebase )

Re: Davinci Resolve and OBS recordings

PostPosted: Thu Feb 25, 2021 3:45 pm
by albertocv
smunaut wrote:@albertocv : What content did you record ? Also can you check for VFR with ffmpeg ( see https://superuser.com/questions/1487401 ... frame-rate for how you can use ffmpeg to check the PTS of all frames are aligned with timebase )

I connected my camera to my PC through an HDMI capture card. I connected a USB mic. Then I recorded myself talking.

I recorded several videos this way and a couple of them gave me this issue.

Re: Davinci Resolve and OBS recordings

PostPosted: Thu Feb 25, 2021 4:32 pm
by Uli Plank
I have observed that OBS is not always giving you CFR. The tricky thing is: when checking the MKV recording (which is normally the recommended container) Media Info tells you it's CFR.
After re-wrapping it to MOV to be used in Resolve, MediaInfo is showing it as VFR!

Of course, this only happens if I have other demanding software running on the same machine. If you are using OBS simply as a recorder for video and audio without demoing anything at the same time, it should work fine.

Re: Davinci Resolve and OBS recordings

PostPosted: Thu Feb 25, 2021 7:34 pm
by smunaut
That's why I posted the link explaining how to use ffmpeg to check VFR.
It goes through the whole file and check the min/max difference of PTS between two subsequent frames.

@albertocv: If you can share one of those clips too, that could be useful.

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 8:06 am
by albertocv
smunaut wrote:That's why I posted the link explaining how to use ffmpeg to check VFR.
It goes through the whole file and check the min/max difference of PTS between two subsequent frames.

@albertocv: If you can share one of those clips too, that could be useful.


Thank you. I ran ffmpeg and got the below log:
SNAG-26-02-2021-0000.jpg
SNAG-26-02-2021-0000.jpg (27.22 KiB) Viewed 4273 times


From StackExchange this should mean it's a variable framerate file.
Is this slowing down Resolve? Even if I use optimized media?

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 9:03 am
by smunaut
That's a bit of a weird result tbh.

"True" VFR is usually way more difference between min/max values.
The fact 0.583333 is = 7/12 suggest more of a weird rational fixed frame rate and the values are just rounded to the timebase.

What's the result of :
`ffprobe -v quiet -print_format json -show_streams input.mkv`

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 10:55 am
by Uli Plank
Yes, but not only that. I've seen sync problems, black frames and "media offline" messages and finally rendering failures from such files. Resolve is not made for VFR, period. It's a great program for files out of real cameras (other than smartphones) and we have just finished an urgent project with 17b9 and finally 17.0 yesterday without any problems.

For VFR sources, look elsewhere or follow Jim Simon's advice.

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 12:14 pm
by smunaut
@Uli If you look at alberto's setup he says he's using an HDMI hardware capture card, that should provide a fixed frame rate without trouble. And the report from ffmpeg seem to confirm that, there is no wild PTS interval variation like you find in cellphone or shadowplay footage for instance.

h264 has tons of variants / options and there might be something else than VFR causing issues ...

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 12:47 pm
by Uli Plank
Possible. What kind of HDMI capture card is that?

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 1:00 pm
by Spencer Morris
Apparently, the OBS remux utility is flawed and turns CFR to VFR. Read more here: https://community.fxhome.com/discussion ... om-obs-vfr

The fix those users found was to use a different utility to remux the files, like ffmpeg. That produced CFR files.

That said, I'm doing some remote screen recordings right now for a project with users that have less than capable laptops, and I'm seeing their FPS dip below the 30 I've set and I'm a bit nervous as to sync and editing of these files. Testing that today.

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 2:13 pm
by smunaut
Oh interesting, I didn't even know there was such a thing as "OBS remux utility", I always use OBS for recording/streaming and then raw command line ffmpeg to post process.

Mmm, yeah, if you can't sustain the set frame rate, that will be an issue :/

You can always re-encode. It's painful, but it works and if you re-encode to a high-bitrate, the quality loss is minimal. If there is very little frame loss, you can also just override the PTS with ffmpeg "genpts" to force it to cfr. You might have to slightly realign the audio but if there is only a frame missing here and there and it's voice over a screen cap, it might be fine.

Something that can also happen if those user are also recording webcam is that some webcam will increase exposure to correct for low light. At least on my C920 I can turn on a "frame rate" priority mode where it will provide constant frame rate by never rising exposure time enough to slow it down.

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 2:34 pm
by albertocv
smunaut wrote:What's the result of :
`ffprobe -v quiet -print_format json -show_streams input.mkv`


This is the result.
SNAG-26-02-2021-0001.jpg
SNAG-26-02-2021-0001.jpg (223.96 KiB) Viewed 4162 times

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 3:01 pm
by smunaut
23.97 fps ... was that really intentional ?

But at least that explains the weird rounding errors.

Can you run both the vfr and ffprobe info on the original mkv ? I'm curious to see if the remuxing to mp4 caused issue.

Also what's the frame rate of your resolve project ? Does it match ?

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 3:32 pm
by albertocv
Mmm, probably it was the wrong setting on my camera. Or something I was forced to do in OBS. I can't check now.

This is ffprobe on the mkv file
SNAG-26-02-2021-0002.jpg
SNAG-26-02-2021-0002.jpg (285.02 KiB) Viewed 4139 times

Re: Davinci Resolve and OBS recordings

PostPosted: Fri Feb 26, 2021 4:31 pm
by albertocv
And this is the other check:
SNAG-26-02-2021-0003.jpg
SNAG-26-02-2021-0003.jpg (27.15 KiB) Viewed 4126 times