madshi bug tracker - madVR
View Issue Details
0000252madVRbugpublic2015-02-02 21:522015-02-11 15:34
bcec 
madshi 
normalminoralways
closedfixed 
Windows 7
v0.87.13
mpc-hc 1.7.8
lavfilters 0.63.0
lavfilters 0.63.0
Software
auto mode
no
Off
all modes
NVidia
GTX 960
347.25
0000252: Lip sync difference between different scaling profiles (NNEDI3 vs Jinc3AR)
I upscale all 1080p content to 2160p.
For deintFps < 26 I use NNEDI3 with 16 neurons
Everything else I use Jinc3AR
madVR also does refresh rate switching.

What I noticed is that NNEDI3 upscaling is has about ~150ms delay which causes lip sync issues. When I add that delay as a compensation to my AVR, I get lip sync issues for Jinc3AR as it doesn't need any delay introduced.

If no way to fix this, what would be great is if there was a way to introduce video lag for a given Scaling profile (so I could delay Jinc3AR playback a little so it matches the 150ms audio delay I have to add to my AVR for NNEDI3 usage.
No tags attached.
Issue History
2015-02-02 21:52bcecNew Issue
2015-02-02 22:08madshiNote Added: 0000694
2015-02-02 22:08madshiAssigned To => madshi
2015-02-02 22:08madshiStatusnew => feedback
2015-02-02 22:19bcecNote Added: 0000695
2015-02-02 22:19bcecStatusfeedback => assigned
2015-02-02 22:25madshiNote Added: 0000696
2015-02-02 22:25madshiStatusassigned => feedback
2015-02-02 23:14bcecNote Added: 0000697
2015-02-02 23:14bcecStatusfeedback => assigned
2015-02-03 08:23madshiNote Added: 0000698
2015-02-03 08:23madshiStatusassigned => feedback
2015-02-04 06:36bcecNote Added: 0000699
2015-02-04 06:36bcecStatusfeedback => assigned
2015-02-04 11:08madshiNote Added: 0000700
2015-02-04 11:08madshiStatusassigned => feedback
2015-02-11 15:33bcecNote Added: 0000705
2015-02-11 15:33bcecStatusfeedback => assigned
2015-02-11 15:34bcecStatusassigned => closed
2015-02-11 15:34bcecResolutionopen => fixed

Notes
(0000694)
madshi   
2015-02-02 22:08   
Does this occur in both windowed and FSE mode?
(0000695)
bcec   
2015-02-02 22:19   
yup, just double checked to confirm. Happens both in FSE and windowed mode.
(0000696)
madshi   
2015-02-02 22:25   
Are there any frame drops/repeats or presentation glitches counted in the debug OSD (ctrl+j)? Are all the queues decently filled?

Try disabling the "present several frames in advance" options in both windowed and FSE modes. Does that make any difference?

To be honest, I think chances are 90% that this is not a bug in madVR, but a bug in the audio side of things. As long as the queues are full and there are no frame drops I see no real chance of this being a bug in madVR. But of course I can be wrong. Have you tried a different media player? A different audio renderer? This is HDMI audio out of your 960, right?
(0000697)
bcec   
2015-02-02 23:14   
I don't see any drops. Its non-zero, but I believe those are introduced during refresh rate switch. Drop frames don't increase and I see "1 frame drop every 58 minutes (and counting up)".

Tried disabling "present several frames in advance" for both modes, but didn't make any difference.

I have not tried a different media player or audio renderer.

Correct, this is HDMI out of my 960, which is connected to my AVR.

But I think you are probably right saying that this is unlikely a madvr issue. To test it out, I removed the profiles so everything (regardless of fps) use jinc3ar. Yet I still see the same issue.
(0000698)
madshi   
2015-02-03 08:23   
You should get the same sync with Jinc and NNEDI3, though. If you don't, *something* is wrong. I just don't know what. madVR carefully displays each frame at the "right" time, regardless of which scaling algorithm you're using. So I don't see how there could be any difference between Jinc and NNEDI3. The only thing I can think of is that using NNEDI3 might put so much stress on the GPU that is somehow screws up audio, but that doesn't really make all that much sense to me, either.

After removing the profiles, do you still get *different* audio sync times with Jinc? Or the same now?
(0000699)
bcec   
2015-02-04 06:36   
Yeah even when I don't have any profiles (so every fps use jinc), I still see the different audio sync times.

I am not sure if it makes a difference, but I am comparing a 1080p23.976 video to a 1080i29.97 video (the latter run at 58Hz due to deinterlacing done by madVR). Could it be the deinterlacing somehow screwing up the sync?
(0000700)
madshi   
2015-02-04 11:08   
You could try to disable deinterlacing in madVR. Image quality will suffer, of course, but does it have an effect on lipsync? It shouldn't.

Are you sure that the lipsync issues don't come from the video itself?

You could try a different renderer to see if it has the same issues.
(0000705)
bcec   
2015-02-11 15:33   
tried disabling deinterlacing, but same problem. tried playing the same file on other computers, and no audio sync issue.

having said that, I've tried some other 1080i videos (that also have the same audio (DD5.1), and they seem to play in sync fine.

thanks for all the help, at this point, I think it is very likely that there is an issue with the particular file. I don't want to waste more of your time.