Question / Help CBR when its actually VBR

Inguru

New Member
Hey,

I'm having a issue. I'm using OBS for recording my footage with Nvida video card using nvenc. I rolled to OBS cause shadowplay caused me issues when I edited videos as footage as out of sync (cause it records as VBR).

I set up obs as follows for nvenc CBR (constant bit rate) 40 000 bitrate 60fps with Display capture (I could not get game capture working). I recorded 2h of footage yesterday, edited it without any issues. Today, I recorded 4h (at 2h sessions) and as I'm trying to edit it, the video is out of sync. I have not changed any settings. I've played the same game (Mass Effect 1). I don't know what's the issue.

I know I can use handbrake but that's like xx hours of encoding. That's why I switched to OBS to avoid this problem.

If anyone is having similar issue or knows how to deal with it, I would appreciate it.

Thanks for your support.
 

Inguru

New Member
16:50:05.942: CPU Name: Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
16:50:05.942: CPU Speed: 3500MHz
16:50:05.942: Physical Cores: 4, Logical Cores: 4
16:50:05.943: Physical Memory: 8085MB Total, 5577MB Free
16:50:05.943: Windows Version: 10.0 Build 14393 (revision: 693; 64-bit)
16:50:05.943: Running as administrator: false
16:50:05.943: Aero is Enabled (Aero is always on for windows 8 and above)
16:50:05.943: Portable mode: false
16:50:05.951: OBS 18.0.0 (64bit, windows)
16:50:05.951: ---------------------------------
16:50:05.951: ---------------------------------
16:50:05.951: audio settings reset:
16:50:05.951: samples per sec: 48000
16:50:05.951: speakers: 2
16:50:05.965: ---------------------------------
16:50:05.965: Initializing D3D11..
16:50:05.965: Available Video Adapters:
16:50:05.967: Adapter 1: NVIDIA GeForce GTX 760
16:50:05.967: Dedicated VRAM: 2115698688
16:50:05.967: Shared VRAM: 4239108096
16:50:05.967: output 1: pos={0, 0}, size={1920, 1080}, attached=true
16:50:05.967: output 2: pos={-1920, 0}, size={1920, 1080}, attached=true
16:50:05.967: Adapter 2: Intel(R) HD Graphics 4600
16:50:05.967: Dedicated VRAM: 117964800
16:50:05.967: Shared VRAM: 2147483648
16:50:05.971: Loading up D3D11 on adapter NVIDIA GeForce GTX 760 (0)
16:50:06.454: D3D11 loaded sucessfully, feature level used: 45056
16:50:07.165: ---------------------------------
16:50:07.165: video settings reset:
16:50:07.165: base resolution: 1920x1080
16:50:07.165: output resolution: 1920x1080
16:50:07.165: downscale filter: Bicubic
16:50:07.165: fps: 60/1
16:50:07.165: format: NV12
16:50:07.168: ---------------------------------
16:50:07.242: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/chrome_elf.dll' not found, loading of module failed
16:50:07.258: [CoreAudio encoder]: CoreAudio AAC encoder not installed on the system or couldn't be loaded
16:50:07.279: [AMF Encoder] Unable to load 'amfrt64.dll', error code 126.
16:50:07.412: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libcef.dll' not found, loading of module failed
16:50:07.422: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libEGL.dll' not found, loading of module failed
16:50:07.434: Required module function 'obs_module_load' in module '../../obs-plugins/64bit/libGLESv2.dll' not found, loading of module failed
16:50:07.448: Failed to load 'en-US' text for module: 'obs-browser.dll'
16:50:07.448: [browser_source: 'Version: 1.29.0']
16:50:07.516: NVENC supported
16:50:07.701: Couldn't find VLC installation, VLC video source disabled
16:50:07.736: No blackmagic support
16:50:08.050: ---------------------------------
16:50:08.051: Loaded Modules:
16:50:08.051: win-wasapi.dll
16:50:08.051: win-mf.dll
16:50:08.051: win-dshow.dll
16:50:08.051: win-decklink.dll
16:50:08.051: win-capture.dll
16:50:08.051: vlc-video.dll
16:50:08.051: text-freetype2.dll
16:50:08.051: rtmp-services.dll
16:50:08.051: obs-x264.dll
16:50:08.051: obs-vst.dll
16:50:08.051: obs-transitions.dll
16:50:08.051: obs-text.dll
16:50:08.051: obs-qsv11.dll
16:50:08.051: obs-outputs.dll
16:50:08.051: obs-filters.dll
16:50:08.051: obs-ffmpeg.dll
16:50:08.051: obs-browser.dll
16:50:08.051: image-source.dll
16:50:08.051: frontend-tools.dll
16:50:08.051: enc-amf.dll
16:50:08.051: coreaudio-encoder.dll
16:50:08.051: ==== Startup complete ===============================================
16:50:08.053: Service '' not found
16:50:08.059: All scene data cleared
16:50:08.059: ------------------------------------------------
16:50:08.100: WASAPI: Device 'Speakers (Realtek High Definition Audio)' initialized
16:50:08.128: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds
16:50:10.883: Switched to scene 'Scene1'
16:50:10.883: ------------------------------------------------
16:50:10.883: Loaded scenes:
16:50:10.883: - scene 'Blank':
16:50:10.884: - scene 'Scene1':
16:50:10.884: - source: 'Game Capture' (game_capture)
16:50:10.884: - source: 'Display Capture' (monitor_capture)
16:50:10.884: ------------------------------------------------
16:51:23.564: rtmp-common.c: [initialize_output] Could not find service ''
16:51:23.565: ---------------------------------
16:51:23.567: [NVENC encoder: 'recording_h264'] settings:
16:51:23.567: rate_control: CBR
16:51:23.567: bitrate: 40000
16:51:23.567: cqp: 0
16:51:23.567: keyint: 120
16:51:23.567: preset: default
16:51:23.567: profile: main
16:51:23.567: level: auto
16:51:23.567: width: 1920
16:51:23.567: height: 1080
16:51:23.567: 2-pass: true
16:51:23.567: b-frames: 2
16:51:23.567: GPU: 0
16:51:23.567:
16:51:24.902: [Media Foundation AAC: 'Track1']: encoder created
16:51:24.902: bitrate: 192
16:51:24.902: channels: 2
16:51:24.902: sample rate: 48000
16:51:24.902: bits-per-sample: 16
16:51:24.902:
16:51:24.917: ==== Recording Start ===============================================
16:51:24.917: [ffmpeg muxer: 'adv_file_output'] Writing file 'D:/Shadowplay/2017-03-04 16-51-23.mp4'...
18:53:25.206: adding 42 milliseconds of audio buffering, total audio buffering is now 64 milliseconds
20:14:29.233: [ffmpeg muxer: 'adv_file_output'] Output of file 'D:/Shadowplay/2017-03-04 16-51-23.mp4' stopped
20:14:29.233: Output 'adv_file_output': stopping
20:14:29.233: Output 'adv_file_output': Total encoded frames: 731049
20:14:29.233: Output 'adv_file_output': Total drawn frames: 731060
20:14:29.233: Output 'adv_file_output': Number of skipped frames due to encoding lag: 5 (0.0%)
20:14:29.233: Output 'adv_file_output': Number of lagged frames due to rendering lag/stalls: 5 (0.0%)
20:14:29.234: ==== Recording Stop ================================================
20:14:30.526: ==== Shutting down ==================================================
20:14:30.531: Switched to scene '(null)'
20:14:30.533: WASAPI: Device 'Speakers (Realtek High Definition Audio)' Terminated
20:14:30.547: All scene data cleared
20:14:30.547: ------------------------------------------------
20:14:30.590: Freeing OBS context data
20:14:30.707: == Profiler Results =============================
20:14:30.707: run_program_init: 5070.13 ms
20:14:30.707: ┣OBSApp::AppInit: 16.442 ms
20:14:30.707: ┃ ┗OBSApp::InitLocale: 9.685 ms
20:14:30.707: ┗OBSApp::OBSInit: 5033.56 ms
20:14:30.707: ┣obs_startup: 9.202 ms
20:14:30.707: ┗OBSBasic::OBSInit: 4990.61 ms
20:14:30.707: ┣OBSBasic::InitBasicConfig: 0.311 ms
20:14:30.707: ┣OBSBasic::ResetAudio: 0.232 ms
20:14:30.707: ┣OBSBasic::ResetVideo: 1215.28 ms
20:14:30.707: ┣OBSBasic::InitOBSCallbacks: 0.006 ms
20:14:30.707: ┣OBSBasic::InitHotkeys: 0.384 ms
20:14:30.707: ┣obs_load_all_modules: 882.717 ms
20:14:30.707: ┃ ┣obs_init_module(coreaudio-encoder.dll): 0.368 ms
20:14:30.707: ┃ ┣obs_init_module(enc-amf.dll): 1.054 ms
20:14:30.707: ┃ ┣obs_init_module(frontend-tools.dll): 1.97 ms
20:14:30.707: ┃ ┣obs_init_module(image-source.dll): 0.005 ms
20:14:30.707: ┃ ┣obs_init_module(obs-browser.dll): 0.485 ms
20:14:30.707: ┃ ┣obs_init_module(obs-ffmpeg.dll): 49.282 ms
20:14:30.707: ┃ ┣obs_init_module(obs-filters.dll): 0.008 ms
20:14:30.707: ┃ ┣obs_init_module(obs-outputs.dll): 0.01 ms
20:14:30.707: ┃ ┣obs_init_module(obs-qsv11.dll): 15.678 ms
20:14:30.707: ┃ ┣obs_init_module(obs-text.dll): 0.406 ms
20:14:30.707: ┃ ┣obs_init_module(obs-transitions.dll): 0.005 ms
20:14:30.707: ┃ ┣obs_init_module(obs-vst.dll): 0.002 ms
20:14:30.707: ┃ ┣obs_init_module(obs-x264.dll): 0.001 ms
20:14:30.707: ┃ ┣obs_init_module(rtmp-services.dll): 1.108 ms
20:14:30.707: ┃ ┣obs_init_module(text-freetype2.dll): 0.056 ms
20:14:30.707: ┃ ┣obs_init_module(vlc-video.dll): 0.049 ms
20:14:30.707: ┃ ┣obs_init_module(win-capture.dll): 0.104 ms
20:14:30.707: ┃ ┣obs_init_module(win-decklink.dll): 2.529 ms
20:14:30.707: ┃ ┣obs_init_module(win-dshow.dll): 19.575 ms
20:14:30.707: ┃ ┣obs_init_module(win-mf.dll): 240.965 ms
20:14:30.707: ┃ ┣obs_init_module(win-wasapi.dll): 0.01 ms
20:14:30.707: ┃ ┗reset_win32_symbol_paths: 0.081 ms
20:14:30.707: ┣OBSBasic::ResetOutputs: 1.812 ms
20:14:30.707: ┣OBSBasic::CreateHotkeys: 0.024 ms
20:14:30.707: ┣OBSBasic::InitService: 0.1 ms
20:14:30.707: ┣OBSBasic::InitPrimitives: 0.259 ms
20:14:30.707: ┗OBSBasic::Load: 2830.66 ms
20:14:30.707: obs_hotkey_thread(25 ms): min=0.001 ms, median=0.004 ms, max=24.064 ms, 99th percentile=0.221 ms, 100% below 25 ms
20:14:30.707: audio_thread(Audio): min=0 ms, median=0.267 ms, max=150.414 ms, 99th percentile=0.507 ms
20:14:30.708: ┗receive_audio: min=0.003 ms, median=0.236 ms, max=150.361 ms, 99th percentile=0.457 ms
20:14:30.708: ┣buffer_audio: min=0 ms, median=0 ms, max=0.36 ms, 99th percentile=0.001 ms
20:14:30.708: ┗do_encode: min=0.063 ms, median=0.233 ms, max=150.357 ms, 99th percentile=0.452 ms
20:14:30.708: ┗encode(Track1): min=0.063 ms, median=0.188 ms, max=3.037 ms, 99th percentile=0.358 ms
20:14:30.708: obs_video_thread(16.6667 ms): min=0.26 ms, median=0.922 ms, max=2777.93 ms, 99th percentile=1.417 ms, 99.998% below 16.667 ms
20:14:30.708: ┣tick_sources: min=0 ms, median=0.164 ms, max=2777.37 ms, 99th percentile=0.268 ms
20:14:30.708: ┣render_displays: min=0 ms, median=0.136 ms, max=20.274 ms, 99th percentile=0.363 ms
20:14:30.708: ┗output_frame: min=0.256 ms, median=0.614 ms, max=33.076 ms, 99th percentile=0.929 ms
20:14:30.708: ┣gs_context(video->graphics): min=0.068 ms, median=0.222 ms, max=32.677 ms, 99th percentile=0.458 ms
20:14:30.708: ┃ ┣render_video: min=0.024 ms, median=0.031 ms, max=6.455 ms, 99th percentile=0.198 ms
20:14:30.708: ┃ ┃ ┣render_main_texture: min=0.002 ms, median=0.012 ms, max=4.408 ms, 99th percentile=0.058 ms
20:14:30.708: ┃ ┃ ┣render_output_texture: min=0.004 ms, median=0.006 ms, max=1.584 ms, 99th percentile=0.038 ms
20:14:30.708: ┃ ┃ ┣render_convert_texture: min=0.001 ms, median=0.008 ms, max=2.027 ms, 99th percentile=0.044 ms
20:14:30.708: ┃ ┃ ┗stage_output_texture: min=0 ms, median=0.002 ms, max=6.427 ms, 99th percentile=0.155 ms
20:14:30.708: ┃ ┣download_frame: min=0 ms, median=0.001 ms, max=32.403 ms, 99th percentile=0.215 ms
20:14:30.708: ┃ ┗gs_flush: min=0.011 ms, median=0.177 ms, max=14.619 ms, 99th percentile=0.404 ms
20:14:30.708: ┗output_video_data: min=0.001 ms, median=0.38 ms, max=7.743 ms, 99th percentile=0.565 ms
20:14:30.708: video_thread(video): min=0 ms, median=1.713 ms, max=165.93 ms, 99th percentile=2.808 ms
20:14:30.708: ┗receive_video: min=0 ms, median=1.723 ms, max=165.926 ms, 99th percentile=2.807 ms
20:14:30.708: ┗do_encode: min=0.855 ms, median=1.722 ms, max=165.925 ms, 99th percentile=2.806 ms
20:14:30.708: ┗encode(recording_h264): min=0.841 ms, median=1.673 ms, max=10.681 ms, 99th percentile=2.754 ms
20:14:30.708: =================================================
20:14:30.708: == Profiler Time Between Calls ==================
20:14:30.708: obs_hotkey_thread(25 ms): min=24.537 ms, median=25.025 ms, max=71.481 ms, 91.6062% within ±2% of 25 ms (0% lower, 8.39381% higher)
20:14:30.708: obs_video_thread(16.6667 ms): min=0.923 ms, median=16.667 ms, max=2777.94 ms, 99.7565% within ±2% of 16.667 ms (0.121392% lower, 0.122072% higher)
20:14:30.708: =================================================
20:14:30.860: Number of memory leaks: 1
 

TryHD

Member
Hey,

I'm having a issue. I'm using OBS for recording my footage with Nvida video card using nvenc. I rolled to OBS cause shadowplay caused me issues when I edited videos as footage as out of sync (cause it records as VBR).
you seem to confuse variable bitrate with variable frame rate. VBR is fine, while VFR will cause sync problems at editing
 

Inguru

New Member
Yeah, my bad, sorry for that.

Still, it doesn't solve the issue. I have set up 60fps for my recordings, anything I can do to prevent this problem?
 

Inguru

New Member
Okay, I have found out my problem. It was audio bitrate that caused the issue. I had 192kbs. Immediately as I switched back to 128kbs problem was solved.

Anyone with the same issue?
 

Simes

Member
I've had similar problems in the past, solved them by installing the CoreAudio AAC encoder.
 
Top