Transition is not applied in final video
Opened this issue · 5 comments
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);
}
}
Please check your results using the latest version of Aspose.Slides for .NET if it is possible. If the issue persists, please share the following files and information:
- the pptxpoc.pptx file
- OS version on which the conversion was performed
- .NET target platform in your app
- Aspose.Slides version you used
You can also use our Aspose.Slides forum.
I have also uninstalled and installed the latest version, but the problem persists. Here are the files you asked for
pptx file : pptxpoc.pptx
pptx file created using aspose : pptxpoc2.pptx
OS verion : Windows 11 Home version 22H2 and os build is 22621.1992
Target Platform : Any CPU and Target Frame work .Net Framework 4.8.1
Aspose.Slides version : 23.7.0
outputvideo : https://github.com/aspose-slides/Aspose.Slides-for-.NET/assets/122196614/2093ae55-12bb-47b6-b0b7-6ed91a213267
Code which i used :
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.Box;
presentation.Slides[1].SlideShowTransition.Type = TransitionType.Gallery;
presentation.Slides[2].SlideShowTransition.Type = TransitionType.Airplane;
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);
}
}
@PraveenJeffriAndroidDeveloper,
Thank you for the additional information.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): SLIDESNET-44116
You can obtain Paid Support Services if you need support on a priority basis, along with direct access to our Paid Support management team.
@andreypotapovaspose thankyou for quick response
@PraveenJeffriAndroidDeveloper,
Thank you for using Aspose.Slides.