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

Free Support Forum - aspose.com

How to Identify a Shape or a Video in PowerPoint Presentation in a Unique Way?

Hi Andrey

How are things going ?

Can you please tell me how to identify a shape or a video in a unique way ?

In powerpoint, a unique video can be played several times, so how to identify it…

Thank you, cheers

Thank you for contacting support. Could you please describe the issue you are encountering in more detail with some examples?

No code neither pptx yet, just theory.

Let’s admit those conditions for a PPTX:

  • two slides
  • each slide has the same video

I want to replace that video from an external file BUT before inserting, i want to check whether that video has already been inserted or not:

If yes: i want to find it in the PPTX and assign it from internal.
if not: i want to add the video to the presentation

How to identify a unique video in a powerpoint with Aspose.Slides please ?


Thank you for the explanation. You can compare the EmbeddedVideo properties from the IVideoFrame interface like this:

if (videoFrame1.EmbeddedVideo == videoFrame2.EmbeddedVideo)
    Console.WriteLine("This is the same video.");

Isn’t there a unique identifier for each unique video ?

What kind of comparison is it : videoFrame1.EmbeddedVideo == videoFrame2.EmbeddedVideo ?

How to be sure that both video objects are the same ?


Unfortunately, there are no unique identifiers for various videos.

The Presentation.Videos property contains all videos in the presentation. Usually, PowerPoint documents contain a video file in one copy. Therefore, you can compare the EmbeddedVideo properties. You can also compare data from the IVideoFrame.EmbeddedVideo.BinaryData property.

Documents: Video Frame

ok thank you.