2
Answers

PPT containing Video not converting to MP4 Video

Photo of Ranjit Kanase

Ranjit Kanase

8y
287
1

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 (2)

1
Photo of Manish Dwivedi
NA 8.3k 1.2m 14y

Hi will,
for str, single character is converted to its relevant ASCII value.
Same is happen for str2 , taking ASCII value for characters(Here fix string is AMEND, you have to make it large like AMENDING)
and str3 we are taking the difference of ASCII value.

and making the format like that 1245/2543/475812
and in last line the value you got is converted to datetime.
This is the working og this code, but still i didn't get the purpose of code.
 
 
 


 
Anybody wish to share with me how this code actually works?
 
Accepted
0
Photo of Will
NA 3 1.8k 14y

Thank You very much for your answer.
I had worked out that it was subtracting from the ASCII value of each character in the str2 "string" moments before you post, and have since made the code work how I required :)
Regards :)