Skip to content
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

No video when note slide located at bottom of page #309

Open
einhander opened this issue Feb 19, 2024 · 7 comments
Open

No video when note slide located at bottom of page #309

einhander opened this issue Feb 19, 2024 · 7 comments
Labels

Comments

@einhander
Copy link

einhander commented Feb 19, 2024

Describe the bug
Then \setbeameroption{show notes on second screen=bottom} used video can't be played.
show notes on second screen=right plays video ok.

To Reproduce
Steps to reproduce the behavior:

  1. Use MWE:
\documentclass{beamer}
\usepackage{multimedia}
\setbeameroption{show notes on second screen=bottom} 
\begin{document}
\begin{frame}{Just a mp4 here}
    \centering
    \movie[width=0.3\textwidth]{\includegraphics[width=0.4\textwidth]{frame1}}{movie.mp4}
\end{frame}
\end{document}
  1. Run pympress on result pdf file
  2. Click on video frame
  3. See no video playing, only sound

Expected behavior
Play video on presenter window

Environment (please complete the following information):

  • OS: Debian testing
  • Python version: 3.11.7
  • Pympress version: 1.8.4
  • Installation method: deb from debian repo

Debug information (see below for file locations)

  • What is reported in pympress.log?
INFO:pympress.app:Pympress: 1.8.4 ; Python: 3.11.7 ; OS: Linux 6.5.0-5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.5.13-1 (2023-11-29) ; Gtk 3.24.40 ; GLib 2.78.3 ; Poppler 22.12.0 cairo ; Cairo 1.18.0 , pycairo 1.25.1
INFO:pympress.extras:Media support: GdkPixbuf gif player, GStreamer 1.22.8, VLC 3.0.20 Vetinari
  • Does the problem still happen if you remove your config file?
    Yes
@Cimbali Cimbali added the bug label Feb 19, 2024
@Cimbali
Copy link
Owner

Cimbali commented Feb 19, 2024

Weird bug, but can reproduce. Thanks for reporting!

@Cimbali
Copy link
Owner

Cimbali commented Feb 19, 2024

The clickable area to play the video appears in the notes slide. And the same bug happens with notes on the left, while notes on top works. There must be something wrong in the media position computation.

@einhander
Copy link
Author

Yes, clickable area works on notes slide, I can hear sound from the video. But video didn't appear on any screen.

@Cimbali Cimbali changed the title No video then note slide located at bottom of page No video when note slide located at bottom of page Feb 21, 2024
@Cimbali
Copy link
Owner

Cimbali commented Feb 21, 2024

This seems to me to be a variant of #115 of some kind. Essentially beamer generates the wrong coordinates in the PDF for the media if you’re using the second* half (right or top) for content and the first half (left or bottom) for notes.

We can shift the media on the slide page when it is on a right or bottom notes page, under the rather safe assumption that nobody puts medias on notes pages. However the click area means shifting links which is less obvious: there is likely a valid use case for links on notes pages.

* in the sense of latex/beamer coordinates

@Cimbali
Copy link
Owner

Cimbali commented Feb 21, 2024

Frankly I think the most efficient workaround is to not use bottom- or left-screen note pages. My favourite option would be to display notes on separate pdf pages. Your example would become:

\documentclass{beamer}
\usepackage{multimedia}

% Show beamer notes but on separate pages
\setbeameroption{show notes}

% Tell pympress which pages are notes pages
\addtobeamertemplate{note page}{}{\thispdfpagelabel{notes:\insertframenumber}}

% Only add this bit if you want all note pages to show even when empty
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
  \gdef\beamer@noteitems{}%
  \gdef\beamer@notes{{}}% used to be totally empty.
}
\makeatother

% Rest of document unchanged
\begin{document}
\begin{frame}{Just a mp4 here}
    \centering
    \movie[width=0.3\textwidth]{\includegraphics[width=0.4\textwidth]{frame1}}{movie.mp4}
\end{frame}
\end{document}

@einhander
Copy link
Author

@Cimbali Thanks for the clarification of the source of the problem and the code snippet for the notes on separate pdf pages.

if you’re using the second* half (right or top) for content and the first half (left or bottom) for notes.

Yes, the top position works fine. I'll stop there for now, unless there's a workaround. Unfortunately, the hack posted in #115 didn't work for me in case of bottom position.

@Cimbali
Copy link
Owner

Cimbali commented Feb 21, 2024

The hack in 115 is for links. We’d need to expand the patch for \movie.

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

No branches or pull requests

2 participants