We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting duration of a extracted video from presentation

Hello Team,

I am using your trial version of Aspose Slides for Java to test its functionalities and finding its suits for our requirement. I am trying to extract a video from the presentation and trying to get its duration. I am able to extract the video frames but is there a way to get the duration of the video that we are extracting from the slides?


Hi Ranjith,

I have observed the requirements shared and regret to share that Aspose.Slides does not support extracting the video duration from presentation. I have created an issue with ID SLIDESJAVA-35669 as new feature request to investigate the possibility of implementing the requested feature support. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

Best Regards,

The issues you have found earlier (filed as SLIDESJAVA-35669) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Thank you for the notification.

It would be really helpful if you can explain the way to get the video duration. I downloaded the new version and checked IVideoFrame object and could not find a suitable method for the same.


Hi Renjith,

Our product team has investigated the requirement on their end. Unfortunately, there is no an easy way to determine the duration of extracted video because different video formats have completely different formats of their metadata. After discussion, we have created an example with use another library in combination with slides.

Code snippet based on Xuggler(http://www.xuggle.com/xuggler/):

class Demo
static long getVideoDuration(String path)
// first we create a Xuggler container object
IContainer container = IContainer.make();

// we attempt to open up the container
int result = container.open(path, IContainer.Type.READ, null);

// check if the operation was successful
if (result<0)
throw new RuntimeException(“Failed to open media file”);

// query for the total duration
long duration = container.getDuration();

return duration;
The above code will help you in getting the video duration.

Many Thanks,

Thank you.

But as per the notification I received, it looks like this feature is implemented in version 16.12.0.

Please check the release notes.



Hi Renjith,

You are right. The issue has been marked resolved based on the above sample code.

Many Thanks,