Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Fri Aug 12, 2022 8:29 am

Is it possible to add a video from a youtube url for example? See pptx attached.

Embedded Vid.zip

majeed_s
 
Posts: 80
Joined: Thu Mar 25, 2021 4:13 pm

Fri Aug 12, 2022 10:38 am

Hello Majeed_s,

Thanks for your message.
Sorry that our product currently does not support directly adding a youtube url video. But our product can add the .mp4 format url video to PPT file, as shown in the following code. You can test on your side.
Code: Select all
string blobFileUrl = "https://www.e-iceblue.cn/upload/Video.mp4";
WebClient webClient = new WebClient();
byte[] bytes = webClient.DownloadData(blobFileUrl);
MemoryStream stream = new MemoryStream(bytes);
Presentation ppt = new Presentation();
ppt.LoadFromFile("test.pptx", FileFormat.Pptx2013);
ISlide slide = ppt.Slides[0];
ppt.Slides[0].Shapes.AppendVideoMedia(stream, new RectangleF(505, 253, 240, 140));
ppt.SaveToFile("result.pptx", FileFormat.Pptx2013);


Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Fri Aug 12, 2022 11:13 am

Thanks for the feedback.

What's the difference between using a youtube URL and your mp4 url? Is it because the youtube URL you cannot download the video or its not in mp4? Just want to understand what the difference is.

majeed_s
 
Posts: 80
Joined: Thu Mar 25, 2021 4:13 pm

Mon Aug 15, 2022 2:50 am

Hello Majeed_s,

Thanks for your message.
For YouTube online video, we need to parse the website address, to get the video path and content information. Sorry currently the internal mechanism of our product doesn't support this parsing. Thanks for your understanding.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Wed Aug 17, 2022 2:21 pm

Thanks for explain it. Would you mind removing my full name from your posts please. I don't want my personal info exposed.

majeed_s
 
Posts: 80
Joined: Thu Mar 25, 2021 4:13 pm

Thu Aug 18, 2022 6:35 am

Hello Majeed_s,

Thanks for your message.
We apologize for the inconvenience caused to you. We have changed the name. If you have any further questions, please feel free to contact us.

Sincerely,
Simple
E-iceblue support team
User avatar

Simple.Li
 
Posts: 248
Joined: Fri Jul 01, 2022 2:33 am

Thu Aug 18, 2022 8:30 am

Thanks a lot!

majeed_s
 
Posts: 80
Joined: Thu Mar 25, 2021 4:13 pm

Return to Spire.Presentation