private void DestroyEngine() { VideoEdit1.OnError -= VideoEdit1_OnError; VideoEdit1.OnStop -= VideoEdit1_OnStop; VideoEdit1.OnProgress -= VideoEdit1_OnProgress; VideoEdit1.Dispose(); VideoEdit1 = null; }
public ActionResult StartConvertClick() { var sourceFile = Session["UploadedFile"].ToString(); var sourceFileFull = Path.Combine(Server.MapPath("~/Data/"), sourceFile); ViewBag.Message = $"Converting... ({sourceFile})"; _core = new VideoEditCore(); _core.OnError += _core_OnError; _core.OnProgress += _core_OnProgress; _core.Input_AddVideoFile(sourceFileFull); _core.Input_AddAudioFile(sourceFileFull, sourceFileFull); _core.Mode = VFVideoEditMode.Convert; _core.Output_Format = new VFMP4v8v10Output(); _core.Output_Filename = Server.MapPath("~/Data/output.mp4"); _core.ConsoleUsage = true; _core.Start(); _core.Dispose(); return(RedirectToAction("Download", new { filename = "output.mp4" })); }