Rafostar / clapper

Level up your video experience with a modern and user-friendly media player.
https://rafostar.github.io/clapper/
GNU General Public License v3.0
774 stars 37 forks source link

Lag and flicker in playback since mesa regression #203

Closed frnmz closed 2 years ago

frnmz commented 2 years ago

As the title says, since mesa regression in version 21.3, Clapper is laggy and flickering when playing a video. It is the same issue in mpv and celluloid. But in clapper not only it's flickering, it's also laggy. See here: https://streamable.com/lcmfe6 I've filled a bug report both in mpv github and mesa gitlab: https://github.com/mpv-player/mpv/issues/9579 https://gitlab.freedesktop.org/mesa/mesa/-/issues/5744

The latest version of mesa fixed the problem in mpv, but not in clapper. That's why I think it's now clapper specific problem.

Edit: The problem seems to be only on Fedora version. The flatpak version works fine.

Rafostar commented 2 years ago

Same issue as #191.

As I think you have noticed yourself, this is a regression that mesa introduced, have also broken other apps like mpv. Normally mpv issues should not affect us, as we do not use mpv as backend. This further proves to me that this is a mesa issue.

Edit: The problem seems to be only on Fedora version. The flatpak version works fine.

Also, same Clapper version on the same system working as Flatpak makes sense, as flatpaks include and use their own (older) mesa version.

frnmz commented 2 years ago

Same issue as #191.

Ahh sorry for not seeing this.

This further proves to me that this is a mesa issue.

Should I open a new issue in mesa gitlab? since the issue is still there even in the latest version.

Rafostar commented 2 years ago

It is the same issue in mpv and celluloid.

Since the testing in that issue I mentioned above indicated that this does not happen with glimagesink alone that also works is a very similar manner to clapper GL sink, this would mean that there is something in latest mesa that does not play well with GTK4. But if that is true, you would also face some issues in GTK4 ver of celluloid even after mpv problem in mesa was solved. Do you encounter something like that?

frnmz commented 2 years ago

But if that is true, you would also face some issues in GTK4 ver of celluloid even after mpv problem in mesa was solved.

Yup, the flicker issue still happens in latest Celluloid with latest Mesa. Even after the problem was fixed in mpv. See: https://github.com/celluloid-player/celluloid/issues/725#issuecomment-1014111349

Rafostar commented 2 years ago

So its a clash of mesa and gtk4. Seems more like mesa issue (as this originally also started happening to pure mpv player), but might be a bug inside gtk4 renderer that manifested itself after recent mesa changes.

Does GSK_RENDERER=cairo env have any effect on this?

frnmz commented 2 years ago

Seems more like mesa issue (as this originally also started happening to pure mpv player), but might be a bug inside gtk4 renderer that manifested itself after recent mesa changes.

Do you have any guide that I can follow to trace the bug? like making a log, etc?

Does GSK_RENDERER=cairo env have any effect on this?

It does not have any effect.

frnmz commented 2 years ago

This issue is fixed in the latest mesa (21.3.5) for me. Tested on Clapper 0.4.0 Fedora build. Maybe the others can confirm?

Rafostar commented 2 years ago

No complains, so I guess this can be closed.