Ranjit Kanase

Ranjit Kanase

  • NA
  • 17
  • 2k

PPT containing Video not converting to MP4 Video

Jul 5 2016 7:42 AM

I have Power Point Presentation file containing embeded video. In C#, I written logic to convert the PPT file into MP4 video.

  1. Microsoft.Office.Interop.PowerPoint.Presentation objTempPresentation = appPpt.Presentations.Open(FileName, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse);  
  2. objTempPresentation.CreateVideo(Mp4VideoName, false, 5, 480, 25, 75);  
  3. while (objTempPresentation.CreateVideoStatus == PpMediaTaskStatus.ppMediaTaskStatusInProgress)  
  4. {  
  5.    Thread.Sleep(100);  
  6. }  
  
It is working fine.

Now I want to execute that exe in windows task scheduler so that it will convert the Uploaded PPT/PPTX files to video on regular interval.

For the windows task scheduler the property is selected as "Run only when user is logged on."

It is working fine, able to convert PPT/PPTX files to MP4 video of any size.

The Issue is:-

This is done on "Azure Server", so I want this exe must be executed if user is logged on or not.

So for that I have set windows task scheduler property as "Run whether user is logged on or not"And Now the video is not generated correctly. It is creating only 5 seconds video of still image.

I am not sure why is this happening. Why video are not generating of full length when user is not logged in on Azure server.

Please let me know if any one have any idea about this. Thanks in advance.


Answers (3)