Guest User

Untitled

a guest
Jan 22nd, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. using System;
  2. using System.Diagnostics;
  3.  
  4. public static void Run(string input, TraceWriter log)
  5. {
  6. log.Info("Executing");
  7. using (var process = new Process())
  8. {
  9. process.StartInfo.FileName = @"D:homeffmpeg.exe";
  10. process.StartInfo.Arguments = @"-i D:homeAmnestyInternational.mp4 -ss 00:00:03 -t 00:00:08 -async 1 D:homecut.mp4";
  11. process.StartInfo.UseShellExecute = false;
  12. process.StartInfo.RedirectStandardOutput = true;
  13. process.StartInfo.RedirectStandardError = true;
  14. log.Info(Directory.GetCurrentDirectory());
  15. log.Info("Cutting starts:"+DateTime.Now.ToString("h:mm:ss tt"));
  16. process.Start();
  17. string output = process.StandardOutput.ReadToEnd();
  18. process.WaitForExit();
  19. log.Info("Cutting ends :"+DateTime.Now.ToString("h:mm:ss tt"));
  20. log.Info(output);
  21. }
  22. }
  23.  
  24. 2017-03-24T11:06:00.705 Function started (Id=df082f54-719a-415f-b7f1-b10548a213be)
  25. 2017-03-24T11:06:00.721 Executing
  26. 2017-03-24T11:06:00.721 D:Windowssystem32
  27. 2017-03-24T11:06:00.721 Cutting start :11:06:00 AM
  28. 2017-03-24T11:07:14 No new trace in the past 1 min(s).
  29. 2017-03-24T11:08:14 No new trace in the past 2 min(s).
  30. 2017-03-24T11:09:14 No new trace in the past 3 min(s).
  31. 2017-03-24T11:10:14 No new trace in the past 4 min(s).
  32. 2017-03-24T11:11:00.758 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.ManualTriggerCSharp1.
  33.  
  34. Directory.SetCurrentDirectory(@"D:home");
  35.  
  36. process.StartInfo.WorkingDirectory = @"D:home";
  37. process.StartInfo.FileName = "ffmpeg.exe";
Add Comment
Please, Sign In to add comment