How to create a new file from multiple source files?
Product: Video Edit SDK .Net. Engine: VideoEditCore (Windows only).
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.
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.
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.
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);
Visit our GitHub page to get more code samples.