Question / Help Video drops frames when recording

ObsProGamer

New Member
I am having a big issue with lag. Basically even with nvenc I get random lag spikes in my videos. My games don't lag at all. My settings

Output:

Encoder: NVENC H.264
Rate Control: CBR
Bitrate: 10000
Keyframe Interval: 2
Preset: Default
Profile: Main
Level: auto
Use Two-Pass Encoding: True
GPU: 0
B-Frames: 2

Video:

Base Resolution 1920x1080
Output Resolution 1920x1080
Downscale Filter Bicubic
FPS: 30

Advanced:

Process Priority: Above Normal

Renderer: Direct3D 11
Color Format: NV12
YUV Color Space: 601 Range Partial

Pc specs:
AMD FX 4300
8GB Ram
Nvidia GTX 1070
1 TB HDD

Log:

Code:
13:12:06.885: CPU Name: AMD FX(tm)-4300 Quad-Core Processor           
13:12:06.885: CPU Speed: 3800MHz
13:12:06.885: Physical Cores: 2, Logical Cores: 4
13:12:06.885: Physical Memory: 8190MB Total, 3170MB Free (NOTE: 32bit programs cannot use more than 3gb)
13:12:06.885: Windows Version: 10.0 Build 14393 (revision: 1198; 64-bit)
13:12:06.885: Running as administrator: false
13:12:06.885: Aero is Enabled (Aero is always on for windows 8 and above)
13:12:06.886: Portable mode: false
13:12:06.927: OBS 20.0.1 (windows)
13:12:06.927: ---------------------------------
13:12:06.928: ---------------------------------
13:12:06.928: audio settings reset:
13:12:06.928:     samples per sec: 48000
13:12:06.928:     speakers:        2
13:12:06.930: ---------------------------------
13:12:06.930: Initializing D3D11...
13:12:06.930: Available Video Adapters:
13:12:06.932:     Adapter 1: NVIDIA GeForce GTX 1070
13:12:06.932:       Dedicated VRAM: 3221225472
13:12:06.932:       Shared VRAM:    1073676288
13:12:06.932:       output 1: pos={0, 0}, size={1920, 1080}, attached=true
13:12:06.932:       output 2: pos={-1680, 24}, size={1680, 1050}, attached=true
13:12:06.935: Loading up D3D11 on adapter NVIDIA GeForce GTX 1070 (0)
13:12:07.745: D3D11 loaded successfully, feature level used: 45056
13:12:09.017: ---------------------------------
13:12:09.017: video settings reset:
13:12:09.017:     base resolution:   1920x1080
13:12:09.017:     output resolution: 1920x1080
13:12:09.017:     downscale filter:  Bicubic
13:12:09.017:     fps:               30/1
13:12:09.017:     format:            NV12
13:12:09.019: Audio monitoring device:
13:12:09.019:     name: Default
13:12:09.019:     id: default
13:12:09.019: ---------------------------------
13:12:09.022: Required module function 'obs_module_load' in module '../../obs-plugins/32bit/chrome_elf.dll' not found, loading of module failed
13:12:09.039: [CoreAudio encoder]: Adding CoreAudio AAC encoder
13:12:09.043: [AMF] Encountered Exception during AMF initialization: Unable to load 'amfrt32.dll', error code 126.
13:12:09.043: Failed to initialize module 'enc-amf.dll'
13:12:09.078: Required module function 'obs_module_load' in module '../../obs-plugins/32bit/libcef.dll' not found, loading of module failed
13:12:09.079: Required module function 'obs_module_load' in module '../../obs-plugins/32bit/libEGL.dll' not found, loading of module failed
13:12:09.080: Required module function 'obs_module_load' in module '../../obs-plugins/32bit/libGLESv2.dll' not found, loading of module failed
13:12:09.081: Failed to load 'en-US' text for module: 'obs-browser.dll'
13:12:09.081: [browser_source: 'Version: 1.29.0']
13:12:09.087: NVENC supported
13:12:09.217: VLC found, VLC video source enabled
13:12:09.231: No blackmagic support
13:12:09.333: ---------------------------------
13:12:09.333:   Loaded Modules:
13:12:09.333:     win-wasapi.dll
13:12:09.333:     win-mf.dll
13:12:09.333:     win-dshow.dll
13:12:09.333:     win-decklink.dll
13:12:09.333:     win-capture.dll
13:12:09.333:     vlc-video.dll
13:12:09.333:     text-freetype2.dll
13:12:09.333:     rtmp-services.dll
13:12:09.333:     obs-x264.dll
13:12:09.333:     obs-vst.dll
13:12:09.333:     obs-transitions.dll
13:12:09.333:     obs-text.dll
13:12:09.333:     obs-qsv11.dll
13:12:09.333:     obs-outputs.dll
13:12:09.333:     obs-filters.dll
13:12:09.333:     obs-ffmpeg.dll
13:12:09.333:     obs-browser.dll
13:12:09.333:     image-source.dll
13:12:09.333:     frontend-tools.dll
13:12:09.333:     enc-amf.dll
13:12:09.333:     coreaudio-encoder.dll
13:12:09.333: ---------------------------------
13:12:09.333: ==== Startup complete ===============================================
13:12:09.365: [twitch ingest update] Remote update of URL "https://ingest.twitch.tv/api/v2/ingests" failed: schannel: next InitializeSecurityContext failed: SEC_E_INVALID_TOKEN (0x80090308) - The token supplied to the function is invalid
13:12:09.374: All scene data cleared
13:12:09.374: ------------------------------------------------
13:12:09.418: WASAPI: Device 'Speakers (2- USB Audio Device)' initialized
13:12:09.427: WASAPI: Device 'Microphone (2- AT2020USB+)' initialized
13:12:09.467: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds
13:12:16.430: Switched to scene 'WOG'
13:12:16.433: ------------------------------------------------
13:12:16.433: Loaded scenes:
13:12:16.433: - scene 'Scene':
13:12:16.433:     - source: 'Game Capture' (game_capture)
13:12:16.433: - scene 'Scene 1':
13:12:16.433:     - source: 'Display Capture 3' (monitor_capture)
13:12:16.433: - scene 'Gmod':
13:12:16.434:     - source: 'Game Capture 1' (game_capture)
13:12:16.434: - scene 'Scene 2':
13:12:16.434:     - source: 'Image' (image_source)
13:12:16.434:         - filter: 'Scroll' (scroll_filter)
13:12:16.434:     - source: 'BrowserSource' (browser_source)
13:12:16.434:         - filter: 'Crop/Pad' (crop_filter)
13:12:16.434:     - source: 'BrowserSource 1' (browser_source)
13:12:16.434:         - filter: 'Crop/Pad' (crop_filter)
13:12:16.434:     - source: 'BrowserSource 2' (browser_source)
13:12:16.434:         - filter: 'Crop/Pad' (crop_filter)
13:12:16.434:     - source: 'Idubbztv' (browser_source)
13:12:16.434:         - filter: 'Crop/Pad' (crop_filter)
13:12:16.434:     - source: 'RIP' (text_gdiplus)
13:12:16.434: - scene 'Scene 3':
13:12:16.434:     - source: 'Window Capture' (window_capture)
13:12:16.434: - scene 'Scene 4':
13:12:16.434:     - source: 'Display Capture' (monitor_capture)
13:12:16.434:     - source: 'BrowserSource 3' (browser_source)
13:12:16.434:         - filter: 'Chroma Key' (chroma_key_filter)
13:12:16.434: - scene 'Scene 5':
13:12:16.434:     - source: 'Window Capture 2' (window_capture)
13:12:16.434: - scene 'LiveStream 1':
13:12:16.434:     - source: 'Game Capture 2' (game_capture)
13:12:16.434:     - source: 'Display Capture 2' (monitor_capture)
13:12:16.434:     - source: 'Text (GDI+)' (text_gdiplus)
13:12:16.434:     - source: 'BrowserSource 4' (browser_source)
13:12:16.434:     - source: 'BrowserSource 5' (browser_source)
13:12:16.434: - scene 'Scene 6':
13:12:16.434:     - source: 'Window Capture 4' (window_capture)
13:12:16.435: - scene 'Scene 7':
13:12:16.435:     - source: 'Display Capture 4' (monitor_capture)
13:12:16.435: - scene 'Scene 8':
13:12:16.435:     - source: 'Game Capture 3' (game_capture)
13:12:16.435: - scene 'Scene 9':
13:12:16.435:     - source: 'Game Capture 4' (game_capture)
13:12:16.435: - scene 'Scene 10':
13:12:16.435:     - source: 'Window Capture 3' (window_capture)
13:12:16.435: - scene 'Audio test':
13:12:16.435:     - source: 'Audio vis' (monitor_capture)
13:12:16.435:         - filter: 'Crop/Pad' (crop_filter)
13:12:16.435:         - filter: 'Chroma Key' (chroma_key_filter)
13:12:16.435: - scene 'WOG':
13:12:16.435:     - source: 'Game Capture 5' (game_capture)
13:12:16.435: ------------------------------------------------
13:12:36.666: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds
13:12:47.511: Settings changed (outputs)
13:12:47.511: ------------------------------------------------
13:13:24.520: [game-capture: 'Game Capture 5'] attempting to hook process: WorldOfGoo.exe
13:13:24.524: [game-capture: 'Game Capture 5'] using helper (compatibility hook)
13:13:24.532: [game-capture: 'Game Capture 5'] hook not loaded yet, retrying..
13:13:27.553: [game-capture: 'Game Capture 5'] attempting to hook process: WorldOfGoo.exe
13:13:27.574: [game-capture: 'Game Capture 5'] Hooked DXGI
13:13:28.581: [game-capture: 'Game Capture 5'] d3d9 shared texture capture successful
13:13:28.586: [game-capture: 'Game Capture 5'] shared texture capture successful
13:13:35.991: ---------------------------------
13:13:35.992: [NVENC encoder: 'recording_h264'] settings:
13:13:35.992:     rate_control: CBR
13:13:35.992:     bitrate:      20000
13:13:35.992:     cqp:          0
13:13:35.992:     keyint:       250
13:13:35.992:     preset:       default
13:13:35.992:     profile:      main
13:13:35.992:     level:        auto
13:13:35.992:     width:        1920
13:13:35.992:     height:       1080
13:13:35.992:     2-pass:       true
13:13:35.992:     b-frames:     2
13:13:35.992:     GPU:          0
13:13:35.992:
13:13:36.594: [CoreAudio AAC: 'Track1']: settings:
13:13:36.594:     mode:          AAC
13:13:36.594:     bitrate:       160
13:13:36.594:     sample rate:   48000
13:13:36.594:     cbr:           on
13:13:36.594:     output buffer: 1536
13:13:36.610: ==== Recording Start ===============================================
13:13:36.645: [ffmpeg muxer: 'adv_file_output'] Writing file 'C:/Users/Liam/Videos/2017-08-22 13-13-35.mp4'...
13:13:43.071: [game-capture: 'Game Capture 5'] ----------------- d3d9 capture freed -----------------
13:13:43.277: [ffmpeg muxer: 'adv_file_output'] Output of file 'C:/Users/Liam/Videos/2017-08-22 13-13-35.mp4' stopped
13:13:43.277: Output 'adv_file_output': stopping
13:13:43.277: Output 'adv_file_output': Total frames output: 162
13:13:43.278: Output 'adv_file_output': Total drawn frames: 199
13:13:43.278: ==== Recording Stop ================================================
13:13:43.292: Video stopped, number of skipped frames due to encoding lag: 2/196 (1.0%)
13:13:47.481: [game-capture: 'Game Capture 5'] d3d9 shared texture capture successful
13:13:47.486: [game-capture: 'Game Capture 5'] shared texture capture successful
13:13:52.726: ---------------------------------
13:13:52.726: [NVENC encoder: 'recording_h264'] settings:
13:13:52.726:     rate_control: CBR
13:13:52.726:     bitrate:      20000
13:13:52.726:     cqp:          0
13:13:52.726:     keyint:       250
13:13:52.726:     preset:       default
13:13:52.726:     profile:      main
13:13:52.726:     level:        auto
13:13:52.726:     width:        1920
13:13:52.726:     height:       1080
13:13:52.726:     2-pass:       true
13:13:52.726:     b-frames:     2
13:13:52.726:     GPU:          0
13:13:52.726:
13:13:53.065: [CoreAudio AAC: 'Track1']: settings:
13:13:53.065:     mode:          AAC
13:13:53.065:     bitrate:       160
13:13:53.065:     sample rate:   48000
13:13:53.065:     cbr:           on
13:13:53.065:     output buffer: 1536
13:13:53.079: ==== Recording Start ===============================================
13:13:53.080: [ffmpeg muxer: 'adv_file_output'] Writing file 'C:/Users/Liam/Videos/2017-08-22 13-13-52.mp4'...
13:15:36.963: [ffmpeg muxer: 'adv_file_output'] Output of file 'C:/Users/Liam/Videos/2017-08-22 13-13-52.mp4' stopped
13:15:36.963: Output 'adv_file_output': stopping
13:15:36.964: Output 'adv_file_output': Total frames output: 3012
13:15:36.964: Output 'adv_file_output': Total drawn frames: 3117
13:15:36.965: ==== Recording Stop ================================================
13:15:36.971: Video stopped, number of skipped frames due to encoding lag: 1117/3117 (35.8%)
13:15:38.686: [game-capture: 'Game Capture 5'] capture window no longer exists, terminating capture
13:15:38.698: [game-capture: 'Game Capture 5'] capture stopped
13:16:28.026: adding 106 milliseconds of audio buffering, total audio buffering is now 149 milliseconds
13:16:28.094: adding 85 milliseconds of audio buffering, total audio buffering is now 234 milliseconds
 

Boildown

Active Member
13:15:36.971: Video stopped, number of skipped frames due to encoding lag: 1117/3117 (35.8%)

Encoding lag means the CPU is too slow. And considering you have a AMD FX 4300, this isn't too surprising. You may need to update it.

Make sure Game mode is OFF and VSync is On (I'm starting to tell everyone this lately, as its the most frequent cause of problems).

Follow this guide to set up recording: https://obsproject.com/forum/resour...ality-recording-and-multiple-audio-tracks.221

Use the High Performance preset instead of whatever it says in that guide though. You may have to downscale until the skipped frames go away (less than 1%).
 
Top