INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Video Stuttering Issues  (Read 1199 times)

tehas

  • Recent member
  • *
  • Posts: 5
Video Stuttering Issues
« on: September 14, 2023, 05:57:03 pm »

Hello,
I’m a new JRiver user running MC31, build 43.
I have an infuriating video stuttering issue that I haven’t been able to resolve. The video playback skips 3-4 frames every 4 seconds or so. This is noticeably irritating. Pardon the details below, it also serves as my debug notebook

I use JRVR, but the problem is highly unpredictable – it occurs always at High settings, and often occurs on Medium settings as well. I haven’t tested low settings.
I’ve already tried the following with no improvement:
    1. The ‘Taming Windows Defender’ Thread – excluded jriver folders, exes, dlls, excluding the source files, turned realtime protection off during the testing, etc.
    2. Nvidia control panel settings – prefer max performance, and Vsync ON. Rest are defaults.
    3. Nvidia drivers – currently using 517 studio driver, latest 536 studio driver has the same issue, but more ‘repeated’ frames.
    4. The source files are on a NAS over wifi, but the issue reproduces on local files too (and I’m using local files for testing)
    5. Changed power supply to a brand new 1kW supply (from old 550 W)
    6. Dusted the PC, reseated GPU
    7. Changed RAM sticks, and slots, increased RAM to 12GB, decreased to 4GB.

I also monitored the GPU temp, it was stable in the 50s Celsius. No overheating. There is no overclock or underclock, all settings are stock on the GPU.

Following is a list of configuration information:
My HTPC is a bit dated (from 2018) and is configured as:
    • Intel Pentium G4650 (2 core, 4 thread, Kaby Lake)
    • 8GB DDR4-2400 RAM (single channel)
    • 120GB SATA SSD
    • MSI Geforce GTX 1050 OC (2GB Vram)
    • Win10 22H2

From monitoring the OSD during playback, typical frame render times are 5-15ms average, and 20 ms peak. Every few seconds, I see a 180 ms peak. At 24 FPS, we have a frame every 40ms, so a 180ms peak would correspond to 4 dropped frames.
I attempted to figure out what my PC was doing during that time and ran an ETW trace.

Looking at the GPU work, we see the problem:
<See GPUWork.png>

We see spikes of GPU work every 40 ms or so, corresponding to a frame, and then a large gap which is likely the dropped frames. The blue bits are memory transfers.
I first looked at why JRiver isn’t submitting any work to the GPU and found that it had been switched out because its waiting on the GPU being available:
<See BadEvents.png>

The provider here is Microsoft-Windows-DxgKernel (image snipped for brevity)

I’m guessing here that JRiver needs some sort handle to a display device, which it is asking for but not getting and going to sleep in the interim. Please correct me if this is mistaken.


During this time, the thread that’s running is called with the following stack (precise usage):
<See HogCallStack.png>

And it spends most of its time here (sampled usage):
<See HogSamples.png>

The way I’m reading this (as a total noob) is that for some reason the memory allocations (for whom? The device? A particular process using the gpu?) are destroyed, and then recreated, and we hit page faults during the recreation, causing the extended delay.
Does this sound about right? Is this a ‘normal’ process during GPU usage? If not, why might this be occurring?


A cursory look at a ‘good’ trace, on medium settings, doesn’t seem to hit this pattern – media center calls GetDeviceState only at the start of video playback, and never again till its done. VIDMM* functions are in only ~50 samples across a 30 second trace, as opposed to 170 samples every 4 seconds.

I also ran a bunch of benchmarks on this machine (furmark, unigine superposition) and the results are roughly 30-50% lower than expected for this machine. The same stuttering is visible. So this is extra confirmation that jriver is not the issue. But I still hope someone here can help me !

PS: this analysis might be completely off the rails or full of nuts because I’m not an expert in windows, direct X or anything GPU related.

Coming to my questions:
    1. Is this PC sufficient to run JRVR with 4k input and output on the ‘High’ Preset? ‘Medium’ preset?
    2. Can you please help point me in the right direction for debug? Could this be a hardware bug? Some setting I’m missing? Any ideas whatsoever?
Thanks!
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943
Re: Video Stuttering Issues
« Reply #1 on: September 14, 2023, 06:22:21 pm »

On a first glance my thought would be that 2GB VRAM is quite a narrow margin for 4K video.

Otherwise, what you can attempt is to override the power management in the NVIDIA control panel. Using "maximum performance" can help with overcoming bad power management decisions by the driver, causing the GPU to sleep too much and not waking up fast enough when its needed.
Logged
~ nevcairiel
~ Author of LAV Filters

tehas

  • Recent member
  • *
  • Posts: 5
Re: Video Stuttering Issues
« Reply #2 on: September 14, 2023, 06:32:21 pm »

I have overriden the power management - it is set to 'Prefer Maximum Performance' in the nvidia control panel (sorry, that's buried in the wall of text). Still has the issue.

Is the VRAM requirement variable based on quality settings? The infuriating part for me is that it is inconsistent - sometimes, I'll get through a 2 hour movie just fine with medium settings and no frame drops, sometimes it'll drop frames like the pattern I described. Its just easier to reproduce with high settings.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10943
Re: Video Stuttering Issues
« Reply #3 on: September 14, 2023, 06:50:10 pm »

One option you could try is in the JRVR advanced settings "Do not render to frame buffers". Its a bit of a sledgehammer method that disables features but cuts out any intermediate textures that require extra memory.
If that makes it work reliably, at least you have more information.
Logged
~ nevcairiel
~ Author of LAV Filters

Dan Ashford

  • Member
  • *
  • Posts: 1
Re: Video Stuttering Issues
« Reply #4 on: January 23, 2024, 03:32:03 pm »

tehas  I know this thread is 120 days old, but I managed to cure stuttering and distortion by, Tools>Options>Audio Device>Device Settings  Then move slider to the left towards 'More Skip Resistant'. Just saying. I'm no expert with MC.
Logged

tehas

  • Recent member
  • *
  • Posts: 5
Re: Video Stuttering Issues
« Reply #5 on: May 14, 2024, 02:20:07 am »

Appreciate the response Dan. I ended up building a new HTPC which removed stuttering  ;D
Logged
Pages: [1]   Go Up