Embed Video in PowerPoint Presentations using C++

Embed Video in PowerPoint Presentations using C++

Microsoft PowerPoint provides you the ability to add video frames to your PowerPoint presentations. Videos can be used to enhance the quality of the presentations and help better communicate the message to the audience. There might be situations where you want to add videos to PowerPoint presentations programmatically. To that end, this article will teach you how to embed video in PowerPoint presentations using C++.

C++ API for Embedding Video in PowerPoint Presentations

We will use the Aspose.Slides for C++ API to embed videos in PowerPoint presentations. It is a powerful and feature-rich API that supports creating, reading, and modifying PowerPoint files without needing Mircosoft PowerPoint to be installed. You can either install the API through NuGet or download it directly from the Downloads section.

PM> Install-Package Aspose.Slides.Cpp

Embed Video in PowerPoint Presentations using C++

The following are the steps to embed a video in a PowerPoint presentation.

The following sample code shows how to embed a video in a PowerPoint presentation using C++.

Embedding Video from a Web Source in PowerPoint Presentations

The following are the steps to embed a video from a web source in a PowerPoint presentation.

The following sample code shows how to embed a video from a web source in a PowerPoint presentation using C++.

Extract Video from PowerPoint Presentations using C++

The following are the steps to extract a video from a PowerPoint presentation using C++.

  • Firstly, load the PowerPoint file using the Presentation class.
  • Loop through the slides of the presentation.
  • Loop through the shapes in each slide.
  • For each shape, check if the shape is a VideoFrame. In case it is a video frame, extract the embedded video and save it.

The following sample code shows how to extract a video from a PowerPoint presentation using C++.

Get a Free License

In order to try the API without evaluation limitations, you can request a free temporary license.

Conclusion

In this article, you have learned how to embed videos in PowerPoint presentations using C++. Moreover, you have seen how to extract embedded videos from PowerPoint presentations using Aspose.Slides for C++ API. It is a robust API that provides many additional features for working with PowerPoint files. You can explore the API in detail by visiting the official documentation. In case of any questions, please feel free to reach us at our free support forum.

See Also