I have used your open API, and it's working really great. However, when I try to get the frames and convert them to a video using ffmpeg, the transitions applied in the PPT are not coming
const int FPS = 30;
using (Presentation presentation = new Presentation("D:\pptxpoc.pptx"))
{
presentation.Slides[0].SlideShowTransition.AdvanceAfterTime = 10000;
presentation.Slides[1].SlideShowTransition.AdvanceAfterTime = 10000;
presentation.Slides[2].SlideShowTransition.AdvanceAfterTime = 10000;
presentation.Slides[0].Shapes.AddAutoShape(ShapeType.Line, 50, 150, 300, 0);
presentation.Slides[0].SlideShowTransition.Type = TransitionType.Fade;
presentation.Slides[1].SlideShowTransition.Type = TransitionType.Fade;
presentation.Slides[2].SlideShowTransition.Type = TransitionType.Fade;
presentation.Save("D:\pptxpoc2.pptx", SaveFormat.Pptx);
using (Presentation transitionAppliedPpt = new Presentation(("D:\pptxpoc2.pptx")))
{
using (var animationsGenerator = new PresentationAnimationsGenerator(transitionAppliedPpt))
using (var player = new PresentationPlayer(animationsGenerator, FPS))
{
player.FrameTick += (sender, args) =>
{
//Console.WriteLine($"frame_{sender.FrameIndex}.png");
args.GetFrame().Save($"D:\PPT_Frames\frame_{sender.FrameIndex}.png");
};
animationsGenerator.Run(transitionAppliedPpt.Slides);
}
}
I have used your open API, and it's working really great. However, when I try to get the frames and convert them to a video using ffmpeg, the transitions applied in the PPT are not coming
const int FPS = 30;
using (Presentation presentation = new Presentation("D:\pptxpoc.pptx"))
{
presentation.Slides[0].SlideShowTransition.AdvanceAfterTime = 10000;
presentation.Slides[1].SlideShowTransition.AdvanceAfterTime = 10000;
presentation.Slides[2].SlideShowTransition.AdvanceAfterTime = 10000;
presentation.Slides[0].Shapes.AddAutoShape(ShapeType.Line, 50, 150, 300, 0);
presentation.Slides[0].SlideShowTransition.Type = TransitionType.Fade;
presentation.Slides[1].SlideShowTransition.Type = TransitionType.Fade;
presentation.Slides[2].SlideShowTransition.Type = TransitionType.Fade;
presentation.Save("D:\pptxpoc2.pptx", SaveFormat.Pptx);
using (Presentation transitionAppliedPpt = new Presentation(("D:\pptxpoc2.pptx")))
{
using (var animationsGenerator = new PresentationAnimationsGenerator(transitionAppliedPpt))
using (var player = new PresentationPlayer(animationsGenerator, FPS))
{
player.FrameTick += (sender, args) =>
{
//Console.WriteLine($"frame_{sender.FrameIndex}.png");
args.GetFrame().Save($"D:\PPT_Frames\frame_{sender.FrameIndex}.png");
};
animationsGenerator.Run(transitionAppliedPpt.Slides);
}
}