Skip to content

Videos on opening slide are misplaced #741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mirhahn opened this issue Feb 17, 2025 · 4 comments
Open

Videos on opening slide are misplaced #741

mirhahn opened this issue Feb 17, 2025 · 4 comments

Comments

@mirhahn
Copy link

mirhahn commented Feb 17, 2025

Expected Behaviour

Regardless of which slide an embedded video is placed on, once started, the video should occupy the same rectangle as its poster image.

Actual Behaviour

The following behavior has been tested exclusively with PDFs generated by pdflatex using the beamer document class.

If the video is placed on the first slide that is shown after pdfpc is opened and pdfpc is opened in multi-monitor mode, then the video in the presentation view has neither the correct position nor size. It is hard to tell, but it appears that it is placed correctly in the presenter view and it appears that the video in the presentation view is scaled to the same size and moved to the same position as the smaller version in the presenter view.

This occurs regardless of whether the slide in question is the first slide in the PDF. If the video is placed on the second slide, then pdfpc -P 2 will cause the same behavior. Switching to a different slide and then switching back will fix the positioning of the video.

The behavior is independent of whether the "standard" (multimedia package) or "non-standard" (launch link) method of video inclusion is chosen. It does not appear to be affected by the "Wayland workaround."

Steps to reproduce

The following three examples are reduced versions of demo/pdfpc-video-example/video-example.tex and refer to the accompanying files apollo17.avi and apollo17.jpg.

  1. The following two TeX codes produce PDFs with one slide where the video is always misplaced (compile, then open with pdfpc <FILE>):
    \documentclass{beamer}
    
    \usepackage{multimedia}
    
    \begin{document}
    
    \begin{frame}
      \frametitle{Standard Method}
      \begin{center}
        \movie{\includegraphics[width=0.7\textwidth]{apollo17.jpg}}{apollo17.avi}
      \end{center}
    \end{frame}
    
    \end{document}
    \documentclass{beamer}
    
    \begin{document}
    
    \begin{frame}
      \frametitle{Standard Method}
      \begin{center}
        \href{run:apollo17.avi?autostart&loop&start=5&stop=12}
           {\includegraphics[height=0.7\textheight]{apollo17.jpg}}
      \end{center}
    \end{frame}
    
    \end{document}
  2. This code produces two slides. Placement is correct for pdfpc <FILE>, but incorrect for pdfpc -P 2 <FILE>, though switching back and forth between slides fixes the placement.
    \documentclass{beamer}
    
    \usepackage{multimedia}
    
    \title{Bug demo}
    \subtitle{(for v4.7.0)}
    
    \begin{document}
    
    \begin{frame}
      \titlepage
    \end{frame}
    
    \begin{frame}
      \frametitle{Standard Method}
      \begin{center}
        \movie{\includegraphics[width=0.7\textwidth]{apollo17.jpg}}{apollo17.avi}
      \end{center}
    \end{frame}
    
    \end{document}

pdfpc version: 4.7.0 (originally observed in 4.6.0)
Used Distribution (GTK version, Vala version): Ubuntu 24.10 (GTK 4.16.3 and GTK 3.24.43, Vala 0.56)
Display Server (X11/Wayland): Wayland
HiDPI Setting (yes/no): yes, but occurs even if all scaling factors are set to 1.0

@fnevgeny
Copy link
Member

I cannot reproduce it. Which window manager are you using?

@mirhahn
Copy link
Author

mirhahn commented Feb 17, 2025

I use Hyprland 0.47.2. Here's the precise output of hyprland -v:

Hyprland 0.47.2 built from branch  at commit 882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff  (version: bump to 0.47.2).
Date: Sun Feb 2 01:47:17 2025
Tag: v0.47.2, commits: 5767
built against:
 aquamarine 0.7.2
 hyprlang 0.6.0
 hyprutils 0.5.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


no flags were set

I think it may have something to do with the fact that it's a tiling window manager. The presenter view also loses the correct video positioning when it is resized due to another window being opened in the same workspace. Maybe something with the resize events is weird when that happens.

I have also added the version information for GTK, Vala, and my distribution. Sorry about that. I somehow thought that the question was about two different versions of pdfpc. I'm pretty tired.

@fnevgeny
Copy link
Member

Please try using the default Ubuntu WM, so we know where to look further. You can also try the option move-on-mapped true pdfpcrc setting.

@mirhahn
Copy link
Author

mirhahn commented Feb 17, 2025

I don't have the original GNOME any more, but I have the KDE that's available from the standard package sources. That's KDE Plasma 6.1.5 on Wayland.

KDE does not have the same problems with resizing the (windowed) presenter view, but it does have the same problem for the presentation view. option move-on-mapped true does not fix the problem for either KDE or Hyprland. I have straced the process and verified that the configuration file is found and read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants