Movie Maker Timeline SDK Control x64

Movie Maker Timeline SDK Control x64

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

64 bit Video Editor SDK that allows users Drag & Drop to arrange clip orders, edit movies, apply effects & transitions and output 4k MP4 video files.

Popular Solution Go   Back

C# - How to merge video files to 4K MP4 video?

Step 1: To install the Movie Maker Timeline Control SDK x64, begin by launching the setup file ( Select the desired installation folder for the Movie Maker Timeline SDK x64 and continue with the installation on your development computer.

Step 2: Create New Visual C# Project, select Windows Forms Application.

Step 3: In Solution Explorer, select References ,right click mouse to select Add Reference...

Select COM tab, select  Movie Maker Timeline Control SDK

Step 4: Now you will see the Movie Maker Timeline Control on Toolbox,  Drag the Movie Maker Timeline Control from Toolbox to form. 

Step 5: Add List Box, two button and one progress bar on form. button1 open the folder, then add the mp4 video files to timeline control.
button2 convert the video files to 4K MP4 Video.

Step 6-1: drag FolderBrowserDialog control from Toolbox into the form

Step 6-2: add the following code in Form1.cs
using System.IO;

Step 7: add the following code in button1 click event

 private void button1_Click(object sender, EventArgs e)

            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
                string[] allfiles = Directory.GetFiles(folderBrowserDialog1.SelectedPath, "*.mp4", SearchOption.AllDirectories);


                foreach (var file in allfiles)
                    FileInfo info = new FileInfo(file);



Step 8: add the following code in button2 click event

 private void button2_Click(object sender, EventArgs e)
            int iOrginalWidth=0;
            int iOrginalHeight=0;

            for (int i = 0; i < listBox1.Items.Count; i )
                string strMediaFile =listBox1.Items[i].ToString();

                    iOrginalWidth= axTimelineControl1.GetMediaWidth(strMediaFile);
                    iOrginalHeight= axTimelineControl1.GetMediaHeight(strMediaFile);

                float iDur = axTimelineControl1.GetMediaDuration(strMediaFile);
                axTimelineControl1.AddVideoClip(1, strMediaFile, 0, (int)iDur, 0);

                int iAudioStreamCount = axTimelineControl1.GetMediaAudioStreamCount(strMediaFile);
                    axTimelineControl1.AddAudioClip(5, strMediaFile, 0, (int)iDur, 0, 1);

            axTimelineControl1.SetVideoTrackResolution(iOrginalWidth, iOrginalHeight);
            axTimelineControl1.OutputType = 2;

            axTimelineControl1.MP4AspectRatio =0;
            axTimelineControl1.MP4AudioBitrate =96000;
            axTimelineControl1.MP4AudioChannels = 2;
            axTimelineControl1.MP4AudioSampleRate = 44100;
            axTimelineControl1.MP4Framerate= 25;
            axTimelineControl1.MP4H264Preset = 0;
            axTimelineControl1.MP4Height = 2160;
            axTimelineControl1.MP4Width = 3840;
            axTimelineControl1.MP4VideoBitrate = 5000000;
            int iresult =axTimelineControl1.Save("c:\\temp\\output.mp4");

            if (iresult != 1)
                MessageBox.Show("Save Failed");

Step 9: select Movie Maker Timeline SDK Control, In Properties window, select Events icon, double click OnConvertProgress and OnConvertCompleted to add event handler.

Step 10: On OnConvertProgress event, add the following code

  private void axTimelineControl1_OnConvertProgress(object sender, AxTimelineAxLib._ITimelineControlEvents_OnConvertProgressEvent e)
            progressBar1.Value = e.progress;

Step 11: On OnConvertCompleted event, add the following code

 private void axTimelineControl1_OnConvertCompleted(object sender, EventArgs e)
            MessageBox.Show("Convert Completed");

Step 12: If you need output 4K video, you need compile to x64,  select Configuration Manager

 Step 13: select New... In Active solution platform

 Step 14: select x64 in "Type or select the new platform"

 Step 15: make sure you selected x64 and press F5 to compile the project.

Step 16: Now click "Open folder" button, select the folder, it will add all mp4 videos from this folder to timeline control, then click "Convert to MP4" button, it will output c:\temp\output.mp4, if you have not temp folder, try create temp folder or change the output path of Save method.

You may download this sample source code from