private void cbTextLogo_CheckedChanged(object sender, EventArgs e) { IVFVideoEffectTextLogo textLogo; var effect = VideoEdit1.Video_Effects_Get("TextLogo"); if (effect == null) { textLogo = new VFVideoEffectTextLogo(cbTextLogo.Checked); VideoEdit1.Video_Effects_Add(textLogo); } else { textLogo = effect as IVFVideoEffectTextLogo; } if (textLogo == null) { MessageBox.Show("Unable to configure text logo effect."); return; } textLogo.Enabled = cbTextLogo.Checked; textLogo.Text = edTextLogo.Text; textLogo.Left = Convert.ToInt32(edTextLogoLeft.Text); textLogo.Top = Convert.ToInt32(edTextLogoTop.Text); textLogo.Font = fontDialog1.Font; textLogo.FontColor = fontDialog1.Color; textLogo.TransparencyLevel = tbTextLogoTransp.Value; textLogo.Update(); }
private void cbImageLogo_CheckedChanged(object sender, EventArgs e) { if (this.cbImageLogo.Checked) { IVFVideoEffectImageLogo imageLogo; var effect = VideoEdit1.Video_Effects_Get("ImageLogo"); if (effect == null) { imageLogo = new VFVideoEffectImageLogo(cbImageLogo.Checked); VideoEdit1.Video_Effects_Add(imageLogo); } else { imageLogo = effect as IVFVideoEffectImageLogo; } if (imageLogo == null) { MessageBox.Show("Unable to configure image logo effect."); return; } imageLogo.Enabled = cbImageLogo.Checked; imageLogo.Filename = edImageLogoFilename.Text; imageLogo.Left = Convert.ToUInt32(edImageLogoLeft.Text); imageLogo.Top = Convert.ToUInt32(edImageLogoTop.Text); imageLogo.TransparencyLevel = (int)tbImageLogoTransp.Value; imageLogo.AnimationEnabled = true; } }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } mp4SettingsDialog?.Dispose(); mp4SettingsDialog = null; mp4HWSettingsDialog?.Dispose(); mp4HWSettingsDialog = null; mp3SettingsDialog?.Dispose(); mp3SettingsDialog = null; m4aSettingsDialog?.Dispose(); m4aSettingsDialog = null; gifSettingsDialog?.Dispose(); gifSettingsDialog = null; flacSettingsDialog?.Dispose(); flacSettingsDialog = null; ffmpegSettingsDialog?.Dispose(); ffmpegSettingsDialog = null; ffmpegEXESettingsDialog?.Dispose(); ffmpegEXESettingsDialog = null; dvSettingsDialog?.Dispose(); dvSettingsDialog = null; aviSettingsDialog?.Dispose(); aviSettingsDialog = null; customFormatSettingsDialog?.Dispose(); customFormatSettingsDialog = null; wmvSettingsDialog?.Dispose(); wmvSettingsDialog = null; webmSettingsDialog?.Dispose(); webmSettingsDialog = null; speexSettingsDialog?.Dispose(); speexSettingsDialog = null; pcmSettingsDialog?.Dispose(); pcmSettingsDialog = null; oggVorbisSettingsDialog?.Dispose(); oggVorbisSettingsDialog = null; VideoEdit1?.Dispose(); VideoEdit1 = null; base.Dispose(disposing); }
private void btLogoEdit_Click(object sender, EventArgs e) { if (lbLogos.SelectedItem != null) { var effect = VideoEdit1.Video_Effects_Get((string)lbLogos.SelectedItem); if (effect.GetEffectType() == VFVideoEffectType.TextLogo) { var dlg = new TextLogoSettingsDialog(); dlg.Attach(effect); dlg.ShowDialog(this); dlg.Dispose(); } else if (effect.GetEffectType() == VFVideoEffectType.ImageLogo) { var dlg = new ImageLogoSettingsDialog(); dlg.Attach(effect); dlg.ShowDialog(this); dlg.Dispose(); } } }
private void btLogoRemove_Click(object sender, EventArgs e) { if (lbLogos.SelectedItem != null) { VideoEdit1.Video_Effects_Remove((string)lbLogos.SelectedItem); lbLogos.Items.Remove(lbLogos.SelectedItem); } }
private async void BtStop_Click(object sender, EventArgs e) { await VideoEdit1.StopAsync(); lbFiles.Items.Clear(); VideoEdit1.Input_Clear_List(); ProgressBar1.Value = 0; }
public void AFStopDelegateMethod() { ProgressBar1.Value = 0; VideoEdit1.Sources_Clear(); lbFiles.Items.Clear(); MessageBox.Show("Complete", string.Empty, MessageBoxButtons.OK); }
private void btStop_Click(object sender, EventArgs e) { VideoEdit1.Stop(); ProgressBar1.Value = 0; VideoEdit1.Input_Clear_List(); lbFiles.Items.Clear(); }
public void StopDelegateMethod() { pbProgress.Value = 0; VideoEdit1.Sources_Clear(); lbFiles.Items.Clear(); MessageBox.Show("Complete"); }
private void btAddTransition_Click(object sender, EventArgs e) { // get id int id = VideoEdit.Video_Transition_GetIDFromName(cbTransitionName.Text); // add transition VideoEdit1.Video_Transition_Add(Convert.ToInt32(edTransStartTime.Text), Convert.ToInt32(edTransStopTime.Text), id); // add to list lbTransitions.Items.Add(cbTransitionName.Text + "(Start: " + edTransStartTime.Text + ", stop: " + edTransStopTime.Text + ")"); }
private async void btAddInputFile_Click(object sender, EventArgs e) { if (OpenDialog1.ShowDialog() == DialogResult.OK) { VideoEdit1.Video_FrameRate = Convert.ToDouble(cbFrameRate.Text); // resize if required int customWidth = 0; int customHeight = 0; if (cbResize.Checked) { customWidth = Convert.ToInt32(edWidth.Text); customHeight = Convert.ToInt32(edHeight.Text); } foreach (var s in OpenDialog1.FileNames) { lbFiles.Items.Add(s); if ((string.Compare(GetFileExt(s), ".BMP", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".JPG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".JPEG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".GIF", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".PNG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".TIF", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".TIFF", StringComparison.OrdinalIgnoreCase) == 0)) { await VideoEdit1.Input_AddImageFileAsync(s, TimeSpan.FromMilliseconds(2000), null, VFVideoEditStretchMode.Letterbox, 0, customWidth, customHeight); } else if ((string.Compare(GetFileExt(s), ".WAV", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".MP3", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".OGG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".AAC", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".M4A", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".WMA", StringComparison.OrdinalIgnoreCase) == 0)) { var audioFile = new VFVEAudioSource(s, null, null, string.Empty, 0, 1.0); await VideoEdit1.Input_AddAudioFileAsync(audioFile, null, 0); } else { var audioFile = new VFVEAudioSource(s, null, null, s, 0, 1.0); var videoFile = new VFVEVideoSource(s, null, null, VFVideoEditStretchMode.Letterbox, 0, 1.0); await VideoEdit1.Input_AddVideoFileAsync(videoFile, null, 0, customWidth, customHeight); await VideoEdit1.Input_AddAudioFileAsync(audioFile, null, 0); } } } }
private void Form1_Load(object sender, EventArgs e) { Text += " (SDK v" + VideoEdit1.SDK_Version + ", " + VideoEdit1.SDK_State + ")"; edOutput.Text = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\" + "output.avi"; VideoEdit1.Debug_Dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\"; cbFrameRate.SelectedIndex = 7; cbChannels.SelectedIndex = 0; cbSampleRate.SelectedIndex = 0; cbBPS.SelectedIndex = 0; for (int i = 0; i < VideoEdit1.Video_Codecs().Count; i++) { cbVideoCodec.Items.Add(VideoEdit1.Video_Codecs()[i]); } for (int i = 0; i < VideoEdit1.Audio_Codecs().Count; i++) { cbAudioCodec.Items.Add(VideoEdit1.Audio_Codecs()[i]); } cbVideoCodec.SelectedIndex = 0; cbAudioCodec.SelectedIndex = 0; for (int i = 0; i < VideoEdit1.WMV_Internal_Profiles().Count; i++) { cbWMVInternalProfile9.Items.Add(VideoEdit1.WMV_Internal_Profiles()[i]); } cbWMVInternalProfile9.SelectedIndex = 0; cbVideoCodec_SelectedIndexChanged(null, null); cbAudioCodec_SelectedIndexChanged(null, null); for (int i = 0; i < VideoEdit1.Video_Transition_Names().Count; i++) { cbTransitionName.Items.Add(VideoEdit1.Video_Transition_Names()[i]); } cbTransitionName.SelectedIndex = 0; if (cbAudioCodec.Items.IndexOf("PCM") != -1) { cbAudioCodec.SelectedIndex = cbAudioCodec.Items.IndexOf("PCM"); } if (cbVideoCodec.Items.IndexOf("MJPEG Compressor") != -1) { cbVideoCodec.SelectedIndex = cbVideoCodec.Items.IndexOf("MJPEG Compressor"); } }
private void btAddInputFile_Click(object sender, EventArgs e) { if (OpenDialog1.ShowDialog() == DialogResult.OK) { string s = this.OpenDialog1.FileName; lbFiles.Items.Add(s); VideoEdit.GetFileLength(s, out var videoDuration, out var audioDuration); VideoEdit1.Sources_AddFile(s, videoDuration.TotalMilliseconds > 0, audioDuration.TotalMilliseconds > 0); } }
private void btImageLogoAdd_Click(object sender, EventArgs e) { var dlg = new ImageLogoSettingsDialog(); var name = dlg.GenerateNewEffectName(VideoEdit1); var effect = new VFVideoEffectImageLogo(true, name); VideoEdit1.Video_Effects_Add(effect); lbLogos.Items.Add(effect.Name); dlg.Fill(effect); dlg.ShowDialog(this); dlg.Dispose(); }
private void btAddInputFile_Click(object sender, RoutedEventArgs e) { if (openFileDialog1.ShowDialog() == true) { string s = openFileDialog1.FileName; lbFiles.Items.Add(s); TimeSpan videoDuration; TimeSpan audioDuration; VideoEdit.GetFileLength(s, out videoDuration, out audioDuration); VideoEdit1.Sources_AddFile(s, videoDuration.TotalMilliseconds > 0, audioDuration.TotalMilliseconds > 0); } }
private void btAddInputFile_Click(object sender, EventArgs e) { if (OpenDialog1.ShowDialog() == DialogResult.OK) { VideoEdit1.Video_FrameRate = Convert.ToDouble(cbFrameRate.Text); // resize if required int customWidth = 0; int customHeight = 0; if (cbResize.Checked) { customWidth = Convert.ToInt32(edWidth.Text); customHeight = Convert.ToInt32(edHeight.Text); } string s = OpenDialog1.FileName; lbFiles.Items.Add(s); if ((string.Compare(GetFileExt(s), ".BMP", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".JPG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".JPEG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".GIF", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".PNG", StringComparison.OrdinalIgnoreCase) == 0)) { VideoEdit1.Input_AddImageFile(s, 2000, -1, VFVideoEditStretchMode.Letterbox, 0, customWidth, customHeight); } else if ((string.Compare(GetFileExt(s), ".WAV", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".MP3", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".OGG", StringComparison.OrdinalIgnoreCase) == 0) || (string.Compare(GetFileExt(s), ".WMA", StringComparison.OrdinalIgnoreCase) == 0)) { var audioFile = new VFVEAudioSource(s, -1, -1, string.Empty, 0, 1.0); VideoEdit1.Input_AddAudioFile(audioFile, -1, 0); } else { var audioFile = new VFVEAudioSource(s, -1, -1, s, 0, 1.0); var videoFile = new VFVEVideoSource( s, -1, -1, VFVideoEditStretchMode.Letterbox, 0, 1.0); VideoEdit1.Input_AddVideoFile(videoFile, -1, 0, customWidth, customHeight); VideoEdit1.Input_AddAudioFile(audioFile, -1, 0); } } }
private void Form1_Load(object sender, EventArgs e) { Text += " (SDK v" + VideoEdit1.SDK_Version + ", " + VideoEdit1.SDK_State + ")"; edOutput.Text = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\" + "output.mp4"; VideoEdit1.Debug_Dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\"; cbFrameRate.SelectedIndex = 7; for (int i = 0; i < VideoEdit1.Video_Transition_Names().Count; i++) { cbTransitionName.Items.Add(VideoEdit1.Video_Transition_Names()[i]); } cbTransitionName.SelectedIndex = 0; cbOutputFormat.SelectedIndex = 7; }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } mp4SettingsDialog?.Dispose(); mp4SettingsDialog = null; mp4HWSettingsDialog?.Dispose(); mp4HWSettingsDialog = null; webmSettingsDialog?.Dispose(); webmSettingsDialog = null; mp3SettingsDialog?.Dispose(); mp3SettingsDialog = null; aviSettingsDialog?.Dispose(); aviSettingsDialog = null; wmvSettingsDialog?.Dispose(); wmvSettingsDialog = null; gifSettingsDialog?.Dispose(); gifSettingsDialog = null; ffmpegEXESettingsDialog?.Dispose(); ffmpegEXESettingsDialog = null; ffmpegSettingsDialog?.Dispose(); ffmpegSettingsDialog = null; dvSettingsDialog?.Dispose(); dvSettingsDialog = null; loadedImage?.Dispose(); loadedImage = null; VideoEdit1?.Dispose(); VideoEdit1 = null; base.Dispose(disposing); }
private void VideoEdit1_OnStop(object sender, VideoEditStopEventArgs e) { ProgressBar1.Value = 0; if (e.Successful) { MessageBox.Show("Completed successfully", string.Empty, MessageBoxButtons.OK); } else { MessageBox.Show("Stopped with error", string.Empty, MessageBoxButtons.OK); } lbFiles.Items.Clear(); VideoEdit1.Input_Clear_List(); VideoEdit1.Video_Transition_Clear(); }
private void tbDarkness_Scroll(object sender, EventArgs e) { IVFVideoEffectDarkness darkness; var effect = VideoEdit1.Video_Effects_Get("Darkness"); if (effect == null) { darkness = new VFVideoEffectDarkness(true, tbDarkness.Value); VideoEdit1.Video_Effects_Add(darkness); } else { darkness = effect as IVFVideoEffectDarkness; if (darkness != null) { darkness.Value = tbDarkness.Value; } } }
private void cbGreyscale_CheckedChanged(object sender, EventArgs e) { IVFVideoEffectGrayscale grayscale; var effect = VideoEdit1.Video_Effects_Get("Grayscale"); if (effect == null) { grayscale = new VFVideoEffectGrayscale(cbGreyscale.Checked); VideoEdit1.Video_Effects_Add(grayscale); } else { grayscale = effect as IVFVideoEffectGrayscale; if (grayscale != null) { grayscale.Enabled = cbGreyscale.Checked; } } }
private void cbInvert_CheckedChanged(object sender, EventArgs e) { IVFVideoEffectInvert invert; var effect = VideoEdit1.Video_Effects_Get("Invert"); if (effect == null) { invert = new VFVideoEffectInvert(cbInvert.Checked); VideoEdit1.Video_Effects_Add(invert); } else { invert = effect as IVFVideoEffectInvert; if (invert != null) { invert.Enabled = cbInvert.Checked; } } }
private void cbFlipY_CheckedChanged(object sender, EventArgs e) { IVFVideoEffectFlipRight flip; var effect = VideoEdit1.Video_Effects_Get("FlipRight"); if (effect == null) { flip = new VFVideoEffectFlipVertical(cbFlipY.Checked); VideoEdit1.Video_Effects_Add(flip); } else { flip = effect as IVFVideoEffectFlipRight; if (flip != null) { flip.Enabled = cbFlipY.Checked; } } }
private void cbFlipX_CheckedChanged(object sender, EventArgs e) { IVFVideoEffectFlipDown flip; var effect = VideoEdit1.Video_Effects_Get("FlipDown"); if (effect == null) { flip = new VFVideoEffectFlipHorizontal(cbFlipX.Checked); VideoEdit1.Video_Effects_Add(flip); } else { flip = effect as IVFVideoEffectFlipDown; if (flip != null) { flip.Enabled = cbFlipX.Checked; } } }
private void tbContrast_Scroll(object sender, EventArgs e) { IVFVideoEffectContrast contrast; var effect = VideoEdit1.Video_Effects_Get("Contrast"); if (effect == null) { contrast = new VFVideoEffectContrast(true, tbContrast.Value); VideoEdit1.Video_Effects_Add(contrast); } else { contrast = effect as IVFVideoEffectContrast; if (contrast != null) { contrast.Value = tbContrast.Value; } } }
private void tbSaturation_Scroll(object sender, EventArgs e) { IVFVideoEffectSaturation saturation; var effect = VideoEdit1.Video_Effects_Get("Saturation"); if (effect == null) { saturation = new VFVideoEffectSaturation(tbSaturation.Value); VideoEdit1.Video_Effects_Add(saturation); } else { saturation = effect as IVFVideoEffectSaturation; if (saturation != null) { saturation.Value = tbSaturation.Value; } } }
private void tbLightness_Scroll(object sender, EventArgs e) { IVFVideoEffectLightness lightness; var effect = VideoEdit1.Video_Effects_Get("Lightness"); if (effect == null) { lightness = new VFVideoEffectLightness(true, tbLightness.Value); VideoEdit1.Video_Effects_Add(lightness); } else { lightness = effect as IVFVideoEffectLightness; if (lightness != null) { lightness.Value = tbLightness.Value; } } }
private void cbFadeInOut_CheckedChanged(object sender, EventArgs e) { if (rbFadeIn.Checked) { VideoEdit1.Video_Effects_Add_Simple( VFVideoEffectType.FadeIn, Convert.ToInt32(edFadeInOutStartTime.Text), Convert.ToInt32(edFadeInOutStopTime.Text), 0, 0); } else { VideoEdit1.Video_Effects_Add_Simple( VFVideoEffectType.FadeOut, Convert.ToInt32(edFadeInOutStartTime.Text), Convert.ToInt32(edFadeInOutStopTime.Text), 0, 0); } }
private void cbFadeInOut_Checked(object sender, RoutedEventArgs e) { if (rbFadeIn.IsChecked == true) { VideoEdit1.Video_Effects_Add_Simple( VFVideoEffectType.FadeIn, TimeSpan.FromMilliseconds(Convert.ToInt32(edFadeInOutStartTime.Text)), TimeSpan.FromMilliseconds(Convert.ToInt32(edFadeInOutStopTime.Text)), 0, 0); } else { VideoEdit1.Video_Effects_Add_Simple( VFVideoEffectType.FadeOut, TimeSpan.FromMilliseconds(Convert.ToInt32(edFadeInOutStartTime.Text)), TimeSpan.FromMilliseconds(Convert.ToInt32(edFadeInOutStopTime.Text)), 0, 0); } }
private void btStart_Click(object sender, EventArgs e) { mmLog.Clear(); VideoEdit1.Debug_Mode = cbDebugMode.Checked; VideoEdit1.Video_Effects_Clear(); VideoEdit1.Output_Filename = edOutput.Text; VideoEdit1.Profile = (VFFFMPEGSDKProfile)cbOutputVideoFormat.SelectedIndex; VideoEdit1.Output_Audio_Channels = (VFFFMPEGSDKAudioChannels)cbAudioChannels.SelectedIndex; VideoEdit1.Output_Audio_SampleRate = Convert.ToInt32(cbAudioSampleRate.Text); VideoEdit1.Output_Audio_Bitrate = Convert.ToInt32(cbAudioBitrate.Text) * 1000; VideoEdit1.Output_Audio_Encoder = (VFFFMPEGSDKAudioEncoder)cbAudioEncoder.SelectedIndex; VideoEdit1.Output_Video_AspectRatio = (VFFFMPEGSDKAspectRatio)cbAspectRatio.SelectedIndex; VideoEdit1.Output_Video_Bitrate = Convert.ToInt32(edTargetBitrate.Text) * 1000; VideoEdit1.Output_Video_BufferSize = Convert.ToInt32(edBufferSize.Text) * 1000; VideoEdit1.Output_Video_Bitrate_Min = Convert.ToInt32(edMinimalBitrate.Text) * 1000; VideoEdit1.Output_Video_Bitrate_Max = Convert.ToInt32(edMaximalBitrate.Text) * 1000; VideoEdit1.Output_Video_Encoder = (VFFFMPEGSDKVideoEncoder)cbVideoEncoder.SelectedIndex; VideoEdit1.Output_Video_FrameRate = (VFFFMPEGSDKFrameRate)cbFrameRate.SelectedIndex; VideoEdit1.Output_Muxer = (VFFFMPEGSDKMuxFormat)cbContainer.SelectedIndex; if (cbResize.Checked) { VideoEdit1.Output_Video_Width = Convert.ToInt32(edWidth.Text); VideoEdit1.Output_Video_Height = Convert.ToInt32(edHeight.Text); } else { VideoEdit1.Output_Video_Width = 0; VideoEdit1.Output_Video_Height = 0; } // Audio processing VideoEdit1.Audio_Effects_Clear(); if (cbAudAmplifyEnabled.Checked) { VideoEdit1.Audio_Effects_Add_Volume(tbAudAmplifyAmp.Value / 100.0); } if (cbAudEchoEnabled.Checked) { VideoEdit1.Audio_Effects_Add_Echo( tbAudDelayGainIn.Value / 100.0, tbAudDelayGainOut.Value / 100.0, tbAudDelay.Value, tbAudDelayGainDecay.Value / 100.0); } // Video processing VideoEdit1.Video_Effects_Clear(); if (cbVideoEffects.Checked) { VideoEdit1.Video_Effects_Add_Simple(VFVideoEffectType.Lightness, 0, 0, tbLightness.Value, 0); VideoEdit1.Video_Effects_Add_Simple(VFVideoEffectType.Contrast, 0, 0, tbContrast.Value, 0); VideoEdit1.Video_Effects_Add_Simple(VFVideoEffectType.Saturation, 0, 0, tbSaturation.Value, 0); if (cbInvert.Checked) { VideoEdit1.Video_Effects_Add_Simple(VFVideoEffectType.Invert, 0, 0, 0, 0); } if (cbGreyscale.Checked) { VideoEdit1.Video_Effects_Add_Simple(VFVideoEffectType.Greyscale, 0, 0, 0, 0); } if (cbGraphicLogo.Checked) { if (!cbGraphicLogoShowAlways.Checked) { VideoEdit1.Video_Effects_Add_ImageLogo( Convert.ToInt32(edGraphicLogoStartTime.Text), Convert.ToInt32(edGraphicLogoStopTime.Text), edGraphicLogoFilename.Text, Convert.ToInt32(edGraphicLogoLeft.Text), Convert.ToInt32(edGraphicLogoTop.Text)); } else { VideoEdit1.Video_Effects_Add_ImageLogo( 0, 0, edGraphicLogoFilename.Text, Convert.ToInt32(edGraphicLogoLeft.Text), Convert.ToInt32(edGraphicLogoTop.Text)); } } if (cbTextLogo.Checked) { if (!cbTextLogoShowAlways.Checked) { VideoEdit1.Video_Effects_Add_TextLogo( Convert.ToInt32(edTextLogoStartTime.Text), Convert.ToInt32(edTextLogoStopTime.Text), edTextLogoValue.Text, Convert.ToInt32(edTextLogoLeft.Text), Convert.ToInt32(edTextLogoTop.Text), FontDialog1.Font, FontDialog1.Color, Color.Transparent); } else { VideoEdit1.Video_Effects_Add_TextLogo( 0, 0, edTextLogoValue.Text, Convert.ToInt32(edTextLogoLeft.Text), Convert.ToInt32(edTextLogoTop.Text), FontDialog1.Font, FontDialog1.Color, Color.Transparent); } } if (cbDeinterlace.Checked) { VideoEdit1.Video_Effects_Add_Deinterlace(); } if (cbDenoise.Checked) { VideoEdit1.Video_Effects_Add_3DDenoise(); } } if (cbZoom.Checked) { double zoom = tbZoom.Value / 10.0; VideoEdit1.Video_Effects_Add_Zoom(0, 0, zoom, zoom, 0, 0); } if (cbPan.Checked) { VideoEdit1.Video_Effects_Add_Pan( Convert.ToInt32(edPanStartTime.Text), Convert.ToInt32(edPanStopTime.Text), Convert.ToInt32(edPanSourceLeft.Text), Convert.ToInt32(edPanSourceTop.Text), Convert.ToInt32(edPanSourceWidth.Text), Convert.ToInt32(edPanSourceHeight.Text), Convert.ToInt32(edPanDestLeft.Text), Convert.ToInt32(edPanDestTop.Text), Convert.ToInt32(edPanDestWidth.Text), Convert.ToInt32(edPanDestHeight.Text)); } if (cbFadeInOut.Checked) { if (rbFadeIn.Checked) { VideoEdit1.Video_Effects_Add_Simple( VFVideoEffectType.FadeIn, Convert.ToInt32(edFadeInOutStartTime.Text), Convert.ToInt32(edFadeInOutStopTime.Text), 0, 0); } else { VideoEdit1.Video_Effects_Add_Simple( VFVideoEffectType.FadeOut, Convert.ToInt32(edFadeInOutStartTime.Text), Convert.ToInt32(edFadeInOutStopTime.Text), 0, 0); } } // motion detection if (cbMotDetEnabled.Checked) { VideoEdit1.Motion_Detection = new MotionDetectionSettings(); VideoEdit1.Motion_Detection.Enabled = cbMotDetEnabled.Checked; VideoEdit1.Motion_Detection.Compare_Red = cbCompareRed.Checked; VideoEdit1.Motion_Detection.Compare_Green = cbCompareGreen.Checked; VideoEdit1.Motion_Detection.Compare_Blue = cbCompareBlue.Checked; VideoEdit1.Motion_Detection.Compare_Greyscale = cbCompareGreyscale.Checked; VideoEdit1.Motion_Detection.Highlight_Color = (VFMotionCHLColor)cbMotDetHLColor.SelectedIndex; VideoEdit1.Motion_Detection.Highlight_Enabled = cbMotDetHLEnabled.Checked; VideoEdit1.Motion_Detection.Highlight_Threshold = tbMotDetHLThreshold.Value; VideoEdit1.Motion_Detection.FrameInterval = Convert.ToInt32(edMotDetFrameInterval.Text); VideoEdit1.Motion_Detection.Matrix_Height = Convert.ToInt32(edMotDetMatrixHeight.Text); VideoEdit1.Motion_Detection.Matrix_Width = Convert.ToInt32(edMotDetMatrixWidth.Text); VideoEdit1.Motion_Detection.DropFrames_Enabled = cbMotDetDropFramesEnabled.Checked; VideoEdit1.Motion_Detection.DropFrames_Threshold = tbMotDetDropFramesThreshold.Value; } else { VideoEdit1.Motion_Detection = null; } // Object detection ConfigureObjectDetection(); // Chroma key ConfigureChromaKey(); // Barcode detection VideoEdit1.Barcode_Reader_Enabled = cbBarcodeDetectionEnabled.Checked; VideoEdit1.Barcode_Reader_Type = (VFBarcodeType)cbBarcodeType.SelectedIndex; VideoEdit1.Start(); }