예제 #1
0
        private void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Sample_Grabber_Enabled = true;

            VideoCapture1.Video_Renderer.Zoom_Ratio  = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftX = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftY = 0;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\";

            VideoCapture1.Audio_OutputDevice = "Default DirectSound Device";

            if (cbRecordAudio.Checked)
            {
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Audio_PlayAudio   = true;
            }
            else
            {
                VideoCapture1.Audio_RecordAudio = false;
                VideoCapture1.Audio_PlayAudio   = false;
            }

            // apply capture parameters
            VideoCapture1.Video_CaptureDevice = cbVideoInputDevice.Text;
            VideoCapture1.Video_CaptureDevice_IsAudioSource = cbUseAudioInputFromVideoCaptureDevice.Checked;
            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format_UseBest = cbUseBestAudioInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice_Format_UseBest = cbUseBestVideoInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice_Format         = cbVideoInputFormat.Text;
            VideoCapture1.Audio_CaptureDevice        = cbAudioInputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format = cbAudioInputFormat.Text;

            if (cbFramerate.SelectedIndex != -1)
            {
                VideoCapture1.Video_CaptureDevice_FrameRate = (float)Convert.ToDouble(cbFramerate.Text);
            }

            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.VideoPreview;
            }
            else
            {
                VideoCapture1.Mode            = VFVideoCaptureMode.VideoCapture;
                VideoCapture1.Output_Filename = edOutput.Text;

                switch (cbOutputFormat.SelectedIndex)
                {
                case 0:
                {
                    var aviOutput = new VFAVIOutput();
                    SetAVIOutput(ref aviOutput);
                    VideoCapture1.Output_Format = aviOutput;

                    break;
                }

                case 1:
                {
                    var mkvOutput = new VFMKVv1Output();
                    SetMKVOutput(ref mkvOutput);
                    VideoCapture1.Output_Format = mkvOutput;

                    break;
                }

                case 2:
                {
                    var wmvOutput = new VFWMVOutput();
                    SetWMVOutput(ref wmvOutput);
                    VideoCapture1.Output_Format = wmvOutput;

                    break;
                }

                case 3:
                {
                    var dvOutput = new VFDVOutput();
                    SetDVOutput(ref dvOutput);
                    VideoCapture1.Output_Format = dvOutput;

                    break;
                }

                case 4:
                {
                    var webmOutput = new VFWebMOutput();
                    SetWebMOutput(ref webmOutput);
                    VideoCapture1.Output_Format = webmOutput;

                    break;
                }

                case 5:
                {
                    var ffmpegDLLOutput = new VFFFMPEGDLLOutput();
                    SetFFMPEGDLLOutput(ref ffmpegDLLOutput);
                    VideoCapture1.Output_Format = ffmpegDLLOutput;

                    break;
                }

                case 6:
                {
                    var ffmpegOutput = new VFFFMPEGEXEOutput();
                    SetFFMPEGEXEOutput(ref ffmpegOutput);
                    VideoCapture1.Output_Format = ffmpegOutput;

                    break;
                }

                case 7:
                {
                    var mp4Output = new VFMP4v8v10Output();
                    SetMP4Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 8:
                {
                    var mp4Output = new VFMP4v11Output();
                    SetMP4v11Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 9:
                {
                    var gifOutput = new VFAnimatedGIFOutput();
                    SetGIFOutput(ref gifOutput);

                    VideoCapture1.Output_Format = gifOutput;

                    break;
                }

                case 10:
                {
                    var encOutput = new VFMP4v8v10Output();
                    SetMP4Output(ref encOutput);
                    encOutput.Encryption        = true;
                    encOutput.Encryption_Format = VFEncryptionFormat.MP4_H264_SW_AAC;

                    VideoCapture1.Output_Format = encOutput;

                    break;
                }

                case 11:
                {
                    var tsOutput = new VFMPEGTSOutput();
                    SetMPEGTSOutput(ref tsOutput);
                    VideoCapture1.Output_Format = tsOutput;

                    break;
                }

                case 12:
                {
                    var movOutput = new VFMOVOutput();
                    SetMOVOutput(ref movOutput);
                    VideoCapture1.Output_Format = movOutput;

                    break;
                }
                }
            }

            VideoCapture1.Video_Effects_Enabled = true;
            VideoCapture1.Video_Effects_Clear();
            lbLogos.Items.Clear();
            ConfigureVideoEffects();

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Amplify, cbAudAmplifyEnabled.Checked, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Equalizer, cbAudEqualizerEnabled.Checked, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.TrueBass, cbAudTrueBassEnabled.Checked, -1, -1);

            VideoCapture1.Start();

            tcMain.SelectedIndex = 4;
            tmRecording.Start();
        }
예제 #2
0
        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.Video_Renderer = VFVideoRendererWPF.None;

            if (rbPreview.IsChecked == true)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.AudioPreview;
                VideoCapture1.Audio_RecordAudio = true;
            }
            else
            {
                VideoCapture1.Mode = VFVideoCaptureMode.AudioCapture;
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Output_Filename   = edOutput.Text;

                if (cbOutputFormat.SelectedIndex == 0)
                {
                    var acmOutput = new VFACMOutput();

                    acmOutput.Name       = cbAudioCodecs.Text;
                    acmOutput.Channels   = Convert.ToInt32(cbChannels.Text);
                    acmOutput.BPS        = Convert.ToInt32(cbBPS.Text);
                    acmOutput.SampleRate = Convert.ToInt32(cbSampleRate.Text);

                    VideoCapture1.Output_Format = acmOutput;
                }
                else
                {
                    var mp3Output = new VFMP3Output();

                    //main
                    mp3Output.CBR_Bitrate     = Convert.ToInt32(cbLameCBRBitrate.Text);
                    mp3Output.VBR_MinBitrate  = Convert.ToInt32(cbLameVBRMin.Text);
                    mp3Output.VBR_MaxBitrate  = Convert.ToInt32(cbLameVBRMax.Text);
                    mp3Output.SampleRate      = Convert.ToInt32(cbLameSampleRate.Text);
                    mp3Output.VBR_Quality     = (int)tbLameVBRQuality.Value;
                    mp3Output.EncodingQuality = (int)tbLameEncodingQuality.Value;

                    if (rbLameStandardStereo.IsChecked == true)
                    {
                        mp3Output.ChannelsMode = VFLameChannelsMode.StandardStereo;
                    }
                    else if (rbLameJointStereo.IsChecked == true)
                    {
                        mp3Output.ChannelsMode = VFLameChannelsMode.JointStereo;
                    }
                    else if (rbLameDualChannels.IsChecked == true)
                    {
                        mp3Output.ChannelsMode = VFLameChannelsMode.DualStereo;
                    }
                    else
                    {
                        mp3Output.ChannelsMode = VFLameChannelsMode.Mono;
                    }

                    mp3Output.VBR_Mode = rbLameVBR.IsChecked == true;

                    // other
                    mp3Output.Copyright    = cbLameCopyright.IsChecked == true;
                    mp3Output.Original     = cbLameOriginal.IsChecked == true;
                    mp3Output.CRCProtected = cbLameCRCProtected.IsChecked == true;
                    mp3Output.ForceMono    = cbLameForceMono.IsChecked == true;
                    mp3Output.StrictlyEnforceVBRMinBitrate = cbLameStrictlyEnforceVBRMinBitrate.IsChecked == true;
                    mp3Output.VoiceEncodingMode            = cbLameVoiceEncodingMode.IsChecked == true;
                    mp3Output.KeepAllFrequencies           = cbLameKeepAllFrequencies.IsChecked == true;
                    mp3Output.StrictISOCompliance          = cbLameStrictISOCompilance.IsChecked == true;
                    mp3Output.DisableShortBlocks           = cbLameDisableShortBlocks.IsChecked == true;
                    mp3Output.EnableXingVBRTag             = cbLameEnableXingVBRTag.IsChecked == true;
                    mp3Output.ModeFixed = cbLameModeFixed.IsChecked == true;

                    VideoCapture1.Output_Format = mp3Output;
                }
            }

            // 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();
        }
예제 #3
0
        private void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Sample_Grabber_Enabled = true;

            VideoCapture1.Video_Renderer.Zoom_Ratio  = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftX = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftY = 0;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\";

            VideoCapture1.Audio_OutputDevice = "Default DirectSound Device";

            if (cbRecordAudio.Checked)
            {
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Audio_PlayAudio   = true;
            }
            else
            {
                VideoCapture1.Audio_RecordAudio = false;
                VideoCapture1.Audio_PlayAudio   = false;
            }

            // apply capture parameters
            VideoCapture1.Video_CaptureDevice = cbVideoInputDevice.Text;
            VideoCapture1.Video_CaptureDevice_IsAudioSource = cbUseAudioInputFromVideoCaptureDevice.Checked;
            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format_UseBest = cbUseBestAudioInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice_Format_UseBest = cbUseBestVideoInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice_Format         = cbVideoInputFormat.Text;
            VideoCapture1.Audio_CaptureDevice        = cbAudioInputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format = cbAudioInputFormat.Text;

            if (cbFramerate.SelectedIndex != -1)
            {
                VideoCapture1.Video_CaptureDevice_FrameRate = (float)Convert.ToDouble(cbFramerate.Text);
            }

            if (cbMode.SelectedIndex == 0)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.VideoPreview;
            }
            else
            {
                VideoCapture1.Mode            = VFVideoCaptureMode.VideoCapture;
                VideoCapture1.Output_Filename = edOutput.Text;

                if (cbMode.SelectedIndex == 1)
                {
                    var aviOutput = new VFAVIOutput();

                    aviOutput.ACM.Name       = cbAudioCodecs.Text;
                    aviOutput.ACM.Channels   = Convert.ToInt32(cbChannels.Text);
                    aviOutput.ACM.BPS        = Convert.ToInt32(cbBPS.Text);
                    aviOutput.ACM.SampleRate = Convert.ToInt32(cbSampleRate.Text);

                    aviOutput.Video_Codec = cbVideoCodecs.Text;

                    VideoCapture1.Output_Format = aviOutput;
                }
                else if (cbMode.SelectedIndex == 2)
                {
                    var wmvOutput = new VFWMVOutput();

                    wmvOutput.Mode = VFWMVMode.InternalProfile;

                    if (cbWMVInternalProfile9.SelectedIndex != -1)
                    {
                        wmvOutput.Internal_Profile_Name = cbWMVInternalProfile9.Text;
                    }

                    VideoCapture1.Output_Format = wmvOutput;
                }
                else if (cbMode.SelectedIndex == 3)
                {
                    var mp4Output = new VFMP4Output();

                    if (IsWindows7OrNewer())
                    {
                        mp4Output.MP4Mode = VFMP4Mode.v11;
                    }
                    else
                    {
                        mp4Output.MP4Mode = VFMP4Mode.v8;
                    }

                    VideoCapture1.Output_Format = mp4Output;
                }
            }

            VideoCapture1.Video_Effects_Enabled = true;
            VideoCapture1.Video_Effects_Clear();

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Amplify, cbAudAmplifyEnabled.Checked, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Equalizer, cbAudEqualizerEnabled.Checked, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.TrueBass, cbAudTrueBassEnabled.Checked, -1, -1);

            VideoCapture1.Start();
        }
예제 #4
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Sample_Grabber_Enabled = true;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\";

            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;

            if (cbRecordAudio.Checked)
            {
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Audio_PlayAudio   = true;
            }
            else
            {
                VideoCapture1.Audio_RecordAudio = false;
                VideoCapture1.Audio_PlayAudio   = false;
            }

            // apply capture parameters
            VideoCapture1.Decklink_Source = new DecklinkSourceSettings
            {
                Name        = cbDecklinkCaptureDevice.Text,
                VideoFormat = cbDecklinkCaptureVideoFormat.Text
            };

            if (rbPreview.Checked)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.DecklinkSourcePreview;
            }
            else
            {
                VideoCapture1.Mode            = VFVideoCaptureMode.DecklinkSourceCapture;
                VideoCapture1.Output_Filename = edOutput.Text;

                switch (cbOutputFormat.SelectedIndex)
                {
                case 0:
                {
                    var aviOutput = new VFAVIOutput();
                    SetAVIOutput(ref aviOutput);
                    VideoCapture1.Output_Format = aviOutput;

                    break;
                }

                case 1:
                {
                    var mkvOutput = new VFMKVv1Output();
                    SetMKVOutput(ref mkvOutput);
                    VideoCapture1.Output_Format = mkvOutput;

                    break;
                }

                case 2:
                {
                    var wmvOutput = new VFWMVOutput();
                    SetWMVOutput(ref wmvOutput);
                    VideoCapture1.Output_Format = wmvOutput;

                    break;
                }

                case 3:
                {
                    var dvOutput = new VFDVOutput();
                    SetDVOutput(ref dvOutput);
                    VideoCapture1.Output_Format = dvOutput;

                    break;
                }

                case 4:
                {
                    var webmOutput = new VFWebMOutput();
                    SetWebMOutput(ref webmOutput);
                    VideoCapture1.Output_Format = webmOutput;

                    break;
                }

                case 5:
                {
                    var ffmpegDLLOutput = new VFFFMPEGDLLOutput();
                    SetFFMPEGDLLOutput(ref ffmpegDLLOutput);
                    VideoCapture1.Output_Format = ffmpegDLLOutput;

                    break;
                }

                case 6:
                {
                    var ffmpegOutput = new VFFFMPEGEXEOutput();
                    SetFFMPEGEXEOutput(ref ffmpegOutput);
                    VideoCapture1.Output_Format = ffmpegOutput;

                    break;
                }

                case 7:
                {
                    var mp4Output = new VFMP4v8v10Output();
                    SetMP4Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 8:
                {
                    var mp4Output = new VFMP4v11Output();
                    SetMP4v11Output(ref mp4Output);
                    VideoCapture1.Output_Format = mp4Output;

                    break;
                }

                case 9:
                {
                    var gifOutput = new VFAnimatedGIFOutput();
                    SetGIFOutput(ref gifOutput);

                    VideoCapture1.Output_Format = gifOutput;

                    break;
                }

                case 10:
                {
                    var encOutput = new VFMP4v8v10Output();
                    SetMP4Output(ref encOutput);
                    encOutput.Encryption        = true;
                    encOutput.Encryption_Format = VFEncryptionFormat.MP4_H264_SW_AAC;

                    VideoCapture1.Output_Format = encOutput;

                    break;
                }

                case 11:
                {
                    var tsOutput = new VFMPEGTSOutput();
                    SetMPEGTSOutput(ref tsOutput);
                    VideoCapture1.Output_Format = tsOutput;

                    break;
                }

                case 12:
                {
                    var movOutput = new VFMOVOutput();
                    SetMOVOutput(ref movOutput);
                    VideoCapture1.Output_Format = movOutput;

                    break;
                }
                }
            }

            VideoCapture1.Video_Effects_Enabled = true;
            VideoCapture1.Video_Effects_Clear();
            lbLogos.Items.Clear();
            ConfigureVideoEffects();

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Amplify, cbAudAmplifyEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);

            await VideoCapture1.StartAsync();

            tcMain.SelectedIndex = 4;
            tmRecording.Start();
        }
예제 #5
0
        private void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            VideoCapture1.Video_Sample_Grabber_Enabled = true;

            VideoCapture1.Video_Renderer.Zoom_Ratio  = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftX = 0;
            VideoCapture1.Video_Renderer.Zoom_ShiftY = 0;

            VideoCapture1.Debug_Mode = cbDebugMode.Checked;
            VideoCapture1.Debug_Dir  = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\VisioForge\\";

            VideoCapture1.Audio_OutputDevice = "Default DirectSound Device";

            if (cbRecordAudio.Checked)
            {
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Audio_PlayAudio   = true;
            }
            else
            {
                VideoCapture1.Audio_RecordAudio = false;
                VideoCapture1.Audio_PlayAudio   = false;
            }

            // apply capture parameters
            VideoCapture1.Video_CaptureDevice = cbVideoInputDevice.Text;
            VideoCapture1.Video_CaptureDevice_IsAudioSource = cbUseAudioInputFromVideoCaptureDevice.Checked;
            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format_UseBest = cbUseBestAudioInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice_Format_UseBest = cbUseBestVideoInputFormat.Checked;
            VideoCapture1.Video_CaptureDevice_Format         = cbVideoInputFormat.Text;
            VideoCapture1.Audio_CaptureDevice        = cbAudioInputDevice.Text;
            VideoCapture1.Audio_CaptureDevice_Format = cbAudioInputFormat.Text;

            if (cbFramerate.SelectedIndex != -1)
            {
                VideoCapture1.Video_CaptureDevice_FrameRate = (float)Convert.ToDouble(cbFramerate.Text);
            }

            if (cbMode.SelectedIndex == 0)
            {
                VideoCapture1.Mode = VFVideoCaptureMode.VideoPreview;
            }
            else
            {
                VideoCapture1.Mode            = VFVideoCaptureMode.VideoCapture;
                VideoCapture1.Output_Filename = edOutput.Text;

                if (cbMode.SelectedIndex == 1)
                {
                    var aviOutput = new VFAVIOutput();

                    aviOutput.ACM.Name       = cbAudioCodecs.Text;
                    aviOutput.ACM.Channels   = Convert.ToInt32(cbChannels.Text);
                    aviOutput.ACM.BPS        = Convert.ToInt32(cbBPS.Text);
                    aviOutput.ACM.SampleRate = Convert.ToInt32(cbSampleRate.Text);

                    aviOutput.Video_Codec = cbVideoCodecs.Text;

                    VideoCapture1.Output_Format = aviOutput;
                }
                else if (cbMode.SelectedIndex == 2)
                {
                    var wmvOutput = new VFWMVOutput();

                    wmvOutput.Mode = VFWMVMode.InternalProfile;

                    if (cbWMVInternalProfile9.SelectedIndex != -1)
                    {
                        wmvOutput.Internal_Profile_Name = cbWMVInternalProfile9.Text;
                    }

                    VideoCapture1.Output_Format = wmvOutput;
                }
                else if (cbMode.SelectedIndex == 3)
                {
                    var mp4Output = new VFMP4Output();

                    // Main settings
                    mp4Output.MP4Mode = VFMP4Mode.v10;

                    // Video H264 settings
                    switch (cbH264Profile.SelectedIndex)
                    {
                    case 0:
                        mp4Output.Video_H264.Profile = VFH264Profile.ProfileAuto;
                        break;

                    case 1:
                        mp4Output.Video_H264.Profile = VFH264Profile.ProfileBaseline;
                        break;

                    case 2:
                        mp4Output.Video_H264.Profile = VFH264Profile.ProfileMain;
                        break;

                    case 3:
                        mp4Output.Video_H264.Profile = VFH264Profile.ProfileHigh;
                        break;

                    case 4:
                        mp4Output.Video_H264.Profile = VFH264Profile.ProfileHigh10;
                        break;

                    case 5:
                        mp4Output.Video_H264.Profile = VFH264Profile.ProfileHigh422;
                        break;
                    }

                    switch (cbH264Level.SelectedIndex)
                    {
                    case 0:
                        mp4Output.Video_H264.Level = VFH264Level.LevelAuto;
                        break;

                    case 1:
                        mp4Output.Video_H264.Level = VFH264Level.Level1;
                        break;

                    case 2:
                        mp4Output.Video_H264.Level = VFH264Level.Level11;
                        break;

                    case 3:
                        mp4Output.Video_H264.Level = VFH264Level.Level12;
                        break;

                    case 4:
                        mp4Output.Video_H264.Level = VFH264Level.Level13;
                        break;

                    case 5:
                        mp4Output.Video_H264.Level = VFH264Level.Level2;
                        break;

                    case 6:
                        mp4Output.Video_H264.Level = VFH264Level.Level21;
                        break;

                    case 7:
                        mp4Output.Video_H264.Level = VFH264Level.Level22;
                        break;

                    case 8:
                        mp4Output.Video_H264.Level = VFH264Level.Level3;
                        break;

                    case 9:
                        mp4Output.Video_H264.Level = VFH264Level.Level31;
                        break;

                    case 10:
                        mp4Output.Video_H264.Level = VFH264Level.Level32;
                        break;

                    case 11:
                        mp4Output.Video_H264.Level = VFH264Level.Level4;
                        break;

                    case 12:
                        mp4Output.Video_H264.Level = VFH264Level.Level41;
                        break;

                    case 13:
                        mp4Output.Video_H264.Level = VFH264Level.Level42;
                        break;

                    case 14:
                        mp4Output.Video_H264.Level = VFH264Level.Level5;
                        break;

                    case 15:
                        mp4Output.Video_H264.Level = VFH264Level.Level51;
                        break;
                    }

                    switch (cbH264TargetUsage.SelectedIndex)
                    {
                    case 0:
                        mp4Output.Video_H264.TargetUsage = VFH264TargetUsage.Auto;
                        break;

                    case 1:
                        mp4Output.Video_H264.TargetUsage = VFH264TargetUsage.BestQuality;
                        break;

                    case 2:
                        mp4Output.Video_H264.TargetUsage = VFH264TargetUsage.Balanced;
                        break;

                    case 3:
                        mp4Output.Video_H264.TargetUsage = VFH264TargetUsage.BestSpeed;
                        break;
                    }

                    mp4Output.Video_H264.PictureType = VFH264PictureType.Auto;

                    mp4Output.Video_H264.RateControl = (VFH264RateControl)cbH264RateControl.SelectedIndex;
                    mp4Output.Video_H264.GOP         = cbH264GOP.Checked;
                    mp4Output.Video_H264.BitrateAuto = cbH264AutoBitrate.Checked;

                    int tmp;
                    int.TryParse(edH264Bitrate.Text, out tmp);
                    mp4Output.Video_H264.Bitrate = tmp;

                    // Audio AAC settings
                    int.TryParse(cbAACBitrate.Text, out tmp);
                    mp4Output.Audio_AAC.Bitrate = tmp;

                    mp4Output.Audio_AAC.Version = (VFAACVersion)cbAACVersion.SelectedIndex;
                    mp4Output.Audio_AAC.Output  = (VFAACOutput)cbAACOutput.SelectedIndex;
                    mp4Output.Audio_AAC.Object  = (VFAACObject)(cbAACObjectType.SelectedIndex + 1);

                    VideoCapture1.Output_Format = mp4Output;
                }
            }

            VideoCapture1.Video_Effects_Enabled = true;
            VideoCapture1.Video_Effects_Clear();

            // Audio processing
            VideoCapture1.Audio_Effects_Clear(-1);
            VideoCapture1.Audio_Effects_Enabled = true;

            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Amplify, cbAudAmplifyEnabled.Checked, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.Equalizer, cbAudEqualizerEnabled.Checked, -1, -1);
            VideoCapture1.Audio_Effects_Add(-1, VFAudioEffectType.TrueBass, cbAudTrueBassEnabled.Checked, -1, -1);

            VideoCapture1.Start();
        }