How to create a new file from multiple source files in Video Edit SDK .Net

Related products
Video Edit SDK .Net

Sample code

Using our SDK, you can combine streams from several input files. For example, you can add an additional audio stream to the AVI file. Reencoding is not required if the output format is compatible with audio and video streams.

Create a streams list:

var streams = new List();

Add video stream. ID set to "v" to add video stream.

streams.Add(new VFVEFFMPEGStream
{
                Filename = "c:\\samples\\!video.avi",
                ID = "v"
});
Add audio stream from mp3 file. ID set to "a" to add the audio stream. Must be "a" for audio files.
streams.Add(new VFVEFFMPEGStream
{
                Filename = "c:\\samples\\!sophie.mp3",
                ID = "a"
});
Add audio stream from another AVI file. ID set to "a" to add audio stream from video file.
streams.Add(new VFVEFFMPEGStream
{
                Filename = "c:\\samples\\!video2.avi",
                ID = "a"
});
The second parameter is "true" to set the duration of the output file to the shortest stream. If video stream duration is bigger than audio stream duration, you'll have problems seeking in some players.
VideoEdit1.FastEdit_MuxStreams(streams, true, outputFile);

Required redists

Please contact support to get help with this tutorial. Visit our GitHub page to get more code samples.
abstract 2abstract 1abstract 3
logo
VisioForge © 2006 - 2021