Question / Help Threadripper Encoder Issues

JKYJustin

New Member
Hey everyone, I am just looking for some guidance on an issue, seeing that Google has yet to give me an answer.

Using the latest OBS, I am only interested in using the x.264 Encoder for my live streams, give that my Threadripper 1950x should handle medium settings for 1080p 60fps without any issue.

And that is where the problems begin. I find my PC suffering unplayable stuttering while Live streaming in said encoder settings, even at higher bitrate, being an Affiliate in twitch, Viewer quality settings can be adjusted for the high bitrate.

For more info, I am running the 1950x on an Asus Zenith Extreme mobo, 16gb Patriot 3000mhz RAM, GTX1080TI, along with all the other needed peripherals being 2560x1440 monitor, etc.

NVENC Runs like a champ at those settings though it defeats the purpose of having so many cores. Although i set affinity to use half the cores in OBS, still the issue persists.

So, some guidance would be amazingly awesome :D (Yep i went there)

https://gist.github.com/e3678abd2c6addbe4d4a2e4ef064bf18
 
Last edited:

c3r1c3

Member
1. Don't put a Display capture and Game capture in the same scene.
2. Run OBS as Administrator.
3. Don't bother with setting Affinity.
4. Make sure that Windows 10 Game mode is disabled (if you have any anti-virus, make sure it's disabled in there as well).
5. If you do all of that and still have trouble, please post a log with profiling info:

Please post a link to a clean log with profiler information. First restart OBS, then start your stream/recording for ~30 seconds and stop it again. Make sure you replicate any issues as best you can, which means having any games/apps open and captured, etc. When you're done, close OBS, Open OBS, and select Help > Log Files > Upload Last Log File. Copy the URL and paste it here.
 

NoTick

New Member
I have a suspicion your issue may actually be the same as mine. I don't believe you're having issues encoding at all, but rather the 'capture' plugins don't know how to handle the high core/thread count of the threadripper.

(https://obsproject.com/forum/threads/obs-preview-obs-fps-drop-unless-outside-of-game-window.73713/)

Could I convince you to test my theory? I'd love to have a second data point with a similar build to my own. If two or three of us experience the same thing -- then it solidifies that it's not a localized PC issue, but a wider-spread issue.

You can test this theory of mine by following and observing the below:

For this test: DO NOT stream or Record - just let OBS stay open -- we want to observe the stats at the bottom of the window.
  • Open OBS (as administrator -- which is always suggested)
  • Set down-scaling in 'output' tab only (as you shouldn't need the GPU to do anything with such a beastly CPU...)
  • Open game of choice (I used Overwatch -- specifically the test range)
  • Make sure a 'capture' is enabled (E.g. Display/Game capture) and Game is visible in preview
  • Watch the STATs at the bottom of OBS window where FPS is listed and run around in Game
If my theory is right -- you'll see the FPS meter at the bottom of OBS's window dropping quite a bit while inside the game, and the OBS preview will be noticeably lagged. When you alt-tab out of the game, you'll notice the FPS meter stabilize at 60 and not move -- and the game will be perfect in OBS's preview. Then, clicking back into the game, you'll notice it goes unstable again.

\\---------------------------------------------------------------------------------------------------------------
Here's a couple VODs of me streaming w/the bottom of the OBS window visible so you can see what I'm describing...

https://www.twitch.tv/videos/171067491
https://www.twitch.tv/videos/171068710
 

NoTick

New Member
Well... I figured out my problem.

I had two sources that had Animated Gifs inside... Which was causing my FPS to drop like mad.

May want to verify you don't have any with some form of animated image.
 

c3r1c3

Member
Videos (with and without Alpha) work fine in OBS. GIFs I've seen can cause issues, but I don't know what turns a good GIF into a bad one.
 

NoTick

New Member
Another discovery today while fiddling...

Changing the memory distribution on AMD Ryzen Master from 'Distributed' to 'Local' removed all encoding issues I was seeing as well. (I used Profile 1 -- and just turned it to 'Local' and saved.)
 

NoTick

New Member
Totally agree c3r1c3. I knew about this walking into the 1950x -- but I didn't think it would affect live encoding.

It's supposed to distribute cache memory or keep it localized on it's own adjoining die... What I, personally, experienced is the load (which I couldn't seem to load more than 16 threads) would split to every other thread. (So, most likely Thread 1 of every core on the CPU).

When I switched the memory distribution to 'LOCAL", it moved the encoding load to a group of 16 threads instead. In my case, threads 16 thru 32. So - in reality, it put the load all on one of the two CPU Die's.
 

c3r1c3

Member
It might not just be threads/CPU locality. It could also be PCIe+CPU+Cache locality. OBS frames up things on the CPU, then uploads it to the GPU, adds the GPU-based sources (directly on the GPU, i.e. no downloading to the CPU), then composites it on the GPU and then downloads the composited frame to the CPU for encoding.

So I could see few potential places where lower fps in OBS can happen because of pushing data back-and-forth across the 2 CPU dies/PCIe busses/non-local caches. I also don't have much info on the PCIe subsystem (although if I had an TR/Epyc system in my hands, I could try to find out).

So can I prove any of this right now? No, I don't have a Ryzen or Epyc or Threadripper CPU to test against at this time.
 

dilutedspine

New Member
I have a suspicion your issue may actually be the same as mine. I don't believe you're having issues encoding at all, but rather the 'capture' plugins don't know how to handle the high core/thread count of the threadripper.

(https://obsproject.com/forum/threads/obs-preview-obs-fps-drop-unless-outside-of-game-window.73713/)

Could I convince you to test my theory? I'd love to have a second data point with a similar build to my own. If two or three of us experience the same thing -- then it solidifies that it's not a localized PC issue, but a wider-spread issue.

You can test this theory of mine by following and observing the below:

For this test: DO NOT stream or Record - just let OBS stay open -- we want to observe the stats at the bottom of the window.
  • Open OBS (as administrator -- which is always suggested)
  • Set down-scaling in 'output' tab only (as you shouldn't need the GPU to do anything with such a beastly CPU...)
  • Open game of choice (I used Overwatch -- specifically the test range)
  • Make sure a 'capture' is enabled (E.g. Display/Game capture) and Game is visible in preview
  • Watch the STATs at the bottom of OBS window where FPS is listed and run around in Game
If my theory is right -- you'll see the FPS meter at the bottom of OBS's window dropping quite a bit while inside the game, and the OBS preview will be noticeably lagged. When you alt-tab out of the game, you'll notice the FPS meter stabilize at 60 and not move -- and the game will be perfect in OBS's preview. Then, clicking back into the game, you'll notice it goes unstable again.

\\---------------------------------------------------------------------------------------------------------------
Here's a couple VODs of me streaming w/the bottom of the OBS window visible so you can see what I'm describing...

https://www.twitch.tv/videos/171067491
https://www.twitch.tv/videos/171068710

I'm seeing exactly this same behavior with a 1950X while watching preview window without streaming. Sitting just on the window for PUBG my OBS is showing low 50s. If I click out of the window it goes back up to 60. I tried all things listed, including switching to Local from Distributed (this sounds like disabling NUMA on Xeon architecture). I even had gifs in window which I disabled as well.

I then started fiddling with video settings in PUBG. If I run the game on low with view distance at ultra it doesn't dip the preview window below 60. If I set post processing to medium it immediately drops to 50s. If I run the game at very low with ultra view distance I didn't see any drops. It seems like the most I can get away with is almost everything at medium but post-processing at very low and draw distance ultra.

I then tested with Rocket League and only saw a very minor drop once at the beginning of a training match. RL is a lot less GPU intensive so maybe that has something to do with it?

All tests were done with both windowed borderless and fullscreen but it didn't make much of a difference. I also test with the limit frame rate option checked for the game capture and removed all image files from all scenes in case that was causing issues.

I think my issue is GPU bottle-necking (GTX 1080). It seems like if I lower the graphics quality it becomes almost a non-issue. Anyone have any other advice or testing you'd like me to try let me know. I'd like to get this figured out as I never had this issue in the past when doing single system capture.
 

sam686

Member
If NVENC works fine but x264 have some problems...

1. Make sure your CPU is not overheating and slowing down (throttling). Check with windows 10 task manager's GHz and a temperature monitor program such as a downloadable HWMonitor.

2. Graphics card running PCI-E version 2.0 x8 or better? Check with a downloadable GPU-Z.

3. In OBS x264 custom settings, try threads=16 or less. The default x264 is CPU threads * 1.5 which might be too high for CPU having 32 threads. Too many x86 threads might harm quality when using constant bit rate mode, especially when trying to limit threads by affinity. Limit threads with x264 custom option, not affinity.
 

dilutedspine

New Member
Thanks for the response.

1. Make sure your CPU is not overheating and slowing down (throttling). Check with windows 10 task manager's GHz and a temperature monitor program such as a downloadable HWMonitor.

-This is happening without even running the stream. Just watching the preview window without encoding at all.

2. Graphics card running PCI-E version 2.0 x8 or better? Check with a downloadable GPU-Z.

-Should be PCI-E 3.0 but I'll check to make sure. It's for sure at least 2.0

3. In OBS x264 custom settings, try threads=16 or less. The default x264 is CPU threads * 1.5 which might be too high for CPU having 32 threads. Too many x86 threads might harm quality when using constant bit rate mode, especially when trying to limit threads by affinity. Limit threads with x264 custom option, not affinity.

-I set affinity within Windows to as low as 2 threads and to as high as 16 threads but I didn't try within OBS as last time I tried to use that setting a few months back on my old Xeon stream rig it didn't seem to work. I'll test tonight though I don't think it'll help since this is happening even before I encode.

It's funny because the stream will output 1080p60 no problems without frame drops on the encode but the frames OBS is able to capture from it's sources bounce all over the place so the stream looks terrible.
 

dilutedspine

New Member
So more tuning and testing I discovered that if I set the video scale to 720p, disable preview and frame limit games to 144fps it resolves the issue. Just seems like quite the compromise when I used to be able to do this without issue on my old 3770k box.
 

DKRecords

Member
Are you running quad channel ram? If not. That's your problem Threadripper require quad channel to get full performance. Running dual channel ram cuts performance significantly.
 

dilutedspine

New Member
I am running quad channel at at 3000mhz with loosened timings as I couldn't get the XMP profiles to be stable. I finally eventually gave up on the single gaming/streaming box dream and moved back to dual rigs since I couldn't stand the performance hit on both the stream and gaming experience.
 

DKRecords

Member
I am running quad channel at at 3000mhz with loosened timings as I couldn't get the XMP profiles to be stable. I finally eventually gave up on the single gaming/streaming box dream and moved back to dual rigs since I couldn't stand the performance hit on both the stream and gaming experience.
I am about to do the same. I have been having stutter issues on my 1950x Even streaming with Nvenc. Also I cant even watch a 60fps on youtube dont know why. I dropp tons of frames. Does yours?
 

dilutedspine

New Member
I am about to do the same. I have been having stutter issues on my 1950x Even streaming with Nvenc. Also I cant even watch a 60fps on youtube dont know why. I dropp tons of frames. Does yours?

I don't have issues with YouTube at all mostly just a ton of problems streaming and gaming on it at the same time. Definitely some GPU bottlenecks but sometimes just very strange issues with some games. Terrible hitching, input lag or other problems.

I'm chocking it up to first gen tech issues and moving on with my life. I'll eventually make it a dedicated stream rig as it seems to do fine with capture cards intaking the video.
 
Top