Question / Help Recording freezes at certain times

Hey everyone. Hope everyone's doing well.
I record Game Development tutorials to post to YouTube. Recently I noticed that at some portions of the recording, the frame would freeze for a few seconds and then continue.This is an issue for me because at certain times I'm typing code, or maybe showing a certain feature working.
Can someone help me with this?
I understand I am supposed to post a log, so here it is. It is from the very last recording I did, which is the one where the problem occurred.

Code:
01:41:52: Open Broadcaster Software v0.654b - 64bit ( ^ω^)
01:41:52: -------------------------------
01:41:52: CPU Name: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
01:41:52: CPU Speed: 2195MHz
01:41:52: Physical Memory:  6058MB Total, 2214MB Free
01:41:52: stepping id: 4, model 61, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 2
01:41:52: monitor 1: pos={0, 0}, size={1366, 768}
01:41:52: Windows Version: 6.3 Build 9600 (revision 17415)
01:41:52: Aero is Enabled
01:41:52: -------------------------------
01:41:52: OBS Modules:
01:41:52: Base Address  Module
01:41:52: 000000002BD50000 OBS.exe
01:41:52: 000000004F4D0000 OBSApi.dll
01:41:52: 0000000052670000 DShowPlugin.dll
01:41:52: 00000000524F0000 GraphicsCapture.dll
01:41:52: 0000000052580000 NoiseGate.dll
01:41:52: 0000000052480000 PSVPlugin.dll
01:41:52: 0000000051890000 scenesw.dll
01:41:52: ------------------------------------------
01:41:52: Adapter 1
01:41:52:  Video Adapter: Intel(R) HD Graphics 5500
01:41:52:  Video Adapter Dedicated Video Memory: 0
01:41:52:  Video Adapter Shared System Memory: 3176374272
01:41:52:  Video Adapter Output 1: pos={0, 0}, size={1366, 768}, attached=true
01:41:52: ------------------------------------------
01:41:52: Adapter 2
01:41:52:  Video Adapter: AMD Radeon R5 M230
01:41:52:  Video Adapter Dedicated Video Memory: 2141462528
01:41:52:  Video Adapter Shared System Memory: 2952790016
01:41:52: =====Stream Start: 2016-01-27, 01:41:52===============================================
01:41:52:  Multithreaded optimizations: On
01:41:52:  Base resolution: 1366x768
01:41:52:  Output resolution: 1364x768
01:41:52: ------------------------------------------
01:41:52: Loading up D3D10 on Intel(R) HD Graphics 5500 (Adapter 1)...
01:41:52: ------------------------------------------
01:41:52: Audio Format: 48000 Hz
01:41:52: ------------------------------------------
01:41:52: Audio Channels: 2 Ch
01:41:52: Playback device {0.0.0.00000000}.{6d130242-d7c3-4dc2-b3f7-a403924bf2c1}
01:41:52: ------------------------------------------
01:41:52: Using desktop audio input: Speakers (Fast Track)
01:41:52: Global Audio time adjust: 0
01:41:52: ------------------------------------------
01:41:52: Using auxilary audio input: Microphone (Fast Track)
01:41:52: Mic time offset: 0
01:41:52: ------------------------------------------
01:41:52: Audio Encoding: AAC
01:41:52:  bitrate: 128
01:41:52: Using Monitor Capture
01:41:52: Scene buffering time set to 700
01:41:52: ------------------------------------------
01:41:52: Video Encoding: x264
01:41:52:  fps: 30
01:41:52:  width: 1364, height: 768
01:41:52:  preset: veryfast
01:41:52:  profile: high
01:41:52:  keyint: 250
01:41:52:  CBR: yes
01:41:52:  CFR: yes
01:41:52:  max bitrate: 1000
01:41:52:  buffer size: 1000
01:41:52: ------------------------------------------
01:41:53: Audio timestamp for device 'Microphone (Fast Track)' was behind target timestamp by 3206751629
02:09:15: FlushBufferedVideo: Flushing 2 packets over 33 ms
02:09:15: Total frames encoded: 49255, total frames duplicated: 27510 (55.85%)
02:09:15: Number of frames skipped due to encoder lag: 11495 (23.34%)
02:09:15: Total frames rendered: 23144, number of late frames: 11696 (50.54%) (it's okay for some frames to be late)
02:09:15:
02:09:15: Profiler time results:
02:09:15:
02:09:15: ==============================================================
02:09:15: video thread frame - [100%] [avg time: 51.371 ms] [children: 99.4%] [unaccounted: 0.605%]
02:09:15: | scene->Preprocess - [98.7%] [avg time: 50.696 ms]
02:09:15: | GPU download and conversion - [0.709%] [avg time: 0.364 ms] [children: 0.611%] [unaccounted: 0.0973%]
02:09:15: | | flush - [0.487%] [avg time: 0.25 ms]
02:09:15: | | CopyResource - [0.107%] [avg time: 0.055 ms]
02:09:15: | | conversion to 4:2:0 - [0.0175%] [avg time: 0.009 ms]
02:09:15: Convert444Thread - [100%] [avg time: 2.596 ms] [children: 99.6%] [unaccounted: 0.424%]
02:09:15: | Convert444toNV12 - [99.6%] [avg time: 2.585 ms]
02:09:15: encoder thread frame - [100%] [avg time: 16.324 ms] [children: 4.56%] [unaccounted: 95.4%]
02:09:15: | sending stuff out - [4.56%] [avg time: 0.745 ms]
02:09:15: ==============================================================
02:09:15:
02:09:15:
02:09:15: Profiler CPU results:
02:09:15:
02:09:15: ==============================================================
02:09:15: video thread frame - [cpu time: avg 5.621 ms, total 130094 ms] [avg calls per frame: 1]
02:09:15: | scene->Preprocess - [cpu time: avg 5.015 ms, total 116078 ms] [avg calls per frame: 1]
02:09:15: | GPU download and conversion - [cpu time: avg 0.332 ms, total 7687.5 ms] [avg calls per frame: 1]
02:09:15: | | flush - [cpu time: avg 0.242 ms, total 5609.38 ms] [avg calls per frame: 1]
02:09:15: | | CopyResource - [cpu time: avg 0.055 ms, total 1281.25 ms] [avg calls per frame: 1]
02:09:15: | | conversion to 4:2:0 - [cpu time: avg 0.004 ms, total 109.375 ms] [avg calls per frame: 1]
02:09:15: Convert444Thread - [cpu time: avg 2.433 ms, total 56281.3 ms] [avg calls per frame: 1]
02:09:15: | Convert444toNV12 - [cpu time: avg 2.423 ms, total 56062.5 ms] [avg calls per frame: 1]
02:09:15: encoder thread frame - [cpu time: avg 3.094 ms, total 152422 ms] [avg calls per frame: 1]
02:09:15: | sending stuff out - [cpu time: avg 0.602 ms, total 29656.3 ms] [avg calls per frame: 1]
02:09:15: ==============================================================
02:09:15:
02:09:15: =====Stream End: 2016-01-27, 02:09:15=================================================
02:12:55: Terminating 0x2434

Thanks in advance.
Peace.
 

dping

Active Member
Hey everyone. Hope everyone's doing well.
I record Game Development tutorials to post to YouTube. Recently I noticed that at some portions of the recording, the frame would freeze for a few seconds and then continue.This is an issue for me because at certain times I'm typing code, or maybe showing a certain feature working.
Can someone help me with this?
I understand I am supposed to post a log, so here it is. It is from the very last recording I did, which is the one where the problem occurred.

Code:
01:41:52: Open Broadcaster Software v0.654b - 64bit ( ^ω^)
01:41:52: -------------------------------
01:41:52: CPU Name: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
01:41:52: CPU Speed: 2195MHz
01:41:52: Physical Memory:  6058MB Total, 2214MB Free
01:41:52: stepping id: 4, model 61, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 2
01:41:52: monitor 1: pos={0, 0}, size={1366, 768}
01:41:52: Windows Version: 6.3 Build 9600 (revision 17415)
01:41:52: Aero is Enabled
01:41:52: -------------------------------
01:41:52: OBS Modules:
01:41:52: Base Address  Module
01:41:52: 000000002BD50000 OBS.exe
01:41:52: 000000004F4D0000 OBSApi.dll
01:41:52: 0000000052670000 DShowPlugin.dll
01:41:52: 00000000524F0000 GraphicsCapture.dll
01:41:52: 0000000052580000 NoiseGate.dll
01:41:52: 0000000052480000 PSVPlugin.dll
01:41:52: 0000000051890000 scenesw.dll
01:41:52: ------------------------------------------
01:41:52: Adapter 1
01:41:52:  Video Adapter: Intel(R) HD Graphics 5500
01:41:52:  Video Adapter Dedicated Video Memory: 0
01:41:52:  Video Adapter Shared System Memory: 3176374272
01:41:52:  Video Adapter Output 1: pos={0, 0}, size={1366, 768}, attached=true
01:41:52: ------------------------------------------
01:41:52: Adapter 2
01:41:52:  Video Adapter: AMD Radeon R5 M230
01:41:52:  Video Adapter Dedicated Video Memory: 2141462528
01:41:52:  Video Adapter Shared System Memory: 2952790016
01:41:52: =====Stream Start: 2016-01-27, 01:41:52===============================================
01:41:52:  Multithreaded optimizations: On
01:41:52:  Base resolution: 1366x768
01:41:52:  Output resolution: 1364x768
01:41:52: ------------------------------------------
01:41:52: Loading up D3D10 on Intel(R) HD Graphics 5500 (Adapter 1)...
01:41:52: ------------------------------------------
01:41:52: Audio Format: 48000 Hz
01:41:52: ------------------------------------------
01:41:52: Audio Channels: 2 Ch
01:41:52: Playback device {0.0.0.00000000}.{6d130242-d7c3-4dc2-b3f7-a403924bf2c1}
01:41:52: ------------------------------------------
01:41:52: Using desktop audio input: Speakers (Fast Track)
01:41:52: Global Audio time adjust: 0
01:41:52: ------------------------------------------
01:41:52: Using auxilary audio input: Microphone (Fast Track)
01:41:52: Mic time offset: 0
01:41:52: ------------------------------------------
01:41:52: Audio Encoding: AAC
01:41:52:  bitrate: 128
01:41:52: Using Monitor Capture
01:41:52: Scene buffering time set to 700
01:41:52: ------------------------------------------
01:41:52: Video Encoding: x264
01:41:52:  fps: 30
01:41:52:  width: 1364, height: 768
01:41:52:  preset: veryfast
01:41:52:  profile: high
01:41:52:  keyint: 250
01:41:52:  CBR: yes
01:41:52:  CFR: yes
01:41:52:  max bitrate: 1000
01:41:52:  buffer size: 1000
01:41:52: ------------------------------------------
01:41:53: Audio timestamp for device 'Microphone (Fast Track)' was behind target timestamp by 3206751629
02:09:15: FlushBufferedVideo: Flushing 2 packets over 33 ms
02:09:15: Total frames encoded: 49255, total frames duplicated: 27510 (55.85%)
02:09:15: Number of frames skipped due to encoder lag: 11495 (23.34%)
02:09:15: Total frames rendered: 23144, number of late frames: 11696 (50.54%) (it's okay for some frames to be late)
02:09:15:
02:09:15: Profiler time results:
02:09:15:
02:09:15: ==============================================================
02:09:15: video thread frame - [100%] [avg time: 51.371 ms] [children: 99.4%] [unaccounted: 0.605%]
02:09:15: | scene->Preprocess - [98.7%] [avg time: 50.696 ms]
02:09:15: | GPU download and conversion - [0.709%] [avg time: 0.364 ms] [children: 0.611%] [unaccounted: 0.0973%]
02:09:15: | | flush - [0.487%] [avg time: 0.25 ms]
02:09:15: | | CopyResource - [0.107%] [avg time: 0.055 ms]
02:09:15: | | conversion to 4:2:0 - [0.0175%] [avg time: 0.009 ms]
02:09:15: Convert444Thread - [100%] [avg time: 2.596 ms] [children: 99.6%] [unaccounted: 0.424%]
02:09:15: | Convert444toNV12 - [99.6%] [avg time: 2.585 ms]
02:09:15: encoder thread frame - [100%] [avg time: 16.324 ms] [children: 4.56%] [unaccounted: 95.4%]
02:09:15: | sending stuff out - [4.56%] [avg time: 0.745 ms]
02:09:15: ==============================================================
02:09:15:
02:09:15:
02:09:15: Profiler CPU results:
02:09:15:
02:09:15: ==============================================================
02:09:15: video thread frame - [cpu time: avg 5.621 ms, total 130094 ms] [avg calls per frame: 1]
02:09:15: | scene->Preprocess - [cpu time: avg 5.015 ms, total 116078 ms] [avg calls per frame: 1]
02:09:15: | GPU download and conversion - [cpu time: avg 0.332 ms, total 7687.5 ms] [avg calls per frame: 1]
02:09:15: | | flush - [cpu time: avg 0.242 ms, total 5609.38 ms] [avg calls per frame: 1]
02:09:15: | | CopyResource - [cpu time: avg 0.055 ms, total 1281.25 ms] [avg calls per frame: 1]
02:09:15: | | conversion to 4:2:0 - [cpu time: avg 0.004 ms, total 109.375 ms] [avg calls per frame: 1]
02:09:15: Convert444Thread - [cpu time: avg 2.433 ms, total 56281.3 ms] [avg calls per frame: 1]
02:09:15: | Convert444toNV12 - [cpu time: avg 2.423 ms, total 56062.5 ms] [avg calls per frame: 1]
02:09:15: encoder thread frame - [cpu time: avg 3.094 ms, total 152422 ms] [avg calls per frame: 1]
02:09:15: | sending stuff out - [cpu time: avg 0.602 ms, total 29656.3 ms] [avg calls per frame: 1]
02:09:15: ==============================================================
02:09:15:
02:09:15: =====Stream End: 2016-01-27, 02:09:15=================================================
02:12:55: Terminating 0x2434

Thanks in advance.
Peace.

Code:
Audio Format
48000 Hz

check your playback and recording devices for "Fast Track" is the format 44100Hz or 48000Hz? whatever they both are, set OBS to that format. currently OBS is using 48000Hz.

since you are local recording change x264 preset to superfast and turn CBR off. next set custom buffer to 0 (its next to your bitrate).

Lastly monitor capture isn't recommended since it can lag a lot at times. also note that you ahve switchable graphics but are stuck using the intel instead of your dGPU since you are using monitor capture. you are kind of stuck doing what I said above.
 
For recording I use Audacity (Audio) and OBS (Audio & Video). I deleted the audio track from the OBS recording later because I only use it to sync the audio recorded by Audacity. I checked the settings. In Audacity it's 44.1kHz and in OBS it's 48kHz. But how would these affect the video?

Alright, I did all that you mentioned. I should mention, OBS gave me a warning when trying to change the x264 preset.
I haven't tried recording with these settings yet.

Oh I wasn't aware that with Monitor Capture it uses the Intel GPU instead of the AMD. But if I use Window Capture, won't I be restricted to one window only? What if I wanna, say for example, show something in Notepad, and also show something in Windows Explorer, and then switch back to the Unity Editor (the window that I was initially recording)?
What would be the best way to do this?
 

dping

Active Member
For recording I use Audacity (Audio) and OBS (Audio & Video). I deleted the audio track from the OBS recording later because I only use it to sync the audio recorded by Audacity. I checked the settings. In Audacity it's 44.1kHz and in OBS it's 48kHz. But how would these affect the video?

Alright, I did all that you mentioned. I should mention, OBS gave me a warning when trying to change the x264 preset.
I haven't tried recording with these settings yet.

Oh I wasn't aware that with Monitor Capture it uses the Intel GPU instead of the AMD. But if I use Window Capture, won't I be restricted to one window only? What if I wanna, say for example, show something in Notepad, and also show something in Windows Explorer, and then switch back to the Unity Editor (the window that I was initially recording)?
What would be the best way to do this?
the problem is CPU usage. with matching autio format the CPU does not have to reencode the audio format with is helpful with low end systems.

the preset change is mainly to let you know that adjusting it will change how log x264 spends on encoding. in this case, we want it to encode less quality (for better CPU usage) but this will not be a problem since the encoder will make up for the "loss" with higher bitrate automatically when you set buffer to 0.

In your case you are stuck using monitor capture because I dont think that there is a way to force the desktop to "high performance" in the driver which would then use the AMD GPU.
 
Top