Video Edit Gold SDK ActiveX

Video Edit Gold SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

For Windows Developers who need to Cut Videos,  Merge Videos , Split Videos and more Video Editing features with C#, Vb.Net Winforms WPF, VB6, Delphi, Vfp, Adobe Director, MS Access, C++ .

Popular Solution Go   Back

C# - How to use VS 2019 C# change the audio pitch of video file and save to MP4 file.

Step 1: To install the Video Edit Gold SDK ActiveX, begin by launching the setup file (http://www.viscomsoft.com/demo/videoeditgoldsetup.exe). Select the desired installation folder for the Video Edit Gold SDK ActiveX and continue with the installation on your development computer.

Step 2: Launch VS 2019, click Create a new project button, then select Windows Forms App(.NET Framework) for C# option , click Next button.

Step 3: In Toolbar, right click the mouse, select Choose Items...


Step 4: select COM Components - select Video Edit Gold ActiveX.

Step 5: drag the Video Edit Gold ActiveX from toolbar to form and create the UI like the following



Step 6: In Open File button 's click event, add the following code,


  try
            {
                this.openFileDialog1.Filter = "All Files (*.*)|*.*|AVCHD (*.m2ts*.m2t,*,mts,*.ts)|*.m2ts;*.m2t;*.mts;*.ts|Flash (*.swf)|*.swf|FLV (*.flv)|*.flv|QuickTime (*.mov) | *.mov|MP4 (*.mp4) | *.mp4|Divx (*.divx) | *.divx|webm (*.webm)|*.webm|3GP (*.3gp) | *.3gp|mpg (*.mpg) | *.mpg|avi (*.avi) | *.avi|wmv (*.wmv)| *.wmv";

                if (this.openFileDialog1.ShowDialog(this) == DialogResult.OK)
                {
                    textBox1.Text = this.openFileDialog1.FileName;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());

            }


Step 7: In Convert button 's click event, add the following code, it will use audio pitch feature and set the audio pitch to 12, the range of pitch is -12 to 12. By default is 0 and save to MP4 file.

            axVideoEdit1.InfoLoadMedia(textBox1.Text);

            double iDur = Math.Round(this.axVideoEdit1.InfoDuration, 2);

            int iWidth = axVideoEdit1.InfoMediaWidth;
            int iHeight = axVideoEdit1.InfoMediaHeight;
           
            if ((iWidth == 0) || (iHeight == 0))
            {
                iWidth = 320;
                iHeight = 240;
            }

            this.axVideoEdit1.OutputFileWidth = (short)iWidth;
            this.axVideoEdit1.OutputFileHeight = (short)iHeight;
            this.axVideoEdit1.OutputType = VIDEOEDITLib.MYOUTPUT.MP4;

            this.axVideoEdit1.MP4VideoBitrate = 3000000;
            this.axVideoEdit1.MP4Framerate = 25;
            this.axVideoEdit1.MP4Width = 1280;
            this.axVideoEdit1.MP4Height = 720;

            this.axVideoEdit1.VideoSampleSize = 32;
            this.axVideoEdit1.UseAudioPitch = true;
            this.axVideoEdit1.AudioPitchChangeKey (12);
            this.axVideoEdit1.InitControl();
            this.axVideoEdit1.AddVideo(this.textBox1.Text, 0, iDur, 0);
            this.axVideoEdit1.AddAudio(this.textBox1.Text, 0, iDur);

            this.saveFileDialog1.Filter = "MP4 File (*.mp4)|*.mp4||";
            if (this.saveFileDialog1.ShowDialog(this) == DialogResult.OK)
            {
                bool result = this.axVideoEdit1.Save(this.saveFileDialog1.FileName);

            }

Step 8: In Video Edit Gold ActiveX properties windows, add Complete event. Add the following code

private void AxVideoEdit1_Complete(object sender, EventArgs e)
        {
            MessageBox.Show("Converted Completed");
        }

Download the C# change the audio pitch of video file and save to MP4 file sample source code