Platform :

Popular Solution Go   Back

C# - How to add fade in , fade out audio effect to video in c#

Step 1: Download Video Edit Gold SDK ActiveX Installer and installed it.

Step 2: Create win form project, add a buttons into the form.

Step 3: Add following code in buttons click event. Assume your video have 30 second duration, you want to add fade out effect at 0-15 second, then you want to add fade in audio effect and audio volume increase 3 times at 16-30 second.

private void button1_Click(object sender, System.EventArgs e)
{

axVideoEdit1.InitControl();
axVideoEdit1.AddVideo("c:\\yourvideo.mpg",0,30,0);

axVideoEdit1.AddAudio("c:\\yourvideo.mpg",0,15);
axVideoEdit1.AdjustAudioVolume( 0, 0, 15, 1, 0);

axVideoEdit1.AddAudio("c:\\yourvideo.mpg",16,30);
axVideoEdit1.AdjustAudioVolume( 1, 16, 30, 3, 3);

axVideoEdit1.Preview();
}