private void mergefile(string wavefilepath, string videofilepath) { string Path_FFMPEG = Application.StartupPath + "\\ffmpeg.exe"; string Wavefile = wavefilepath; string video1 = videofilepath; //string file = @"D:\Developments\video\text.txt"; string strResult = @"C:\Users\aa\Desktop\video\Test1output.avi"; System.Diagnostics.Process proc = new System.Diagnostics.Process(); try { //ffmpeg -i clip.mp4 -itsoffset 0.150 -i clip.mp4 -vcodec copy -acodec copy -map 0:0 -map 1:1 output.mp4 // proc.StartInfo.Arguments = string.Format("-i {0} -itsoffset 0.000 -i {1} -vcodec copy -acodec copy -map 0:0 -map 1:0 {2}", video1, Wavefile, strResult); proc.StartInfo.Arguments = string.Format("-i {0} -i {1} -acodec copy -vcodec copy {2}", Wavefile, video1, strResult); proc.StartInfo.UseShellExecute = false; proc.StartInfo.CreateNoWindow = false; proc.StartInfo.RedirectStandardOutput = true; proc.StartInfo.RedirectStandardError = true; proc.StartInfo.FileName = Path_FFMPEG; proc.Start(); string StdOutVideo = proc.StandardOutput.ReadToEnd(); string StdErrVideo = proc.StandardError.ReadToEnd(); } catch { } finally { proc.WaitForExit(); proc.Close(); } }
proc.StartInfo.Arguments = string.Format("-i {0} -i {1} -acodec copy -vcodec copy -map 0:0 -map 0:1 {2}", Wavefile, video1, strResult);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)