John Dsa

John Dsa

  • 2k
  • 28
  • 115

Create Video From PowerPoint Issues - IIS

Oct 14 2020 11:56 AM
I am using Microsoft Interop Library to create a Video from a powerpoint presentation.The power point presentation contains internal embedded videos and animations.
 
The Interop library works perfectly well and we are able to create the video successfully when we run the application in the Visual studio.
 
When we deploy the code in the IIS Server the Video creation still works successfully however, the Videos embedded internally within the presentation do not work.
 
Does anyone have any idea about this behavior of IIS and Visual Studio?
 
We have checked the Mime types in IIS and all extensions .mov. .mp4 are already present
 
Here is the code :
  1. var videoRelativePath = "\\UserData\\User_" + templateObj.UserId + "\\VideoTemplate\\Vid_" + timeStampNew + ".mp4";  
  2. var videoPath = _environment.ContentRootPath + videoRelativePath;  
  3. ErrorLoging.LogMessageInLogFile(System.DateTime.Today.ToLongTimeString() + " - " + "Initializing powerpoint application for video creation");  
  4. Microsoft.Office.Interop.PowerPoint.Application ppApp = new Microsoft.Office.Interop.PowerPoint.Application();  
  5. Microsoft.Office.Interop.PowerPoint.Presentations oPresSet = ppApp.Presentations;  
  6. ErrorLoging.LogMessageInLogFile(System.DateTime.Today.ToLongTimeString() + " - " + "OPening the presentation Instance");  
  7. Microsoft.Office.Interop.PowerPoint._Presentation oPres = oPresSet.Open(  
  8. videoFileNameForConversion,  
  9. MsoTriState.msoFalse,  
  10. MsoTriState.msoFalse,  
  11. MsoTriState.msoFalse);  
  12. //System.Threading.Thread.Sleep(180);  
  13. oPres.UpdateLinks();  
  14. try  
  15. {  
  16. //CreateVideo(string FileName, bool UseTimingsAndNarrations, int DefaultSlideDuration, int VertResolution, int FramesPerSecond, int Quality)  
  17. ErrorLoging.LogMessageInLogFile(System.DateTime.Today.ToLongTimeString() + " - " + "Calling CreateVideo ");  
  18. oPres.CreateVideo(videoPath);  
  19. }  
What we have already Tried:
 
IIS is running on local admin account and powerpoint has been granted launch permissions in DComconfig
Mime types for Video mp4 and .mov are added in IIS server

Brought to you by: