Open Laar2 opened 6 years ago
It is working :-)
I made several adjustments in the code and now i am able to add a video to the PPTX, without Powerpoint complaining about repairs.....
I reversed engineered the "Timing"- block in the Slide. I also extended a Video-class from Media, just because I want to add audio to the PPTX using an Audio Class. Which is working also.
Some fine-tuning is still needed.....
Hello,
I'm facing an issue with video insertion (that need to be repair)
How did you solve this ? Is a patch available somewhere ?
Thank you
I created my own version of PHPpresentation. The code includes samples how to use the new classes Audio en Video. But ONLY for PPTX, not for ODP!
I can send you the code. Because of the size of the audio- and video-files (50 MB) used in the samples, it is too large to attach here. Or I can make smaller audio and video files, but I don't have the time now.....
@Laar2 if you can, just send me the code, I will see on my own how to use it Of course if it's possible for you
Thank you in advance
@Cryde You can download the code here :
https://github.com/Laar2/PHPPresentation
See the samples : Sample_21_audio.php Sample_22_media.phpo Sample_23_video.php PHPPresentation/src/PhpPresentation/Writer/PowerPoint2007/AbstractSlide.php
(I renamed the samples, so they popup on the sample-page in the '2x'-menu.)
@Laar2 Thanks for this—I'd begun noticing the same issues while manually comparing output for slides with video from PowerPoint with similar output from PHPPresentation, and found your fork just as I'd started doing the work of trying to resolve those mismatches myself.
Much appreciated! You say fine-tuning is needed; have you encountered any issues with PowerPoint compatibility so far?
@gregsullivan I am using this version on one of my websites without any problems. I use:
I did not test or try other versions of Powerpoint.
BTW. I cleaned my repository (was 70 different files). I put the original files back where possible, so only 15 different files now. When you compare my repo to the original you can see the differences more easily.
@Laar2 Thanks for letting me know, and thanks for making those changes!
To the extent it's useful for anyone else to know, this solved the problem for me on the latest Office 365 version of PowerPoint. Previously any presentations with videos would require repair, which removed the video.
@Laar2 First of all thank you very much for providing audio support in ppt. But i have a query regarding auto play slides music in background so there is any method or function using it ppt slideshow automatically play music because currently i need to play it manually. I want added audio automatically play when i start slideshow. Thanks
@ashishnishad I just had a quick look at it.
Quick Workaround is maybe;
I'll try to find/build in this option in this version of PHPPresentation
@Laar2 I have an issue with .wav extension audio, in PowerPoint showing codec unavailable.
@ashishnishad Google is showing lots of solutions for that. Have you tried mp3?
@Laar2 Yeah, mp3 is working fine but i am recording voice from my website and then using in ppt and recorded audio in .wav format
@ashishnishad I don't think the problem is in PHPPresentation. Maybe your recorded WAV does not have the right format/codec? Maybe the codec you use on your website isn't present on the computer you play the wav (in PPTX) ??
Did you unzip the PPTX and tried to play the wav directly on your machine?
@Laar2 Yes audio is playing fine in browser.
@Laar2 Have you any idea about why exported ppt is not working in ppt 2007 version ?
Update :
code available in this repo: https://github.com/Laar2/PHPPresentation
I am using PHPPresentation to create PPTX for Office 2010. When adding a video the PPTX must be repaired. I compared some files and saw the following :
<a:blip r:embed="rId4"/>
must reference this image1.png<a:videoFile r:link="rId2"/>
must reference a video :<Relationship Id="rId2" Type= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" Target="../media/sintel_trailer-480p2.wmv"/>
<p14:media xmlns:p14 = "http://schemas.microsoft.com/office/powerpoint/2010/main" r:embed="rId3"/>
must reference a media file :<Relationship Id="rId3" Type="http://schemas.microsoft.com/office/2007/relationships/media" Target="../**media**/sintel_trailer-480p2.wmv"/>
<cNvPr>
has a duplicate ID, make these unique<p:timing>
bock is missing. the SPID values inside the timing block must match the ID of the second<cNvPr>
(the used IDs are only for clarifying ...)
So when the missing image is there, the references to the media are all ok and the controles are linked (shape-target) to the right ID, then it works OK in Office 2010.
Is there someone still working on PHPpresentation?
Sample_03_Image_manually_repaired.pptx Sample_03_Image_needs_repair.pptx
all_files.zip