private async void btAddInputFile_Click(object sender, EventArgs e)
        {
            if (OpenDialog1.ShowDialog() == DialogResult.OK)
            {
                VideoEdit1.Video_FrameRate = Convert.ToDouble(cbFrameRate.Text);

                // resize if required
                int customWidth  = 0;
                int customHeight = 0;

                if (cbResize.Checked)
                {
                    customWidth  = Convert.ToInt32(edWidth.Text);
                    customHeight = Convert.ToInt32(edHeight.Text);
                }

                foreach (var s in OpenDialog1.FileNames)
                {
                    lbFiles.Items.Add(s);

                    if ((string.Compare(GetFileExt(s), ".BMP", StringComparison.OrdinalIgnoreCase) == 0) ||
                        (string.Compare(GetFileExt(s), ".JPG", StringComparison.OrdinalIgnoreCase) == 0) ||
                        (string.Compare(GetFileExt(s), ".JPEG", StringComparison.OrdinalIgnoreCase) == 0) ||
                        (string.Compare(GetFileExt(s), ".GIF", StringComparison.OrdinalIgnoreCase) == 0) ||
                        (string.Compare(GetFileExt(s), ".PNG", StringComparison.OrdinalIgnoreCase) == 0) ||
                        (string.Compare(GetFileExt(s), ".TIF", StringComparison.OrdinalIgnoreCase) == 0) ||
                        (string.Compare(GetFileExt(s), ".TIFF", StringComparison.OrdinalIgnoreCase) == 0))
                    {
                        await VideoEdit1.Input_AddImageFileAsync(s, TimeSpan.FromMilliseconds(2000), null, VideoEditStretchMode.Letterbox, 0, customWidth, customHeight);
                    }
                    else if ((string.Compare(GetFileExt(s), ".WAV", StringComparison.OrdinalIgnoreCase) == 0) ||
                             (string.Compare(GetFileExt(s), ".MP3", StringComparison.OrdinalIgnoreCase) == 0) ||
                             (string.Compare(GetFileExt(s), ".OGG", StringComparison.OrdinalIgnoreCase) == 0) ||
                             (string.Compare(GetFileExt(s), ".AAC", StringComparison.OrdinalIgnoreCase) == 0) ||
                             (string.Compare(GetFileExt(s), ".M4A", StringComparison.OrdinalIgnoreCase) == 0) ||
                             (string.Compare(GetFileExt(s), ".WMA", StringComparison.OrdinalIgnoreCase) == 0))
                    {
                        var audioFile = new AudioSource(s, null, null, string.Empty, 0, 1.0);
                        await VideoEdit1.Input_AddAudioFileAsync(audioFile, null, 0);
                    }
                    else
                    {
                        var audioFile = new AudioSource(s, null, null, s, 0, 1.0);
                        var videoFile = new VideoSource(s, null, null, VideoEditStretchMode.Letterbox, 0, 1.0);

                        await VideoEdit1.Input_AddVideoFileAsync(videoFile, null, 0, customWidth, customHeight);

                        await VideoEdit1.Input_AddAudioFileAsync(audioFile, null, 0);
                    }
                }
            }
        }