Free Support Forum -

Issue on embedding video in ppt


Hi Aspose Team!!

I have created a PPTX file through Aspose.slide lib. In that PPTX file, I have attached/embedded video. Here is my code:-

//Create a presentation
presentation = new Presentation();
slide1 = presentation.getSlides().get_Item(0);

//Add Video Frame
String videoUrl = "/home/pr/Desktop/test.mp4";
IVideoFrame vf = slide1.getShapes().addVideoFrame(50, 150, 300, 150, videoUrl);

//Set Play Mode and Volume of the Video

//Set default image if in case the video does not appear.
IPPImage img =null;
img = presentation.getImages().addImage(new FileInputStream(new File("/home/pr/Desktop/cow.jpeg")));

//Write the presentation to disk
}catch(Exception e){

My issue is that When I’m opening this PPTX file in Libre Office/MS Office 2010/2008 then my video is not playing. The only default image is displaying. Could you help me what is the error in my code OR if there are some PP tools, who can handle video inside the slide, then please explain it

Thanks in Advance.



I have observed the sample code shared and there seems no issue in the code. Can you please provide the source code, sample video and generated output with us that we may test on our end to help you further.


I have shared with generated PPTX file and video and image that I had embedded with PPTX (990.1 KB)

It would be great if you also guide me that which format of video is suitable for embedding with PPTX.
And you have already seen my code so you need again ?


@mudassir.fayyaz Any luck!!!



I have worked with files shared by you and it seems to be an issue with API while playing the added video. An issue with ID SLIDESJAVA-37603 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.


Thanks @mudassir.fayyaz!!



You are very welcome. Please feel free to contact us anytime if there is any issue.