NV12 drops frames while I420 and I444 are fine

JohnnyX

New Member
Hi!

I was doing some quite in-depth research in my spare time on video capturing over last two weeks. I got fascinated by video editing and all engineering stuff around it. Especially being a software engineer who used to code using DirectX since its first versions. All video recording/editing is new for me so I am experimenting with OBS settings a lot.
I have observed that when recording a video from a 3D application I have no problems to get smooth, 0 dropped frames, 1080p@60 output material. Unless I choose NV12 as Color Format.
As far as I have already learnt, NV12 is designed to be as much compatible with GPU memory layout as possible. Thus resulting with no additional conversions during encoding. It bugs me as I444 and I420 settings are fine (I get 0 dropped frames). When NV12 is set I get like 3% of dropped frames.
Is it normal?
One of my newbie theories is that NV12 is designed mainly for streaming, so dropped frames do not hurt so much as during local recordings. Effectively, leaving GPU some more space to breath or actually render what is being streamed.

I have a log for you with 3 example recording sessions.
Settings are:
Code:
[NVENC encoder: 'recording_h264'] settings:
rate_control: CQP
bitrate:      0
cqp:          15
keyint:       250
preset:       hq
profile:      high
width:        1920
height:       1080
2-pass:       true
b-frames:     4

I444 and I420 result with:
Code:
11:53:27.594: Output 'adv_file_output': Total frames output: 7223
11:53:27.594: Output 'adv_file_output': Total drawn frames: 7246

11:55:39.753: Output 'adv_file_output': Total frames output: 7224
11:55:39.753: Output 'adv_file_output': Total drawn frames: 7248

NV12 results with:
Code:
11:51:15.282: Output 'adv_file_output': Total frames output: 7221
11:51:15.282: Output 'adv_file_output': Total drawn frames: 7243
11:51:15.282: Video stopped, number of skipped frames due to encoding lag: 218/7239 (3.0%)
 

Attachments

  • NV12.log
    10.7 KB · Views: 17

rockbottom

Active Member
It's not the Color Format, it's your encode settings. You used the Max Quality Preset when you recorded using the NV12 Color Format.
For the other recordings you were using the Quality Preset. Also uncheck Look-ahead, Psycho Visual Tuning & set Max B-Frames to 2.

You should also disable Game DVR, HAGS (Windows) & set your Keyframe Interval to 2.

11:49:04.731: video settings reset:
11:49:04.731: base resolution: 1920x1080
11:49:04.731: output resolution: 1920x1080
11:49:04.731: downscale filter: Bicubic
11:49:04.731: fps: 60/1
11:49:04.731: format: NV12
11:49:04.731: YUV mode: 709/Partial
11:49:04.732: NV12 texture support enabled
11:49:04.746: Settings changed (advanced)
11:49:04.746: ------------------------------------------------
11:49:14.513: [jim-nvenc: 'recording_h264'] settings:
11:49:14.513: rate_control: CQP
11:49:14.513: bitrate: 0
11:49:14.513: cqp: 15
11:49:14.513: keyint: 250
11:49:14.513: preset: mq
11:49:14.513: profile: high
11:49:14.513: width: 1920
11:49:14.513: height: 1080
11:49:14.513: 2-pass: true
11:49:14.513: b-frames: 4
11:49:14.513: lookahead: true
11:49:14.513: psycho_aq: true

11:51:24.369: video settings reset:
11:51:24.369: base resolution: 1920x1080
11:51:24.369: output resolution: 1920x1080
11:51:24.369: downscale filter: Bicubic
11:51:24.369: fps: 60/1
11:51:24.369: format: I420
11:51:24.369: YUV mode: 709/Partial
11:51:24.369: NV12 texture support not available
11:51:24.383: Settings changed (advanced)
11:51:24.383: ------------------------------------------------
11:51:26.558: [jim-nvenc: 'recording_h264'] nv12 not active, falling back to ffmpeg
11:51:26.558: ---------------------------------
11:51:26.558: [NVENC encoder: 'recording_h264'] settings:
11:51:26.558: rate_control: CQP
11:51:26.558: bitrate: 0
11:51:26.558: cqp: 15
11:51:26.558: keyint: 250
11:51:26.558: preset: hq
11:51:26.558: profile: high
11:51:26.558: width: 1920
11:51:26.558: height: 1080
11:51:26.558: 2-pass: true
11:51:26.558: b-frames: 4
11:51:26.558: GPU: 0

11:53:36.140: video settings reset:
11:53:36.140: base resolution: 1920x1080
11:53:36.140: output resolution: 1920x1080
11:53:36.140: downscale filter: Bicubic
11:53:36.140: fps: 60/1
11:53:36.140: format: I444
11:53:36.140: YUV mode: 709/Partial
11:53:36.141: NV12 texture support not available
11:53:36.154: Settings changed (advanced)
11:53:36.154: ------------------------------------------------
11:53:38.667: [jim-nvenc: 'recording_h264'] nv12 not active, falling back to ffmpeg
11:53:38.667: ---------------------------------
11:53:38.667: [NVENC encoder: 'recording_h264'] settings:
11:53:38.667: rate_control: CQP
11:53:38.667: bitrate: 0
11:53:38.667: cqp: 15
11:53:38.667: keyint: 250
11:53:38.667: preset: hq
11:53:38.667: profile: high
11:53:38.667: width: 1920
11:53:38.667: height: 1080
11:53:38.667: 2-pass: true
11:53:38.667: b-frames: 4
11:53:38.667: GPU: 0
 
Last edited:
Top