public void SaveSettings(ref VFCustomOutput customOutput) { if (rbCustomUseVideoCodecsCat.Checked) { customOutput.Video_Codec = cbCustomVideoCodecs.Text; customOutput.Video_Codec_UseFiltersCategory = false; } else { customOutput.Video_Codec = cbCustomDSFilterV.Text; customOutput.Video_Codec_UseFiltersCategory = true; } if (rbCustomUseAudioCodecsCat.Checked) { customOutput.Audio_Codec = cbCustomAudioCodecs.Text; customOutput.Audio_Codec_UseFiltersCategory = false; } else { customOutput.Audio_Codec = cbCustomDSFilterA.Text; customOutput.Audio_Codec_UseFiltersCategory = true; } customOutput.MuxFilter_Name = cbCustomMuxer.Text; customOutput.MuxFilter_IsEncoder = cbCustomMuxFilterIsEncoder.Checked; customOutput.SpecialFileWriter_Needed = cbUseSpecialFilewriter.Checked; customOutput.SpecialFileWriter_FilterName = cbCustomFilewriter.Text; }
public void LoadSettings(VFCustomOutput customOutput) { if (customOutput.Video_Codec_UseFiltersCategory) { rbCustomUseVideoCodecsCat.Checked = false; cbCustomVideoCodecs.Text = customOutput.Video_Codec; } else { rbCustomUseVideoCodecsCat.Checked = true; cbCustomDSFilterV.Text = customOutput.Video_Codec; } if (customOutput.Audio_Codec_UseFiltersCategory) { rbCustomUseAudioCodecsCat.Checked = false; cbCustomAudioCodecs.Text = customOutput.Audio_Codec; } else { rbCustomUseAudioCodecsCat.Checked = true; cbCustomDSFilterA.Text = customOutput.Audio_Codec; } cbCustomMuxer.Text = customOutput.MuxFilter_Name; cbCustomMuxFilterIsEncoder.Checked = customOutput.MuxFilter_IsEncoder; cbUseSpecialFilewriter.Checked = customOutput.SpecialFileWriter_Needed; cbCustomFilewriter.Text = customOutput.SpecialFileWriter_FilterName; }
private void SetCustomOutput(ref VFCustomOutput customOutput) { if (customFormatSettingsDialog == null) { customFormatSettingsDialog = new CustomFormatSettingsDialog(VideoEdit1.Video_Codecs.ToArray(), VideoEdit1.Audio_Codecs.ToArray(), VideoEdit1.DirectShow_Filters.ToArray()); } customFormatSettingsDialog.SaveSettings(ref customOutput); }
public void SetCustomOutput(ref VFCustomOutput customOutput, VideoCaptureCore core) { if (customFormatSettingsDialog == null) { customFormatSettingsDialog = new CustomFormatSettingsDialog(core.Video_Codecs().ToArray(), core.Audio_Codecs().ToArray(), core.DirectShow_Filters().ToArray()); } customFormatSettingsDialog.SaveSettings(ref customOutput); }
private async void BtStart_Click(object sender, EventArgs e) { VideoEdit1.Debug_Mode = cbDebugMode.Checked; VideoEdit1.Debug_Telemetry = cbTelemetry.Checked; mmLog.Clear(); VideoEdit1.Mode = VFVideoEditMode.Convert; VideoEdit1.Video_Effects_Clear(); VideoEdit1.Video_Resize = cbResize.Checked; if (VideoEdit1.Video_Resize) { VideoEdit1.Video_Resize_Width = Convert.ToInt32(edWidth.Text); VideoEdit1.Video_Resize_Height = Convert.ToInt32(edHeight.Text); } VideoEdit1.Video_FrameRate = Convert.ToDouble(cbFrameRate.Text, CultureInfo.InvariantCulture); VideoEdit1.Output_Filename = edOutput.Text; switch (cbOutputVideoFormat.SelectedIndex) { case 0: { var aviOutput = new VFAVIOutput(); SetAVIOutput(ref aviOutput); VideoEdit1.Output_Format = aviOutput; break; } case 1: { var mkvOutput = new VFMKVv1Output(); SetMKVOutput(ref mkvOutput); VideoEdit1.Output_Format = mkvOutput; break; } case 2: { var wmvOutput = new VFWMVOutput(); SetWMVOutput(ref wmvOutput); VideoEdit1.Output_Format = wmvOutput; break; } case 3: { var dvOutput = new VFDVOutput(); SetDVOutput(ref dvOutput); VideoEdit1.Output_Format = dvOutput; break; } case 4: { var acmOutput = new VFACMOutput(); SetACMOutput(ref acmOutput); VideoEdit1.Output_Format = acmOutput; break; } case 5: { var mp3Output = new VFMP3Output(); SetMP3Output(ref mp3Output); VideoEdit1.Output_Format = mp3Output; break; } case 6: { var m4aOutput = new VFM4AOutput(); SetM4AOutput(ref m4aOutput); VideoEdit1.Output_Format = m4aOutput; break; } case 7: { var wmaOutput = new VFWMAOutput(); SetWMAOutput(ref wmaOutput); VideoEdit1.Output_Format = wmaOutput; break; } case 8: { var oggVorbisOutput = new VFOGGVorbisOutput(); SetOGGOutput(ref oggVorbisOutput); VideoEdit1.Output_Format = oggVorbisOutput; break; } case 9: { var flacOutput = new VFFLACOutput(); SetFLACOutput(ref flacOutput); VideoEdit1.Output_Format = flacOutput; break; } case 10: { var speexOutput = new VFSpeexOutput(); SetSpeexOutput(ref speexOutput); VideoEdit1.Output_Format = speexOutput; break; } case 11: { var customOutput = new VFCustomOutput(); SetCustomOutput(ref customOutput); VideoEdit1.Output_Format = customOutput; break; } case 12: { var webmOutput = new VFWebMOutput(); SetWebMOutput(ref webmOutput); VideoEdit1.Output_Format = webmOutput; break; } case 13: { var ffmpegDLLOutput = new VFFFMPEGDLLOutput(); SetFFMPEGDLLOutput(ref ffmpegDLLOutput); VideoEdit1.Output_Format = ffmpegDLLOutput; break; } case 14: { var ffmpegOutput = new VFFFMPEGEXEOutput(); SetFFMPEGEXEOutput(ref ffmpegOutput); VideoEdit1.Output_Format = ffmpegOutput; break; } case 15: { var mp4Output = new VFMP4v8v10Output(); SetMP4v10Output(ref mp4Output); VideoEdit1.Output_Format = mp4Output; break; } case 16: { var mp4Output = new VFMP4v11Output(); SetMP4v11Output(ref mp4Output); VideoEdit1.Output_Format = mp4Output; break; } case 17: { var gifOutput = new VFAnimatedGIFOutput(); SetGIFOutput(ref gifOutput); VideoEdit1.Output_Format = gifOutput; break; } case 18: MessageBox.Show("Please use Main Demo to create encrypted files."); return; } VideoEdit1.Audio_Preview_Enabled = true; await VideoEdit1.StartAsync(); }
public void FillSettings(VFVideoCaptureOutputFormat format, VideoCaptureCore core) { switch (format) { case VFVideoCaptureOutputFormat.AVI: { var aviOutput = new VFAVIOutput(); SetAVIOutput(ref aviOutput, core); core.Output_Format = aviOutput; break; } case VFVideoCaptureOutputFormat.WMV: { var wmvOutput = new VFWMVOutput(); SetWMVOutput(ref wmvOutput, core); core.Output_Format = wmvOutput; break; } case VFVideoCaptureOutputFormat.DV: { var dvOutput = new VFDVOutput(); SetDVOutput(ref dvOutput); core.Output_Format = dvOutput; break; } case VFVideoCaptureOutputFormat.MKVv1: { var mkvOutput = new VFMKVv1Output(); SetMKVOutput(ref mkvOutput, core); core.Output_Format = mkvOutput; break; } case VFVideoCaptureOutputFormat.PCM_ACM: { var acmOutput = new VFACMOutput(); SetACMOutput(ref acmOutput, core); core.Output_Format = acmOutput; break; } case VFVideoCaptureOutputFormat.WMA: { var wmaOutput = new VFWMAOutput(); SetWMAOutput(ref wmaOutput, core); core.Output_Format = wmaOutput; break; } case VFVideoCaptureOutputFormat.MP3: { var mp3Output = new VFMP3Output(); SetMP3Output(ref mp3Output); core.Output_Format = mp3Output; break; } case VFVideoCaptureOutputFormat.Custom: { var customOutput = new VFCustomOutput(); SetCustomOutput(ref customOutput, core); core.Output_Format = customOutput; break; } case VFVideoCaptureOutputFormat.DirectCaptureDV: { core.Output_Format = new VFDirectCaptureDVOutput(); break; } case VFVideoCaptureOutputFormat.DirectCaptureMPEG: { core.Output_Format = new VFDirectCaptureMPEGOutput(); break; } case VFVideoCaptureOutputFormat.DirectCaptureAVI: { core.Output_Format = new VFDirectCaptureAVIOutput(); break; } case VFVideoCaptureOutputFormat.DirectCaptureMKV: { core.Output_Format = new VFDirectCaptureMKVOutput(); break; } case VFVideoCaptureOutputFormat.FFMPEG_DLL: { var ffmpegDLLOutput = new VFFFMPEGDLLOutput(); SetFFMPEGDLLOutput(ref ffmpegDLLOutput); core.Output_Format = ffmpegDLLOutput; break; } case VFVideoCaptureOutputFormat.WebM: { var webmOutput = new VFWebMOutput(); SetWebMOutput(ref webmOutput); core.Output_Format = webmOutput; break; } case VFVideoCaptureOutputFormat.DirectCaptureMP4_GDCL: { var directCaptureOutputGDCL = new VFDirectCaptureMP4Output(); SetDirectCaptureCustomOutput(ref directCaptureOutputGDCL, core); directCaptureOutputGDCL.Muxer = VFDirectCaptureMP4Muxer.GDCL; core.Output_Format = directCaptureOutputGDCL; break; } case VFVideoCaptureOutputFormat.DirectCaptureMP4_Monogram: { var directCaptureOutputMG = new VFDirectCaptureMP4Output(); SetDirectCaptureCustomOutput(ref directCaptureOutputMG, core); directCaptureOutputMG.Muxer = VFDirectCaptureMP4Muxer.Monogram; core.Output_Format = directCaptureOutputMG; break; } case VFVideoCaptureOutputFormat.DirectCaptureCustom: { var directCaptureOutput = new VFDirectCaptureCustomOutput(); SetDirectCaptureCustomOutput(ref directCaptureOutput, core); core.Output_Format = directCaptureOutput; break; } case VFVideoCaptureOutputFormat.MP4_CUDA: { if (mp4V10SettingsDialog == null) { mp4V10SettingsDialog = new MP4v10SettingsDialog(); } var mp4Output = new VFMP4v8v10Output(); SetMP4Output(ref mp4Output); core.Output_Format = mp4Output; break; } case VFVideoCaptureOutputFormat.MP4v8v10: { if (mp4V10SettingsDialog == null) { mp4V10SettingsDialog = new MP4v10SettingsDialog(); } var mp4Output = new VFMP4v8v10Output(); SetMP4Output(ref mp4Output); core.Output_Format = mp4Output; break; } case VFVideoCaptureOutputFormat.MP4v11: { var mp4Output = new VFMP4v11Output(); SetMP4Output(ref mp4Output); core.Output_Format = mp4Output; break; } case VFVideoCaptureOutputFormat.Encrypted: { if (mp4V10SettingsDialog == null) { mp4V10SettingsDialog = new MP4v10SettingsDialog(); } var mp4Output = new VFMP4v8v10Output(); SetMP4Output(ref mp4Output); mp4Output.Encryption = true; core.Output_Format = mp4Output; break; } case VFVideoCaptureOutputFormat.FLAC: { var flacOutput = new VFFLACOutput(); SetFLACOutput(ref flacOutput); core.Output_Format = flacOutput; break; } case VFVideoCaptureOutputFormat.OggVorbis: { var oggVorbisOutput = new VFOGGVorbisOutput(); SetOGGOutput(ref oggVorbisOutput); core.Output_Format = oggVorbisOutput; break; } case VFVideoCaptureOutputFormat.Speex: { var speexOutput = new VFSpeexOutput(); SetSpeexOutput(ref speexOutput); core.Output_Format = speexOutput; break; } case VFVideoCaptureOutputFormat.FFMPEG_EXE: { var ffmpegOutput = new VFFFMPEGEXEOutput(); SetFFMPEGEXEOutput(ref ffmpegOutput); core.Output_Format = ffmpegOutput; break; } case VFVideoCaptureOutputFormat.M4A: { var m4aOutput = new VFM4AOutput(); SetM4AOutput(ref m4aOutput); core.Output_Format = m4aOutput; break; } case VFVideoCaptureOutputFormat.AnimatedGIF: { var gifOutput = new VFAnimatedGIFOutput(); SetGIFOutput(ref gifOutput); core.Output_Format = gifOutput; break; } case VFVideoCaptureOutputFormat.VLC_EXE: { var vlcOutput = new VFVLCEXEOutput(); //SetGIFOutput(ref gifOutput); core.Output_Format = vlcOutput; break; } default: throw new ArgumentOutOfRangeException(nameof(format), format, null); } }