C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,857 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi.
I tried to two videos into one using Splicer library. When I ran the code (below), the code got non-responsive, so after awhile I stopped the code from executing. The resulting file (which was created by the code while it has became non-responsive) was over 11GB. I'm not sure how to fix that. Could anyone guide me please? Thanks.
...
//Create a string array to store file paths
string[] filepaths = new string[10];
filepaths.SetValue(textBox_Source1.Text, 0);
filepaths.SetValue(textBox_Source2.Text, 1);
//Call the video merging function
MergeVideos(filepaths, filepaths[0] + "_merged");
....
using (ITimeline timeline = new DefaultTimeline())
{
IGroup group = timeline.AddVideoGroup(32, 720, 576); // Set bitrate, width, height
var firstClip = group.AddTrack().AddVideo(videoPaths[0]);
var secondClip = group.AddTrack().AddVideo(videoPaths[1], firstClip.Duration /* offset */);
using (AviFileRenderer renderer = new AviFileRenderer(timeline, outputFilePath))
{
renderer.Render();
}
}