What is the best filetype for combining video files with Splicer?

Topics: Developer Forum
Oct 2, 2009 at 12:49 PM

First of all, Splicer is a great tool!  Thanks to everyone that has contributed.

I'm trying to combine several video clips into one video clip.  I have a process that works fine in terms of creating the new video.  However, the resulting video has pauses and hiccups throughout.  Currently, I'm combining .wmv files to create a new .wmv file.  I would like to know if a certain source file would work better then .wmv?  My code is below in case you think there might be a problem with it.

 

 

using (ITimeline timeline = new DefaultTimeline())
            {
                // greate our default audio track
                timeline.AddAudioGroup().AddTrack();
                // add a video group, 32bpp, 320x240 (32bpp required to allow for an alpha channel)
                IGroup videoGroup = timeline.AddVideoGroup(32, width, height);
                // add our default video track
                ITrack videoTrack = videoGroup.AddTrack();
                // Add the Top 10 most popular videos
                foreach (Methodagile.ViewVideoApproved video in videoApprovedCollection)
                {
                    if (File.Exists(fileSnippetPath + video.DateCreated.ToString("yy") + "\\" + video.DateCreated.ToString("MM") + "\\" + video.DateCreated.ToString("dd") + "\\" + video.FilenameRendered.Replace(".flv",".wmv")))
                    {
                        timeline.AddVideoWithAudio(fileSnippetPath + video.DateCreated.ToString("yy") + "\\" + video.DateCreated.ToString("MM") + "\\" + video.DateCreated.ToString("dd") + "\\" + video.FilenameRendered.Replace(".flv",".wmv"));
                    }
                }
                using (WindowsMediaRenderer renderer = new WindowsMediaRenderer(timeline, fileUploaded, WindowsMediaProfiles.HighQualityVideo))
                {
                    renderer.Render();
                }
            }

using (ITimeline timeline = new DefaultTimeline())

            {

                // greate our default audio track

                timeline.AddAudioGroup().AddTrack();

 

                // add a video group, 32bpp, 320x240 (32bpp required to allow for an alpha channel)

                IGroup videoGroup = timeline.AddVideoGroup(32, width, height);

 

                // add our default video track

                ITrack videoTrack = videoGroup.AddTrack();

 

                foreach (VideoApproved video in videoApprovedCollection)

                {

                    if (File.Exists(fileSnippet))

                    {

                        timeline.AddVideoWithAudio(fileSnippet);

                    }

                }

 

                using (WindowsMediaRenderer renderer = new WindowsMediaRenderer(timeline, fileUploaded, WindowsMediaProfiles.HighQualityVideo))

                {

                    renderer.Render();

                }

            }