3-5 seconds black screen after opening MPEG-4/XVID

Your log starts at 21:57 so that didn’t narrow it down much :grin:

Set your UI to 1080p first off…

More Info

We recommend people with 4K TVs set their user interface (UI) to 1080p. Kodi’s UI is not optimized for 4K yet and this can put unnecessary demands on your device and can lead to a suboptimal picture quality, as well as potentially cause other issues.

The settings we recommend are as follows…

Settings>System>Display>Resolution> 1920x1080p
Settings>System>Display>Whitelist> (empty) *
Settings>Player>Videos>Adjust display refresh rate>Always or On start/stop

Some televisions may also need, or benefit from, the following being set…

System>Display>Force 4:2:2 colour subsampling> (enable)

With the above settings your UI will be output in Full HD and your 4K content will be output in 4K.

*Information regarding the whitelist can be found here. If you have any doubt, feel free to upload some logs so we can verify that your settings are indeed correct.

And removing that very large read factor from your advancedsettings may help a little as well. But as far as the video starting before the refresh rate switching has finished you can fix that by setting a time to delay playback in settings>system>display>delay after change of refresh rate>. If you mostly play content that has a particular refresh rate you can also set your UI’s refresh rate to whatever that is to limit how often it has to change.