private void SetSpeexOutput(ref VFSpeexOutput speexOutput) { if (speexSettingsDialog == null) { speexSettingsDialog = new SpeexSettingsDialog(); } speexSettingsDialog.SaveSettings(ref speexOutput); }
public void SaveSettings(ref VFSpeexOutput speexOutput) { speexOutput.BitRate = tbSpeexBitrate.Value; speexOutput.BitrateControl = (SpeexBitrateControl)cbSpeexBitrateControl.SelectedIndex; speexOutput.Mode = (SpeexEncodeMode)cbSpeexMode.SelectedIndex; speexOutput.MaxBitRate = tbSpeexMaxBitrate.Value; speexOutput.Complexity = tbSpeexComplexity.Value; speexOutput.Quality = tbSpeexQuality.Value; speexOutput.UseAGC = cbSpeexAGC.Checked; speexOutput.UseDTX = cbSpeexDTX.Checked; speexOutput.UseDenoise = cbSpeexDenoise.Checked; speexOutput.UseVAD = cbSpeexVAD.Checked; }
public void LoadSettings(VFSpeexOutput speexOutput) { tbSpeexBitrate.Value = speexOutput.BitRate; cbSpeexBitrateControl.SelectedIndex = (int)speexOutput.BitrateControl; cbSpeexMode.SelectedIndex = (int)speexOutput.Mode; tbSpeexMaxBitrate.Value = speexOutput.MaxBitRate; tbSpeexComplexity.Value = speexOutput.Complexity; tbSpeexQuality.Value = speexOutput.Quality; cbSpeexAGC.Checked = speexOutput.UseAGC; cbSpeexDTX.Checked = speexOutput.UseDTX; cbSpeexDenoise.Checked = speexOutput.UseDenoise; cbSpeexVAD.Checked = speexOutput.UseVAD; }
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(); }
private void btStart_Click(object sender, RoutedEventArgs e) { mmLog.Clear(); VideoCapture1.Debug_Mode = cbDebugMode.IsChecked == true; VideoCapture1.Debug_Dir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\"; VideoCapture1.Audio_CaptureDevice = cbAudioInputDevice.Text; VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text; VideoCapture1.Audio_CaptureDevice_Format = cbAudioInputFormat.Text; VideoCapture1.Audio_CaptureDevice_Format_UseBest = false; VideoCapture1.Audio_CaptureDevice_Line = cbAudioInputLine.Text; VideoCapture1.Audio_PlayAudio = cbPlayAudio.IsChecked == true; VideoCapture1.Video_Renderer.VideoRendererInternal = VFVideoRendererInternal.None; if (cbMode.SelectedIndex == 0) { VideoCapture1.Mode = VFVideoCaptureMode.AudioPreview; VideoCapture1.Audio_RecordAudio = true; } else { VideoCapture1.Mode = VFVideoCaptureMode.AudioCapture; VideoCapture1.Audio_RecordAudio = true; VideoCapture1.Output_Filename = edOutput.Text; switch (cbOutputFormat.SelectedIndex) { case 0: { var acmOutput = new VFACMOutput(); SetACMOutput(ref acmOutput); VideoCapture1.Output_Format = acmOutput; break; } case 1: { var mp3Output = new VFMP3Output(); SetMP3Output(ref mp3Output); VideoCapture1.Output_Format = mp3Output; break; } case 2: { var wmaOutput = new VFWMAOutput(); SetWMAOutput(ref wmaOutput); VideoCapture1.Output_Format = wmaOutput; break; } case 3: { var oggVorbisOutput = new VFOGGVorbisOutput(); SetOGGOutput(ref oggVorbisOutput); VideoCapture1.Output_Format = oggVorbisOutput; break; } case 4: { var flacOutput = new VFFLACOutput(); SetFLACOutput(ref flacOutput); VideoCapture1.Output_Format = flacOutput; break; } case 5: { var speexOutput = new VFSpeexOutput(); SetSpeexOutput(ref speexOutput); VideoCapture1.Output_Format = speexOutput; break; } case 6: { var m4aOutput = new VFM4AOutput(); SetM4AOutput(ref m4aOutput); VideoCapture1.Output_Format = m4aOutput; break; } } } // Audio processing VideoCapture1.Audio_Effects_Clear(-1); VideoCapture1.Audio_Effects_Enabled = true; VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Amplify, cbAudAmplifyEnabled.IsChecked == true, -1, -1); VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Equalizer, cbAudEqualizerEnabled.IsChecked == true, -1, -1); VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.TrueBass, cbAudTrueBassEnabled.IsChecked == true, -1, -1); VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Sound3D, cbAudSound3DEnabled.IsChecked == true, -1, -1); VideoCapture1.Start(); }
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); } }