Apply a Filter to a Video File in C#

Sometimes I’ll take what I think is a really great video on my cell phone, only to find out my hand was shaking while I was recording. Thankfully, I know the LEADTOOLS SDK provides many filters that can be used to add color, annotations, and remove the shaking or vibration present in a video.

In this demonstration, I will be working with the LEAD Video Stabilizer Filter to remove shaking present in the Test_VideoStabilizer.avi video.

Apply a Filter to Video File in C#

The following simplified C# code will apply the filter to the displayed video.

OpenFileDialog dlg = new OpenFileDialog();
dlg.InitialDirectory = @"D:\LEADTOOLS22\Resources\Media";
if (dlg.ShowDialog(this) == DialogResult.OK)
string inputFile = dlg.FileName;
Processor stabilizer = null;

foreach (Processor p in _play.VideoProcessors)
if (p.FriendlyName == "LEAD Video Stabilizer Filter")
stabilizer = p;
_play.SourceFile = inputFile;

For more information on the LEADTOOLS Multimedia SDK, check out our full tutorial on the LEAD Video Stabilizer Filter.

Free Evaluation and Free Support!

Did you know you can download the LEADTOOLS SDK for free?. It’s a fully-functional evaluation license with free support to help you along the way.

Looking for More?

We have a ton of helpful tutorials (and add more every day) so be sure to check out our extensive tutorial library!

Our support team is here to help! Contact our support team for free technical support via live chat or email.

For pricing or licensing questions, contact our our sales team via email or call us at 704-332-5532.

This entry was posted in Multimedia Imaging and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *