Calculate total duration of an impress presentation

Hello guys,

Is there any way to I calculate the total duration of my presentation? Maybe reading the metadata from my .odp file and using some script.

I need this to kill the process after my presentation ends. I didn’t found another way to just start my presentation from terminal, show all slides and close the presentation.

If you know another way to do this please tell me :slight_smile: I’m just beginning in the free software world.

I’m using LibreOffice 420m0(Build:2)
In a Elementary OS

In the content.xml that is inside the .odp (you can use unzip to extract it) there is a tag telling the duration of slides for each style. In the following example it is 876 (with PT before and S after):

<style:style style:name="dp3" style:family="drawing-page"><style:drawing-page-properties presentation:transition-type="automatic" presentation:duration="PT876S" presentation:background-visible="true" presentation:background-objects-visible="true" presentation:display-footer="false" presentation:display-page-number="true" presentation:display-date-time="false" smil:type="zoom" smil:subtype="rotateIn"/></style:style>

If your presentation have only one slide style, you can probably make a simple script to get that number and multiply by the number of slides (i think it is the number of times the string <draw:frame appears). If more than one slide styles, the parsing would be harder, as you will need to know how many slides use each style.


The Presenter Console gives you the total duration of a presentation.

In your case, it seems safer to interrupt the presentation after projection of a number of slides (which you determine).

The LimitPresentation.odp attached includes 3 slides. It is set to be screened in a loop. The addListener macro starts the Slideshow and ends after projection of 6 slides.

Just change the value of NbMax constant in the beginning of the procedure according to you needs.