For a recent presentation I gave at DC4420 I needed to show some videos, so I originally tried embedding them into the presentation's LibreOffice Impress file. LibreOffice did not handle the resulting large file size well, and particularly didn't like embedded videos. So what I did was flick from my presenting window to a terminal window, and run a quick script from there that called mplayer with the appropriate options.

This worked pretty well, and I was able to do it pretty quickly when I practised the presentation at home.

Unfortunately in practice I under-estimated how difficult it would be to type the name of a file with a microphone in one hand and a presenter's remote control in the other, if you were a member of the audience your patience was appreciated. This bugged me so I now have a solution, ready for the next time. I haven't tested this "live" yet, but I figure if someone else is stuck in a similar position it will get you 95% of the way there.

How to do this:

Firstly - running videos from LibreOffice Impress

You'll need to change the security settings around macros first. Go to Tools, then Options, then in the window that opens go to Security under "LibreOffice". Go to Macro Security and set it to Low. Yes, not ideal, do change it back to an appropriate level whenever possible.

Go to Tools, Macros, Organise Macros, and then LibreOffice Basic. From there select "Edit", and then put in a macro that reads as follows:

shell ("bash -c '/<path to shell script>/'")

From here it's up to you, either have one shell script that runs all videos by calling them as an option, or use a different shell script for each video. That should work, I believe in the LibreOffice macro you can call a script with options.

For the script, it will say something like:

mplayer -xineramascreen 1 -fs file.mp4

This means you can also use the "-input conf=/<path to file>" option to call a specific mplayer configuration file, which I'll cover later.

I'm expecting that you're using "Presenter View" in LibreOffice, so you might need the -xineramascreen option to ensure the video plays on the correct screen for your audience to see. In my limited experience the options for mplayer were weird, "--xineramascreen=1" might also be accepted, or it might not - experiment if necessary.

If you need to play multiple files then look at the "playlist" option for mplayer.

Then in the presentation itself, where you want to play a video, insert a graphic. Bear in mind you'll be clicking on this graphic during the presentation to run the video, so make it nice and big.

Right click the graphic and select Interaction. Select the appropriate Macro from those you've set up to call the right shell script.

Secondly - how to do this one handed

Ideally during the presentation you'll be standing away from your laptop or whatever you're using to present from, so you want to advance presentation slides, and click on that graphic, using just the one presenting Remote Control. In my experience most presenting remote controls don't include mouse functionality. So for this buy an all-in-one presentation remote control and mouse. I've chosen a "Targus Wireless Bluetooth Presenter Remote Control & Mouse Cursor", model BEU0564C, this should work with your Linux box too. For example you can get it from Amazon.

Sync the Remote Control with your Linux system, which works for me. When you've set your Linux system to scan for new Bluetooth devices you might need to press buttons on your Remote Control to get it to "wake up" and connect.

This now means you can use "presentation mode" to advance slides, then flick the Remote Control to "mouse mode" and click on the presentation graphic to run the required clip, and then flick it back to "presentation mode" to keep controlling LibreOffice Impress.

Thirdly - some mplayer modifications

As I said above, you can call mplayer with a specific configuration file to determine how it manages input. If you put this into the configuration file:

b pause
F5 quit
PGUP seek -8
PGDWN pt_step 1 1

This should mean that on your remote control:

Press the "blank screen" button to pause or unpause a video. Press the "start / stop presentation" button on your remote control to stop a video playing. Press the "next slide" button to rewind the video eight seconds. Press the "previous slide" button to skip to the next video in a playlist.

You can use the program "xev" to see what specific keypresses your presenter's remote control is sending; and of course do experiment and practice before you give the presentation.

And there you have it.