When playing videos like movies with the Kodi media center, the videos often have lots of glitches. I tried it with the VLC player, MPV and DragonPlayer on Debian11/KDE and it occurs with all of these and only if the video is played in fullscreen (details below).
With glitches I'm referring to some kind of "cuts" or "lines" - a form of "screen tearing", but looking different than in many images about this (not just large lines but smaller, all over and milder).
Edit: Disabling "Allow applications to block compositing" in Display Configuration -> Compositor solved this as did switching to Wayland. I may test further. One can switch to Wayland by logging out and choosing "Plasma (Wayland)" in the upper left.
-> Why was it getting blocked in fullscreen and why was neither of the two solutions set as the default option in Debian11/KDE (if required, the used hardware, configured settings and even running processes could be checked to make either the default option if that's apparently needed for proper video playback...and maybe there are additional settings that would improve video playback e.g. when not having a dedicated graphics card)?
it does not occur with all files, only some
when recording it with screenrecorder the recorded video doesn't have these glitches
it does not occur when playing the file in the window mode of the media player...even if the image is as large as the fullscreen one (only parts of the two black bars at the top and bottom are not shown when playing it windowed instead of fullscreen)
it is worst with MPV and Dragonplayer has least of these glitches (all at fullscreen)
VLC is a bit better with these glitches than MPV (only sometimes but I changed the default player to an external player in Kodi due to this; first to MPV then to VLC). Strangely, a test video just played without glitches at fullscreen which still show in MPV and showed in VLC earlier. Now the video in VLC is too dark even though I haven't changed the config and it didn't look this way when I played the same video in VLC earlier. It does not make a difference if I use
vlcto launch the video. I also just tried Dragonplayer and no glitches are shown there currently but it's too bright (probably mostly Gamma issues).
First I thought it may be caused by some missing graphics drivers / graphics card or even codecs but as this occurs at fullscreen but not in the windowed mode (same video-image size) it appears to be caused by something else...probably my monitor or display-related things as I can't record it. It's a very strange but annoying problem (many video files are barely watchable due to this). Debian11 currently uses X11 v1.20.11 by default.
There is no new console output of MPV when these glitches are shown. It does display:
AO: [pulse] 48000Hz 5.1(side) 6ch float VO: [gpu] 1920x1080 => 2592x1080 yuv420p
=> 2592x1080 part is not displayed for other videos so it may be relevant.
I recently had to restart KDE Plasma so in another console window its output displayed during playing the video. It may not be relevant and is (duplicate lines removed):
libpng warning: iCCP: known incorrect sRGB profile qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect. qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 29557, resource id: 0, major code: 53 (CreatePixmap), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 29558, resource id: 35652120, major code: 55 (CreateGC), minor code: 0 qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect. qt.qpa.xcb: QXcbConnection: XCB error: 4 (BadPixmap), sequence: 29941, resource id: 35652124, major code: 54 (FreePixmap), minor code: 0 qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 29942, resource id: 35652125, major code: 60 (FreeGC), minor code: 0 qt.svg: <input>:406:376: Could not add child element to parent element because the types are incorrect. Exiting... (Quit) qrc:/plasma/plasmoids/org.kde.plasma.volume/contents/ui/main.qml:494:39: QML StreamListItem: Binding loop detected for property "width"
Any ideas and tips what to check or try are very much appreciated.