Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Diagnostics;
- public static void Run(string input, TraceWriter log)
- {
- log.Info("Executing");
- using (var process = new Process())
- {
- process.StartInfo.FileName = @"D:homeffmpeg.exe";
- process.StartInfo.Arguments = @"-i D:homeAmnestyInternational.mp4 -ss 00:00:03 -t 00:00:08 -async 1 D:homecut.mp4";
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.RedirectStandardOutput = true;
- process.StartInfo.RedirectStandardError = true;
- log.Info(Directory.GetCurrentDirectory());
- log.Info("Cutting starts:"+DateTime.Now.ToString("h:mm:ss tt"));
- process.Start();
- string output = process.StandardOutput.ReadToEnd();
- process.WaitForExit();
- log.Info("Cutting ends :"+DateTime.Now.ToString("h:mm:ss tt"));
- log.Info(output);
- }
- }
- 2017-03-24T11:06:00.705 Function started (Id=df082f54-719a-415f-b7f1-b10548a213be)
- 2017-03-24T11:06:00.721 Executing
- 2017-03-24T11:06:00.721 D:Windowssystem32
- 2017-03-24T11:06:00.721 Cutting start :11:06:00 AM
- 2017-03-24T11:07:14 No new trace in the past 1 min(s).
- 2017-03-24T11:08:14 No new trace in the past 2 min(s).
- 2017-03-24T11:09:14 No new trace in the past 3 min(s).
- 2017-03-24T11:10:14 No new trace in the past 4 min(s).
- 2017-03-24T11:11:00.758 Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: Functions.ManualTriggerCSharp1.
- Directory.SetCurrentDirectory(@"D:home");
- process.StartInfo.WorkingDirectory = @"D:home";
- process.StartInfo.FileName = "ffmpeg.exe";
Add Comment
Please, Sign In to add comment