Summary: | Kaffeine plays video in a separate window under Wayland | ||
---|---|---|---|
Product: | [Applications] kaffeine | Reporter: | Patrick Silva <bugseforuns> |
Component: | general | Assignee: | Mauro Carvalho Chehab <mchehab> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | andrej, hunter2k1, michaelw, nl6720, openproggerfreak, raulvior.bcn, stakanov.s |
Priority: | NOR | ||
Version: | 2.0.17 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | screenshot |
Could you better describe it? What versions of Wayland, Kaffeine and libVLC you have installed? What distro? What window manager (gnome, KDE, other)? What window manager version? (In reply to Mauro Carvalho Chehab from comment #1) > Could you better describe it? What versions of Wayland, Kaffeine and libVLC > you have installed? What distro? What window manager (gnome, KDE, other)? > What window manager version? Btw, I wander if this is related to this VLC bug: https://trac.videolan.org/vlc/ticket/17910?cversion=0&cnum_hist=4 wayland 1.15.0 kaffeime 2.0.15 vlc 3.0.3.r1 Arch Linux KDE Plasma 5.13.4 I'm affected by this bug too and looked at the source and try to fix myself. The problem is (I think) libVLC's API doesn't provide embedding video output into wayland sufaces(I only found for X11,OSX and Windows). In wayland sessions kaffeine runs with the wayland backend and tries to pass the wayland surface to libVLC(which of course fails) and the result is this bug. Possible workround is running kaffeine with "-platform xcb" to force the X11 backend. As an experiment I made an minimal mpv-backend(which uses OpenGL-surfaces) and it fixes the bug too. (In reply to Lukas Kahnert from comment #4) > I'm affected by this bug too and looked at the source and try to fix myself. > The problem is (I think) libVLC's API doesn't provide embedding video output > into wayland sufaces(I only found for X11,OSX and Windows). > In wayland sessions kaffeine runs with the wayland backend and tries to pass > the wayland surface to libVLC(which of course fails) and the result is this > bug. > > Possible workround is running kaffeine with "-platform xcb" to force the X11 > backend. > > As an experiment I made an minimal mpv-backend(which uses OpenGL-surfaces) > and it fixes the bug too. Could you please send the mpv-backend patches? It could be worth having a different backend on Kaffeine (although I think Gstreamer would likely give better results). (In reply to Mauro Carvalho Chehab from comment #5) > (In reply to Lukas Kahnert from comment #4) > > I'm affected by this bug too and looked at the source and try to fix myself. > > The problem is (I think) libVLC's API doesn't provide embedding video output > > into wayland sufaces(I only found for X11,OSX and Windows). > > In wayland sessions kaffeine runs with the wayland backend and tries to pass > > the wayland surface to libVLC(which of course fails) and the result is this > > bug. > > > > Possible workround is running kaffeine with "-platform xcb" to force the X11 > > backend. > > > > As an experiment I made an minimal mpv-backend(which uses OpenGL-surfaces) > > and it fixes the bug too. > > Could you please send the mpv-backend patches? It could be worth having a > different backend on Kaffeine (although I think Gstreamer would likely give > better results). As I said it's just minimal which only suppports play and stop. mpv has an qt example in their sources which I used for this. Why a Gstreamer backend? Wouldn't be better to support (as KDE Project) Phonon as primary backend? (In reply to Lukas Kahnert from comment #6) > (In reply to Mauro Carvalho Chehab from comment #5) > > (In reply to Lukas Kahnert from comment #4) > > > I'm affected by this bug too and looked at the source and try to fix myself. > > > The problem is (I think) libVLC's API doesn't provide embedding video output > > > into wayland sufaces(I only found for X11,OSX and Windows). > > > In wayland sessions kaffeine runs with the wayland backend and tries to pass > > > the wayland surface to libVLC(which of course fails) and the result is this > > > bug. > > > > > > Possible workround is running kaffeine with "-platform xcb" to force the X11 > > > backend. > > > > > > As an experiment I made an minimal mpv-backend(which uses OpenGL-surfaces) > > > and it fixes the bug too. > > > > Could you please send the mpv-backend patches? It could be worth having a > > different backend on Kaffeine (although I think Gstreamer would likely give > > better results). > > As I said it's just minimal which only suppports play and stop. mpv has an > qt example in their sources which I used for this. > Why a Gstreamer backend? Wouldn't be better to support (as KDE Project) > Phonon as primary backend? AFAIKT, Phonon is a GUI frontend, with supports two backends: libVLC and GStreamer. If we take the active projects that provide consistent media player libraries, I guess there are only 2 options nowadays: VLC or Gstreamer. Mplayer used to be very active in the past, but it seems that its development slowed down nowadays. The advantage of GStreamer is that the project is focused on developing a backend for other applications. So, it allows deep control on what's happening behind the scenes. On the other hand, it adds some complexity to the backend. On the other hand, libVLC library is very simple, with makes the backend very simple too. However, its development is focused on VLC application, and only a handful functions are available to other applications. That makes harder (or impossible) to deal with some issues. A libVLC application can't really select what GUI module will be used and if libva will be used or not, as (at least up to version 3), there are no functions to enumerate the display output interfacer or select between them. At max, it can pass a command line parameter that may or may not work. On another example, I had to use only keys in order to handle DVD menus, as libVLC API doesn't allow an external application to pass mouse events (and newer versions of Qt want exclusive access to mouse events). I just re-checked it here on Fedora 30, with comes with: vlc-core-3.0.7-0.1.fc30.x86_64 libwayland-server-1.17.0-1.fc30.x86_64 qt5-qtwayland-5.12.1-1.fc30.x86_64 qt5-qtbase-devel-5.12.1-2.fc30.x86_64 Was unable to reproduce this bug anymore. So, I guess this was already fixed. well, this bug persists on Arch Linux running kaffeine 2.0.17 + Wayland 1.17 + vlc 3.0.6 + Qt 5.13 beta3. (In reply to Patrick Silva from comment #9) > well, this bug persists on Arch Linux running kaffeine 2.0.17 + Wayland 1.17 > + vlc 3.0.6 + Qt 5.13 beta3. Thanks for checking it. Weird that it is not happening here on Fedora... Could this be due to some different packaging configuration? Unfortunately I do not know. I could test Kaffeine on neon dev unstable installed on my laptop, but currently I can't start Wayland session on such system. This bug persists with kaffeine 2.0.17 + plasma 5.16 beta. Operating System: Arch Linux KDE Plasma Version: 5.15.90 KDE Frameworks Version: 5.58.0 Qt Version: 5.13.0 beta3 This bug persists in Ubuntu 22.04 LTS with QT_QPA_PLATFORM=wayland. Kaffeine 2.0.18 GNOME 42.1 libVLC 3.0.16 Wayland Qt 5.15.3 The title of this bug is quite an understatement; I think it should read "Kaffeine is unusable under Wayland". On ArchLinux with plasma-desktop 5.25.4, plasma-framework 5.97.0 and kaffeine 2.0.18, video appears (indeed) in a separate "VLC Player" window and resizing / closing / manipulating that window is a recipe for an undefined state with random Kaffeine crashes. Apart from the video window problem, the UI is broken to a point where one cannot (e.g.) select DVB-T channels, because the list of DVB-T channels flickers, does not seem to respond to scrolling, shows random items that mostly don't match the selected channel etc. Someone suggested a "workaround" in the form of a different --platform, but none of those that I tried worked, some segfault and as for 'xcb', the most well-known one, that doesn't help either, because the UI looks disastrously bad on my 300% scaled high-DPI setup. Basically each pixel of UI widgets is stretched to 9 pixels (3x3) and, sadly enough, the same atrocious thing is done to HD videos, i.e. they are scaled down to 1/3 of Kaffeine's real window resolution. This occurs on Void Linux glibc as well: Kaffeine Version 2.0.18 KDE 5.26.3 Frameworks 5.101.0 Qt 5.15.7 Unfortunately, Kaffeine does not work on Wayland. An alternative is to install w_scan_cpp, an application which can produce channel listings, and compile a VLC playlist. The ArchWiki explains how: https://wiki.archlinux.org/title/DVB-T It worked for me with my Haupaugge DVB-T tuner. I may have found a workaround. KDE Bugs lists this issue: Possible workround is running kaffeine with "-platform xcb" to force the X11 backend. |
Created attachment 114480 [details] screenshot See the screenshot taken on Arch Linux please.