Solved CWinSystemWin32::OnDisplayLost
#1
Hello experts,

I am experiencing difficulties with video playback in conjunction with display rate change.

My settings:
+ fullscreen
+ 6s delay after display rate change
+ display rate change on start
+ initial display rate is 60Hz

This is what happens:
+ start a video on youtube 
+ display refresh rate changes as expected
+ after delay, video plays for about 2-3s
+ playback gets interrupted, display goes blank
+ display returns
+ playback resumes after about 2 more seconds

This happens on ca. 75% of all playbacks. With display rate change off, playback is uninterrupted.

My resolution whitelist:
Generic PnP Monitor #1: 1920x1080 @ 60.00Hz
Generic PnP Monitor #1: 1920x1080 @ 59.94Hz
Generic PnP Monitor #1: 1920x1080 @ 50.00Hz
Generic PnP Monitor #1: 1920x1080 @ 30.00Hz
Generic PnP Monitor #1: 1920x1080 @ 29.97Hz
Generic PnP Monitor #1: 1920x1080 @ 25.00Hz
Generic PnP Monitor #1: 1920x1080 @ 24.00Hz
Generic PnP Monitor #1: 1920x1080 @ 23.98Hz

I found this thread and tried the suggested soliution, with no improvement. 
https://forum.kodi.tv/showthread.php?tid...isplayLost

Normal videos play back without interruption. However i see CWinSystemWin32::OnDisplayLost events so I included the logs for this as well.

Test case 1: fullscreen window
https://paste.kodi.tv/fasinavoma.kodi

Test case 2: true fullscreen
https://paste.kodi.tv/jireqezabi.kodi

Test case 3: normal video (movie) playback
https://paste.kodi.tv/ikowubisuz.kodi

Test case 4: display rate change off
https://paste.kodi.tv/jiraxapofa.kodi

I hope you can help. Cheers!
Kodi 20.4.0
Windows 11 Pro 23H2
Intel Core i3-10100
Intel UHD Graphics 630
Reply
#2
Have a read of this: https://github.com/anxdpanic/plugin.vide...issues/336

TLDR: YouTube doesn't accurately identify the actual framerate being used and the plugin defaults to using fractional framerates. This will never be correct 100% of the time, but you can change what the defaults are or only rely on Kodi determining what the framerate is by changing either of the following settings:

Code:
YouTube plugin > Settings > General > Stream features > Disable fractional framerate hinting

or

Code:
YouTube plugin > Settings > General > Stream features > Disable all framerate hinting
Reply
#3
Thanks, I will try that. 

What are your thoughts on the DisplayLost event? Does the display actually become lost during frame rate changes?
Kodi 20.4.0
Windows 11 Pro 23H2
Intel Core i3-10100
Intel UHD Graphics 630
Reply
#4
Pretty sure that is normal for a mode switch on your display
Reply
#5
I implemented your solution and it appears to work. The OnDisplayLost events are still present, but the interruption of the stream is gone.

Many thanks!
Kodi 20.4.0
Windows 11 Pro 23H2
Intel Core i3-10100
Intel UHD Graphics 630
Reply
#6
Thread marked solved.
Reply
#7
I'm afraid the problem is still there. It looked good for 10 streams or so, but it came up again.
Kodi 20.4.0
Windows 11 Pro 23H2
Intel Core i3-10100
Intel UHD Graphics 630
Reply
#8
As mentioned before it will never work 100% of the time. It depends on the framerate of the videos you are watching and how/when this is detected, because the framerate information provided by Youtube is not accurate.
Reply
#9
I was able to get stabile playback by disabling the usage of InputStreamAdaptive in the YouTube addon, by now ca. 30 streams with 24, 25 and 30 fps so far with no dropouts.
Kodi 20.4.0
Windows 11 Pro 23H2
Intel Core i3-10100
Intel UHD Graphics 630
Reply

Logout Mark Read Team Forum Stats Members Help
CWinSystemWin32::OnDisplayLost0