Пример #1
0
        public void SetM4AOutput(ref M4AOutput m4aOutput)
        {
            if (m4aSettingsDialog == null)
            {
                m4aSettingsDialog = new M4ASettingsDialog();
            }

            m4aSettingsDialog.SaveSettings(ref m4aOutput);
        }
Пример #2
0
        private async void btStart_Click(object sender, EventArgs e)
        {
            mmLog.Clear();

            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  = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "VisioForge");

            VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;

            VideoCapture1.Audio_CaptureDevice                = new AudioCaptureSource(cbAudioInputDevice.Text);
            VideoCapture1.Audio_CaptureDevice.Format         = cbAudioInputFormat.Text;
            VideoCapture1.Audio_CaptureDevice.Format_UseBest = false;
            VideoCapture1.Audio_CaptureDevice.Line           = cbAudioInputLine.Text;

            VideoCapture1.Audio_PlayAudio = cbPlayAudio.Checked;
            VideoCapture1.Video_Renderer.VideoRenderer = VideoRendererMode.None;

            if (cbMode.SelectedIndex == 0)
            {
                VideoCapture1.Mode = VideoCaptureMode.AudioPreview;
                VideoCapture1.Audio_RecordAudio = true;
            }
            else
            {
                VideoCapture1.Mode = VideoCaptureMode.AudioCapture;
                VideoCapture1.Audio_RecordAudio = true;
                VideoCapture1.Output_Filename   = edOutput.Text;

                switch (cbOutputFormat.SelectedIndex)
                {
                case 0:
                {
                    var acmOutput = new ACMOutput();
                    SetACMOutput(ref acmOutput);
                    VideoCapture1.Output_Format = acmOutput;

                    break;
                }

                case 1:
                {
                    var mp3Output = new MP3Output();
                    SetMP3Output(ref mp3Output);
                    VideoCapture1.Output_Format = mp3Output;

                    break;
                }

                case 2:
                {
                    var wmaOutput = new WMAOutput();
                    SetWMAOutput(ref wmaOutput);
                    VideoCapture1.Output_Format = wmaOutput;

                    break;
                }

                case 3:
                {
                    var oggVorbisOutput = new OGGVorbisOutput();
                    SetOGGOutput(ref oggVorbisOutput);
                    VideoCapture1.Output_Format = oggVorbisOutput;

                    break;
                }

                case 4:
                {
                    var flacOutput = new FLACOutput();
                    SetFLACOutput(ref flacOutput);
                    VideoCapture1.Output_Format = flacOutput;

                    break;
                }

                case 5:
                {
                    var speexOutput = new SpeexOutput();
                    SetSpeexOutput(ref speexOutput);
                    VideoCapture1.Output_Format = speexOutput;

                    break;
                }

                case 6:
                {
                    var m4aOutput = new M4AOutput();
                    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, AudioEffectType.Amplify, AUDIO_EFFECT_ID_AMPLIFY, cbAudAmplifyEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Equalizer, AUDIO_EFFECT_ID_EQ, cbAudEqualizerEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.TrueBass, AUDIO_EFFECT_ID_TRUE_BASS, cbAudTrueBassEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);
            VideoCapture1.Audio_Effects_Add(-1, AudioEffectType.Sound3D, AUDIO_EFFECT_ID_SOUND_3D, cbAudSound3DEnabled.Checked, TimeSpan.Zero, TimeSpan.Zero);

            await VideoCapture1.StartAsync();

            tcMain.SelectedIndex = 3;
            tmRecording.Start();
        }
Пример #3
0
        private async void BtStart_Click(object sender, EventArgs e)
        {
            VideoEdit1.Debug_Mode      = cbDebugMode.Checked;
            VideoEdit1.Debug_Telemetry = cbTelemetry.Checked;

            mmLog.Clear();

            VideoEdit1.Mode = VideoEditMode.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 AVIOutput();
                SetAVIOutput(ref aviOutput);
                VideoEdit1.Output_Format = aviOutput;
                break;
            }

            case 1:
            {
                var mkvOutput = new MKVv1Output();
                SetMKVOutput(ref mkvOutput);
                VideoEdit1.Output_Format = mkvOutput;
                break;
            }

            case 2:
            {
                var wmvOutput = new WMVOutput();
                SetWMVOutput(ref wmvOutput);
                VideoEdit1.Output_Format = wmvOutput;
                break;
            }

            case 3:
            {
                var dvOutput = new DVOutput();
                SetDVOutput(ref dvOutput);
                VideoEdit1.Output_Format = dvOutput;
                break;
            }

            case 4:
            {
                var acmOutput = new ACMOutput();
                SetACMOutput(ref acmOutput);
                VideoEdit1.Output_Format = acmOutput;
                break;
            }

            case 5:
            {
                var mp3Output = new MP3Output();
                SetMP3Output(ref mp3Output);
                VideoEdit1.Output_Format = mp3Output;
                break;
            }

            case 6:
            {
                var m4aOutput = new M4AOutput();
                SetM4AOutput(ref m4aOutput);
                VideoEdit1.Output_Format = m4aOutput;
                break;
            }

            case 7:
            {
                var wmaOutput = new WMAOutput();
                SetWMAOutput(ref wmaOutput);
                VideoEdit1.Output_Format = wmaOutput;
                break;
            }

            case 8:
            {
                var oggVorbisOutput = new OGGVorbisOutput();
                SetOGGOutput(ref oggVorbisOutput);
                VideoEdit1.Output_Format = oggVorbisOutput;
                break;
            }

            case 9:
            {
                var flacOutput = new FLACOutput();
                SetFLACOutput(ref flacOutput);
                VideoEdit1.Output_Format = flacOutput;
                break;
            }

            case 10:
            {
                var speexOutput = new SpeexOutput();
                SetSpeexOutput(ref speexOutput);
                VideoEdit1.Output_Format = speexOutput;
                break;
            }

            case 11:
            {
                var customOutput = new CustomOutput();
                SetCustomOutput(ref customOutput);
                VideoEdit1.Output_Format = customOutput;
                break;
            }

            case 12:
            {
                var webmOutput = new WebMOutput();
                SetWebMOutput(ref webmOutput);
                VideoEdit1.Output_Format = webmOutput;
                break;
            }

            case 13:
            {
                var ffmpegOutput = new FFMPEGOutput();
                SetFFMPEGOutput(ref ffmpegOutput);
                VideoEdit1.Output_Format = ffmpegOutput;
                break;
            }

            case 14:
            {
                var ffmpegOutput = new FFMPEGEXEOutput();
                SetFFMPEGEXEOutput(ref ffmpegOutput);
                VideoEdit1.Output_Format = ffmpegOutput;
                break;
            }

            case 15:
            {
                var mp4Output = new MP4Output();
                SetMP4Output(ref mp4Output);
                VideoEdit1.Output_Format = mp4Output;
                break;
            }

            case 16:
            {
                var mp4Output = new MP4HWOutput();
                SetMP4HWOutput(ref mp4Output);
                VideoEdit1.Output_Format = mp4Output;
                break;
            }

            case 17:
            {
                var gifOutput = new AnimatedGIFOutput();
                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();
        }