Convert PowerPoint to Video using C#

This simple article describes how to convert PowerPoint to video using C#. It has details to set the IDE, a list of steps, and a sample code to transform PPT to MP4 using C#. All the steps will be described in detail, along with enhancements in the code to create custom output.

Steps to Convert PPT to Video using C#

  1. Set the IDE to use Aspose.Slides for .NET to convert PPT to MP4
  2. Import the library classes and modules, and load the license
  3. Define the input presentation and folder for the scanned images
  4. Load the source presentation and iterate through all the slides in it
  5. Save each slide in order as a PNG image in the images folder
  6. Create the FFmpeg argument string for reading the ordered PNG sequence and encoding it
  7. Launch FFmpeg and wait until the MP4 video is generated

These steps describe how to convert PPT to MP4 using C#. Import the library modules and classes, create a folder for saving the rendered images, load the presentation, and access the collection of slides. Iterate through all the slides, render each slide in order as a PNG image and save in the images folder, create the FFmpeg argument string, and start FFmpeg to create the output MP4 using the input images folder.

Code to Convert PowerPoint to MP4 using C#

This code demonstrates how to transform a PPTX to MP4 using C#. You may try RenderingOptions instead of fixed GetImage(2f, 2f) scaling. The transition time of each slide can be set using the slide.SlideShowTransition.AdvanceAfterTime property instead of a fixed time.

This article has taught us the process to convert a PowerPoint presentation to an MP4 video file using H.264. To add an audio to a presentation, refer to the article How to Add Audio in Presentation using C#.