Cimbali / pympress

Pympress is a simple yet powerful PDF reader designed for dual-screen presentations
https://cimbali.github.io/pympress/
GNU General Public License v2.0
1.18k stars 89 forks source link

vlc opens new window, rather than embedding when run under wayland #320

Open leon-erd opened 4 months ago

leon-erd commented 4 months ago

Describe the bug When running pympress under wayland (e.g. in Hyprland) vlc opens videos in a new window instead of embedding. Does work as expected when running under xwayland with: GDK_BACKEND=x11 pympress test.pdf (see https://github.com/Cimbali/pympress/issues/60#issuecomment-399748537). Would be nice to see full wayland support as more and more distros are shipping wayland by default now. If I hadn't stumbled across the comment in the closed issue I would have thought pympress was broken. I guess more users will run into this issue.

To Reproduce Steps to reproduce the behavior:

  1. Create test.pdf in beamer / pdflatex that includes .mp4 video
  2. Run pympress test.pdf
  3. Click on placeholder for embedded video
  4. -> black screen in presentation, new window with video opens
  5. When running GDK_BACKEND=x11 pympress test.pdf everything works as expected

Environment (please complete the following information):

Cimbali commented 4 months ago

I don’t know if vlc supports embedding with wayland. Why not use gstreamer for video support?

(I don’t know off the top of my head which is default anymore, but I thought vlc was default only on Windows)

leon-erd commented 4 months ago

I just tried on arch and there it works with gstreamer. Found out that gstreamer playback is not supported by the current nixos downstream package but after a few tries I got it working. So I will make a PR in nixpkgs to fix the gstreamer support.

I can confirm that on wayland video playback works as expected with gstreamer but doesn't with vlc. Does that mean its an upstream issue of vlc?

Cimbali commented 4 months ago

Embedding in wayland is just not supported yet: https://code.videolan.org/videolan/vlc/-/issues/16106

There’s no activity on that issue in the last 4 years and I don’t know where the mentioned blocking get_window is tracked.