private void OnMixCompleted(AVMixer sender) { Logger.Instance.WriteLog("MoviePostProcessor: finished"); if (File.Exists(VideoRecorder.OutputFilePath)) { FilePath = VideoRecorder.OutputFilePath; PostProcessingDone(this, true); } else { PostProcessingDone(this, false); } }
public Boolean CombineVideoAndAudio() { Logger.Instance.WriteLog("MoviePostProcessor: Start combine audio and video"); AVMixer mixer = new AVMixer(); mixer.VideoInput = VideoRecorder.VideoPath; mixer.AudioInput = VideoRecorder.AudioPath; mixer.OutputFilePath = VideoRecorder.OutputFilePath; mixer.MixCompleted += new AVMixer.MixCompletedDelegate(OnMixCompleted); if (cutter.Cutted) { mixer.SetDuration(cutter.StartTime, cutter.EndTime); } mixer.CombineAsync(); return(true); }