Changing media source path while hidden causing render lag

noizeproxy

Member
I'm running a 14900K, 4090 Gaming Trio, and 128gb of RAM, yet I still work really hard to try to decrease my load in OBS. For my alerts, I use a media source with a dynamic mask from a text layer to create a cool bg for the text itself. I also have a lot of movement happening during the alert, and at the end of the movement, the sources are hidden. The problem occurs when I have Streamerbot change the media source to another video (while it is turned off). I am dropping 1-5 frames each time that happens.

I thought having the source inactive would help, but it hasn't. I also thought keeping the file sizes really low (each video is between 300-500 KB). It's a fairly simple code in Streamerbot that just grabs a random video file from a folder path I assign. I've tried adding a delay inbetween the processes as well, but it still drops frames right when the file is changed.

Anyone experience this or know a workaround? It's not the end of the world, I can just refrain from changing the file, but it seems like such a silly reason to take a hit in quality... especially when I have the system I do, and I've done everything I can in every other way to optimize.

Any help would be much appreciated!
 

bcoyle

Member
I'm running a 14900K, 4090 Gaming Trio, and 128gb of RAM, yet I still work really hard to try to decrease my load in OBS. For my alerts, I use a media source with a dynamic mask from a text layer to create a cool bg for the text itself. I also have a lot of movement happening during the alert, and at the end of the movement, the sources are hidden. The problem occurs when I have Streamerbot change the media source to another video (while it is turned off). I am dropping 1-5 frames each time that happens.

I thought having the source inactive would help, but it hasn't. I also thought keeping the file sizes really low (each video is between 300-500 KB). It's a fairly simple code in Streamerbot that just grabs a random video file from a folder path I assign. I've tried adding a delay inbetween the processes as well, but it still drops frames right when the file is changed.

Anyone experience this or know a workaround? It's not the end of the world, I can just refrain from changing the file, but it seems like such a silly reason to take a hit in quality... especially when I have the system I do, and I've done everything I can in every other way to optimize.

Any help would be much appreciated!
I have no experience with streamer bot, but it seems that obs gets busy loading in the new file. Since you have 128g memory, i assume that you are running the new files off a SSD. So suppose you lose 5 frames at 30fps, thats about 5x30ms or 150 ms. So what is obs doing during that time. It's reading in the file into local memory. SO is the time for the disc read or preparing the video for rendering. I don't know. But if it is disk read time, you might think about this: Ram drive

A virtual disk drive in memory is a RAM drive, which is a software program that allows a computer's RAM to be used as a disk drive:



  • How it works
    RAM drive software allows a portion of a computer's RAM to be used as a disk drive, with a volume name and sometimes a drive letter.
  • Benefits
    RAM drives are faster than hard drives and other storage media, and can be useful for high-performance applications.

  • Drawbacks
    RAM drives are volatile, meaning they are destroyed when a computer is shut down or crashes.

  • How to create a RAM drive
    You can use a program like AMD Radeon RAMDisk to create a RAM drive. You'll need to specify the size of the disk you want to create, which will be created from the available RAM in your computer.

  • How to use RAM drive data
    You can copy data between a RAM drive and conventional mass storage to preserve it when the computer is powered down and load it again when it starts up.

    RAMDisk software creates a virtual drive using the available main memory (RAM) in your computer. The performance of a RAMDisk, in general, is orders of magnitude faster than other forms of storage media, such as an SSD (up to 100X) and hard drive (up to 200X).

  • I have no idea if this will make any difference. You have lots of memory, so you can create big ramdrives and put the critical files in that?

  • Does this make any sense?
 

noizeproxy

Member
I have no experience with streamer bot, but it seems that obs gets busy loading in the new file. Since you have 128g memory, i assume that you are running the new files off a SSD. So suppose you lose 5 frames at 30fps, thats about 5x30ms or 150 ms. So what is obs doing during that time. It's reading in the file into local memory. SO is the time for the disc read or preparing the video for rendering. I don't know. But if it is disk read time, you might think about this: Ram drive

A virtual disk drive in memory is a RAM drive, which is a software program that allows a computer's RAM to be used as a disk drive:



  • How it works
    RAM drive software allows a portion of a computer's RAM to be used as a disk drive, with a volume name and sometimes a drive letter.

  • Benefits
    RAM drives are faster than hard drives and other storage media, and can be useful for high-performance applications.


  • Drawbacks
    RAM drives are volatile, meaning they are destroyed when a computer is shut down or crashes.


  • How to create a RAM drive
    You can use a program like AMD Radeon RAMDisk to create a RAM drive. You'll need to specify the size of the disk you want to create, which will be created from the available RAM in your computer.


  • How to use RAM drive data
    You can copy data between a RAM drive and conventional mass storage to preserve it when the computer is powered down and load it again when it starts up.

    RAMDisk software creates a virtual drive using the available main memory (RAM) in your computer. The performance of a RAMDisk, in general, is orders of magnitude faster than other forms of storage media, such as an SSD (up to 100X) and hard drive (up to 200X).

  • I have no idea if this will make any difference. You have lots of memory, so you can create big ramdrives and put the critical files in that?

  • Does this make any sense?
this all sounds great, but it also sounds like the kind of thing i would totally screw up, and potentially make things worse for myself. not that your idea isn't the right call or a good fix for me. i just don't trust myself with something like that.
 

noizeproxy

Member
I have no experience with streamer bot, but it seems that obs gets busy loading in the new file. Since you have 128g memory, i assume that you are running the new files off a SSD. So suppose you lose 5 frames at 30fps, thats about 5x30ms or 150 ms. So what is obs doing during that time. It's reading in the file into local memory. SO is the time for the disc read or preparing the video for rendering. I don't know. But if it is disk read time, you might think about this: Ram drive

A virtual disk drive in memory is a RAM drive, which is a software program that allows a computer's RAM to be used as a disk drive:



  • How it works
    RAM drive software allows a portion of a computer's RAM to be used as a disk drive, with a volume name and sometimes a drive letter.

  • Benefits
    RAM drives are faster than hard drives and other storage media, and can be useful for high-performance applications.


  • Drawbacks
    RAM drives are volatile, meaning they are destroyed when a computer is shut down or crashes.


  • How to create a RAM drive
    You can use a program like AMD Radeon RAMDisk to create a RAM drive. You'll need to specify the size of the disk you want to create, which will be created from the available RAM in your computer.


  • How to use RAM drive data
    You can copy data between a RAM drive and conventional mass storage to preserve it when the computer is powered down and load it again when it starts up.

    RAMDisk software creates a virtual drive using the available main memory (RAM) in your computer. The performance of a RAMDisk, in general, is orders of magnitude faster than other forms of storage media, such as an SSD (up to 100X) and hard drive (up to 200X).

  • I have no idea if this will make any difference. You have lots of memory, so you can create big ramdrives and put the critical files in that?

  • Does this make any sense?
Also, just looked into RAMDisk... unfortunately, it would not work for me since I'm running Windows 11
 

bcoyle

Member
Also, just looked into RAMDisk... unfortunately, it would not work for me since I'm running Windows 11
NP. Just skybluing. It's hard to invest your time in a skyblu if you don't know for sure if it will work. Anyway, hope it works out for you
 

noizeproxy

Member
A little update:

Last night, I was testing alerts again, tinkering with settings like I did before. I like to disable/hide sources after alerts run to save resources, and a lot of times I do that via the Move plugin, just changing the Visibility to "hide at the end of movement". But I noticed that I was getting drops when that happened. The last thing I thought was that turning OFF a source would be an issue. lol

Anyways, out of curiosity, I tried unchecking "Close file when inactive" on the media sources that were being an issue, and that fixed it. It not longer drops frames when I turn on or off the source before/after the alert sequence.

I need this to make sense. I'm so confused. I have ALWAYS checked "Close file when inactive" because that makes sense. I don't need a million media sources running in the background.

Just to be clear, my issues are so minimal. We're talking 1-5 skipped frames out of tens to hundreds of thousands. But It still bothers me, because I see the spikes, and I notice the blips in the picture, so I want to fix it. I also want to understand it, and i need to make sure I'm not painting myself into a corner with any tweaks to my setup down the road.
 

rockbottom

Active Member
Overhead reduction is a beautiful thing.....

Post a log when you get a chance, I'll take a look when I get back in a few hours.
 

noizeproxy

Member
Overhead reduction is a beautiful thing.....

Post a log when you get a chance, I'll take a look when I get back in a few hours.
here's the log from yesterday. i zipped it because it was too large to upload here.

A few things...

I would skip to line 11000, that's about where I started tweaking these settings.

But this is the first time I'm looking at the logs in a while, and I am getting A LOT of "warning: EOI missing, emulating".
I then noticed something interesting...
I'm always skipping at least a few frames when I switch to my "***MAIN***" scene. This is what I'm seeing in the logs...
02:27:38.813: User switched to scene '***MAIN***'
02:27:38.938: warning: deprecated pixel format used, make sure you did set range correctly

Then I saw this...
02:23:43.105: warning: is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.

and this caught my eye as well...
02:24:52.226: error: mjpeg: unsupported coding type (c6)

happens more than once for sure.

So would updating ffmpeg help with this? Are these issues related?
 

Attachments

  • 2025-01-06 14-47-47.zip
    82 KB · Views: 4

noizeproxy

Member
I think, mentioned errors are from Media source of OBS. Better to not touch OBS libs without special development needs. If media cannot be read by default, better to convert media.


Why?
Just in case, list of RAM drives:
AMD’s showed no support for Windows 11. Is there one you would recommend? ImDisk? And are there any resources to educate me on how it works/how to troubleshoot? I think it’s a great idea, but I get nervous about stuff when you can’t find a ton of info on it. I had a guy try to “tweak” my bios settings onetime and I had to wipe my system the next day… just being cautious.
 

rockbottom

Active Member
Yeah, there's lots of errors in there, going to ignore most of them for now & I have not looked at your plugins. Resources are being wasted no doubt. Already helped with the Media Source errors, try to find them & fix, remux or remove them.

Let's try to reduce load to get rid of the rendering lag.

Disable them.
14:47:47.992: Game Bar: On
14:47:47.992: Game DVR: On

Run your capture monitor @ 120HZ, secondary monitor @ 60HZ.

Almost if not all of your Media Sources are using Hardware Accelerated Decoding. Not good, disable it for all of them.
14:47:51.012: is_hw_decoding: yes

Test.

03:24:32.482: Blocked loading of '\coresync_x64.dll' 9 times.
03:24:32.483: Number of memory leaks: 139
 

rockbottom

Active Member
DDR5

From my testing (12900k/3090), running (2) sticks with XMP enabled is the way to go. I have (2) G. Skill Trident Z 16GB sticks sitting on my desk for emergency replacement.
 

noizeproxy

Member
DDR5

From my testing (12900k/3090), running (2) sticks with XMP enabled is the way to go. I have (2) G. Skill Trident Z 16GB sticks sitting on my desk for emergency replacement.
DDR4
i have XMP enabled.

Also, I swear I thought Game Bar and DVR were disabled, so to make sure I disabled in regedit and restarted.
Looking through media sources now to uncheck hardware encoding... thing is, I only have a few, and I use streamerbot to change the media path at given times. My last obs setup had HUNDREDS of media sources with hardware encoding enabled, and I had zero issues...

Just find it weird. Feels like there's something else going on there, you know?
 

rockbottom

Active Member
Yeah, DDR4 is fine with (4) but don't try it if you ever get 5/

I counted over (50) Media Sources, all of them are using hardware decoding. Every one of them is being rendered by your GPU....
 
Top