Question / Help WARNING: Taking too long to encode. Skipping Frame!

MattR

New Member
Today, I streamed for the first time on Twitch.

It was pretty good until about 3 hours into a 4 hour stream, where about every few minutes, the game would freeze, and the unfreeze, and OBS would say WARNING: Taking too long to encode. Skipping frames.

Here are my settings

Max Bitrate 800kb/s
1920x1080 Downscaled 1.5 (1280x720)
FPS: 24
x264 CPU Preset: veryfast

I have a NVIDIA GeForce GTX 560 Ti and a Intel Core i5-2500k @ 3.30Ghz with 12GB ram

And my upload speed test from testmy.net

:::.. Upload Speed Test Result Details ..:::
Upload Connection Speed:: 3903 Kbps or 3.9 Mbps
Upload Speed Test Size:: 3.3 MB or 3392 kB or 3473408 bytes
Upload Binary File Transfer Speed:: 488 kB/s
Tested At:: http://TestMy.net Version 13
Validation:: http://testmy.net/db/cCp0v1j
More Stats:: http://testmy.net/compID/2218892984479
Test Time:: 2014-04-01 17:38:41 Local Time
Location:: Asheville, NC US >> Destination:: Dallas, TX US
1MB Upload in 2.1 Seconds - 1GB Upload in ~36 Minutes - 70X faster than 56K
This test of exactly 3392 kB took 7.119 seconds to complete
Running at 115% of hosts average (Charter Communications http://testmy.net/hoststats/charter_communicatio)
User Agent:: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safari/537.36 [!]

I'm sure I need to reduce something, but I'm not sure if it's Max Bitrate, FPS, or what, and I'm not sure what to reduce it to.

The stream is already a little blurry, as you can see at http://www.twitch.tv/matzimazing/b/516204217

Any help would be much appreciated. I would love a higher quality stream, but I'd rather have one that doesn't have any skipped frames.

THANK YOU!
 

MattR

New Member
From that page, seems like the only option without replacing the hardware all together is to change the x264 preset. I'm already set to well below 30FPS and am already downscaling to 720p.

And I may need to accept the possibility that my hardware just isn't sufficient enough to stream decently.

But I do wonder if my internet would allow for a higher quality stream. If it's just the hardware holding it back, I can understand that, but if my internet isn't going to allow for anything higher, then I am just royally hosed then.
 

MattR

New Member
Here is the most recent log

2014-04-01-1810-18

Code:
18:10:18: CLR host plugin strings not found, dynamically loading 4 strings
18:10:18: CLRHost::Initialize() attempting to load and start the .NET runtime (null)
18:10:18: CLRHost::Initialize() Found version v2.0.50727 .NET runtime
18:10:18: CLRHost::Initialize() Found version v4.0.30319 .NET runtime
18:10:18: CLRHost::Initialize() attempting to use v4.0.30319 .NET runtime
18:10:18: CLRHost::LoadInteropLibrary() load the assembly plugins\CLRHostPlugin\CLRHost.Interop.dll
18:10:18: CLRHost::LoadPlugins() attempting to load the plugin assembly CLRBrowserSourcePlugin
18:10:19: CLRHost:: Could not find/load browser settings at location C:\Users\Matt\AppData\Roaming\OBS\pluginData\browser.json
18:10:19: CLRHost::LoadPlugins() successfully added CLR plugin [Type: CLRBrowserSourcePlugin.CLRBrowserSourcePlugin, Name: CLR Browser Source Plugin]
18:10:25: Open Broadcaster Software v0.613b - 32bit (´・ω・`)
18:10:25: -------------------------------
18:10:25: CPU Name: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
18:10:25: CPU Speed: 3292MHz
18:10:25: Physical Memory:  4095MB Total, 4095MB Free
18:10:25: stepping id: 7, model 42, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
18:10:25: monitor 1: pos={1920, 0}, size={1600, 900}
18:10:25: monitor 2: pos={0, 0}, size={1920, 1080}
18:10:25: Windows Version: 6.1 Build 7601 S
18:10:25: Aero is Disabled
18:10:25: -------------------------------
18:10:25: OBS Modules:
18:10:25: Base Address     Module
18:10:25: 01280000         OBS.exe
18:10:25: 5E770000         OBSApi.dll
18:10:25: 5EBF0000         CLRHostPlugin.dll
18:10:25: 5E2D0000         DShowPlugin.dll
18:10:25: 5E0C0000         GraphicsCapture.dll
18:10:25: 5E0A0000         NoiseGate.dll
18:10:25: 5E080000         PSVPlugin.dll
18:10:25: ------------------------------------------
18:10:25: Adapter 1
18:10:25:   Video Adapter: NVIDIA GeForce GTX 560 Ti  
18:10:25:   Video Adapter Dedicated Video Memory: 1024917504
18:10:25:   Video Adapter Shared System Memory: 3221106688
18:10:25:   Video Adapter Output 1: pos={0, 0}, size={1920, 1080}, attached=true
18:10:25:   Video Adapter Output 2: pos={1920, 0}, size={1600, 900}, attached=true
18:10:25: =====Stream Start: 2014-04-01, 18:10:25===============================================
18:10:25:   Multithreaded optimizations: On
18:10:25:   Base resolution: 1920x1080
18:10:25:   Output resolution: 1280x720
18:10:25: ------------------------------------------
18:10:25: Loading up D3D10 on NVIDIA GeForce GTX 560 Ti (Adapter 1)...
18:10:25: ------------------------------------------
18:10:25: Audio Format: 44100 Hz
18:10:25: ------------------------------------------
18:10:25: Audio Channels: 2 Ch
18:10:25: Playback device Default
18:10:25: ------------------------------------------
18:10:25: Using desktop audio input: Speakers (Realtek High Definition Audio)
18:10:25: ------------------------------------------
18:10:25: Using auxilary audio input: Microphone (Blue Snowball)
18:10:25: ------------------------------------------
18:10:25: Audio Encoding: MP3
18:10:25:     bitrate: 128
18:10:25: Using bitmap image
18:10:25: Scene buffering time set to 700
18:10:25: ------------------------------------------
18:10:25: Video Encoding: x264
18:10:25:     fps: 24
18:10:25:     width: 1280, height: 720
18:10:25:     preset: veryfast
18:10:25:     profile: main
18:10:25:     keyint: 48
18:10:25:     CBR: yes
18:10:25:     CFR: yes
18:10:25:     max bitrate: 800
18:10:25:     buffer size: 800
18:10:25: ------------------------------------------
18:10:26: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:10:26: CLRHost:: Browser 1: Status message: 
18:12:12: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:12: CLRHost:: Browser 2: Status message: 
18:12:12: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:12: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:30: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:30: CLRHost:: Browser 3: Status message: 
18:12:31: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:31: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:53: CLRHost:: BrowserRenderHandler::OnPaint failed to create texture
18:12:53: CLRHost:: Browser 4: Status message: 
18:13:06: Total frames encoded: 3853, total frames duplicated: 6 (0.16%)
18:13:06: Total frames rendered: 3850, number of late frames: 1 (0.03%) (it's okay for some frames to be late)
18:13:06: 
18:13:06: Profiler time results:
18:13:06: 
18:13:06: ==============================================================
18:13:06: video thread frame - [100%] [avg time: 1.037 ms] [children: 16.3%] [unaccounted: 83.7%]
18:13:06: | scene->Preprocess - [3.66%] [avg time: 0.038 ms]
18:13:06: | GPU download and conversion - [12.6%] [avg time: 0.131 ms] [children: 7.81%] [unaccounted: 4.82%]
18:13:06: | | flush - [5.01%] [avg time: 0.052 ms]
18:13:06: | | CopyResource - [2.6%] [avg time: 0.027 ms]
18:13:06: | | conversion to 4:2:0 - [0.193%] [avg time: 0.002 ms]
18:13:06: Convert444Threads - [100%] [avg time: 0.508 ms] [children: 98.6%] [unaccounted: 1.38%]
18:13:06: | Convert444toNV12 - [98.6%] [avg time: 0.501 ms]
18:13:06: encoder thread frame - [100%] [avg time: 1.009 ms] [children: 0.297%] [unaccounted: 99.7%]
18:13:06: | sending stuff out - [0.297%] [avg time: 0.003 ms]
18:13:06: ==============================================================
18:13:06: 
18:13:06: 
18:13:06: Profiler CPU results:
18:13:06: 
18:13:06: ==============================================================
18:13:06: video thread frame - [cpu time: avg 0.486 ms, total 1872.01 ms] [avg calls per frame: 1]
18:13:06: | scene->Preprocess - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
18:13:06: | GPU download and conversion - [cpu time: avg 0.072 ms, total 280.804 ms] [avg calls per frame: 1]
18:13:06: | | flush - [cpu time: avg 0.032 ms, total 124.802 ms] [avg calls per frame: 1]
18:13:06: | | CopyResource - [cpu time: avg 0.016 ms, total 62.4 ms] [avg calls per frame: 1]
18:13:06: | | conversion to 4:2:0 - [cpu time: avg 0.004 ms, total 15.601 ms] [avg calls per frame: 1]
18:13:06: Convert444Threads - [cpu time: avg 0.388 ms, total 2979.62 ms] [avg calls per frame: 2]
18:13:06: | Convert444toNV12 - [cpu time: avg 0.38 ms, total 2917.22 ms] [avg calls per frame: 2]
18:13:06: encoder thread frame - [cpu time: avg 0.248 ms, total 951.606 ms] [avg calls per frame: 1]
18:13:06: | sending stuff out - [cpu time: avg 0 ms, total 0 ms] [avg calls per frame: 1]
18:13:06: ==============================================================
18:13:06: 
18:13:06: =====Stream End: 2014-04-01, 18:13:06=================================================
18:13:06: CLR host plugin instance deleted; removing dynamically loaded localization strings


Last game capture log:
2014-04-01, 13:27:07: we're booting up: 
13:27:07: CaptureThread: attached to process eso.exe
13:27:07: D3D9 Present
13:27:07: DXGI Present
13:27:07: DXGI: Found D3D 11
13:27:07: setting up d3d11 data
13:27:07: ---------------------- Cleared D3D11 Capture ----------------------
13:27:07: found dxgi format (dx11) of: 28, size: {1920, 1080}, multisampled: false
13:27:07: DoD3D11Hook: success
13:27:07: successfully capturing d3d11 frames via GPU
13:27:07: NV Capture available
13:27:07: FBO available
13:27:07: GL Present
13:27:07: (half life scientist) everything..  seems to be in order
15:47:17: stop requested, terminating d3d11 capture
15:47:17: ---------------------- Cleared D3D11 Capture ----------------------
15:47:19: DoD3D11Hook: success
15:47:19: successfully capturing d3d11 frames via GPU
 

FerretBomb

Active Member
Turn on Aero. It speeds up Window Capture. (And don't use Monitor Capture, as it's terribad and slow under Win7.)
You may want to swap to the 64-bit version of OBS, if you have a 64-bit OS. It's (slightly) faster.
Switch to AAC audio codec. It's better. MP3 is there as a 'fallback' method only, and will cause a deprecation point to be applied to your stream quality if streaming to Twitch.
800kbps is not enough for 720p video, even at 24fps (which only works for film due to analog motion blur). Downscale to 480p and try again.

That is also not a LIVE streaming session; there's no connection information. We need a log from an actual live streaming session to be able to help out any further.
 

MattR

New Member
okay, well i had 4 logs from today and I wasn't sure which one was the 4 hour stream i did. Here is the one that is HUGE compared to the other three.

http://pastebin.com/aBz3fK0d

It's too big to post.

THANK YOU FOR THE HELP!
 

Jack0r

The Helping Squad
Aero is disabled

Aero seems to be disabled, consider enabling it unless using monitor capture.

Monitor capture detected

One of your scenes appears to be using monitor capture. Monitor capture is the slowest and least efficient method of capturing, and can cause FPS lag on both your stream and your game and will also cause problems capturing full-screen games. Consider using game capture or window capture instead (this does not apply to Windows 8).

Slow sources detected

Some of your sources are taking a very long time to start or stop when changing scenes. If you use video devices such as a webcam, capture card, etc, add them as global sources to prevent this.
Fix these errors, and you should be good to go
 

MattR

New Member
Thank you for the help!

I have like 5 scenes.

1st is a graphic (Stream is starting soon) w/ follow alert
2nd is a monitor capture - i go to youtube and fullscreen a video opening for my stream
3rd is a graphic with a monitor capture that is scaled to a smaller size to continue to show the video from the 2nd scene
4rd is a graphic with a game capture, this is where i'm at most of the time
5th is a graphic (Stream will be back soon)

So per your tips:

Would a monitor capture in a previous scene be affecting the FPS of another scene that doesn't have the monitor capture?

I could change my Monitor captures to Screen Captures, I feel confident I could do that. And then I could enable Aero. But isn't Aero like a Windows Theme thing? How would it improve my FPS?

I'm not using a Capture Card, and my webcam is a Global Source.

Thank you again for the tips! It means a lot that people put work into something they didn't have to. So THANK YOU!
 

MattR

New Member
I changed Monitor capture to Screen Capture but when I full screen the YouTube video, it only shows a black screen. YUCK!
 

MattR

New Member
Still had problems with the Screen Capture and black screen, but overall, the stream was a lot better! There wasn't a single case of skipping frames or freezing!

The changes I made, according to Twitch's site, was to raise my FPS from 24 to 30, and raise my bitrate from 800 to 1800 (i believe). I also made the monitor captures screen captures (but didn't have much success with full screen YouTube showing up in them). Overall, great improvement!
 

Jack0r

The Helping Squad
Ah if you use Window Capture, you have to make sure to select the correct Window. For example if I fullscreen a Video in chrome the window to capture is just called "chrome". And in my test I had to uncheck and check the source once to get it captured.
In general I would probably download the video beforehand and play it in a media player that can easily be captured or even using the Video Source Plugin.
 

MattR

New Member
Uncheck and check the source, that's probably what I needed to do. Because once I had de-fullscreen'd it, Chrome wasn't showing up as an option, even when I clicked on the refresh button. I guess unchecking and checking the source would have fixed it.

And I did think about downloading the video beforehand. It's just a 2 minute video so I may do that.

Thank you so much!
 
Top