Closed stebotron closed 6 years ago
Does it happen in other WM?
Number 1 happens only in KDE, there is no such issue in LXDE. Number 2 happens both in KDE and LXDE.
xdotool getwindowfocus getwindowname
.htop -d1
. Although it works well on 8y.o intel i3I tried to remove completely section "# hide subs when mpv isn't in focus or in fullscreen" with "xdotool getwindowfocus getwindowname". No effect at all. Problem remains.
CPU usage < 10%, /tmp is in the ram. Anyway, just wanted to let you know, that there is such problem with video stuttering with different WM.
Can't reproduce, so there's nothing I can help you with besides as I've said previously - try another composite manager. If you'll find a solution - be sure to post it.
Stuttering is rather subtle, and can be clearly seen only in dynamic scenes, maybe you are just not noticing it? I tried kwin manager in KDE and compton composite manager in LXDE. Both have stuttering. Just tried xcompmgr, small stuttering remains. Missing subtitles only with kwin.
Maybe try xcompmgr. Idk. Because your description suggest that your composite manager can't handle it. Try changing rendering backend. I might be mistaken, but I vaguely remember something similar with other C.M. back when I wrote interSubs.
Believe me, if there was some stuttering at my system, I would've noticed.
p.s. You can always use Tk version. It doesn't need C.M.
By the way in KDE when "extend_subs_duration2max_B = False" there are no problems with missing subtitles, only when "extend_subs_duration2max_B = True". This is very strange. Anyway, thanks for your help and very useful software!
I solved stuttering by changing video output in mpv from vdpau to gpu (mpv -vo gpu). Problem with missing subtitles when extended duration in kde still remains.
As I've suggested in previous message, have you tried changing rendering backend at kwin? Or simply switch from kwin to other C.M. (if it's possible in KDE)
Yes, I tried all, xrender, OpenGL 2, OpenGL 3.1, disabling vsync, no effect. I just disabled extended duration, this is not so important. I can switch to openbox+compton instead of kwin while running KDE, then I don't have missing subtitles, kind of a solution, but I don't see the point to do so. I stay with kwin and without extended duration for now. Maybe I'll find a solution with time other then switching from kwin to something else.
Solved missing subtitles with extended duration by adding small delay "time.sleep(0.1)" in "def render_subtitles" after the line "self.clearLayout('subs2')" (line 1452 in current version).
Strange. But since it works for you - good. See if it works with sleep(0.01) - it should be plenty. 100ms is quite noticeable delay with subtitles.
It seems to me that self.clearLayout without delay was applying right after new subtitle appears. Maybe it is too slow (if kwin is used) or called a little later then necessary for some reason. Short (few words) subtitles where missing much more often, maybe because they are faster to render and they are rendered before self.clearLayout apply? At least that is what I thought when I added this line. I haven't understood the logic of the program completely yet. Sleep(0.01) work just fine too. Thank you.
Sometimes every second or third (I haven't really noticed any system) subtitle is not displaying (or invisible to be exact, since I can translate "invisible" words with cursor over them) if "extend_subs_duration2max_B = True". Such "invisible" subtitles appear for a fraction of second and then become invisible.
Video stutters a little on subtitle change, but this is noticable and quete annoying.
System: ArchLinux, Python 3.7.1, KDE plasma 5.14.2