Related products: Video Edit SDK .Net

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

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

Create streams list.

var streams = new List<VFVEFFMPEGStream>();

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 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"
});

Second parameter is true to set duration of output file to shortest stream. If video stream duration bigger than audio streams duration you'll have problems wih seeking in some players.

VideoEdit1.FastEdit_MuxStreams(streams, true, outputFile);

VisioForge © 2006-2020

  • GitHub-Mark-64px
  • Twitter Социальные Иконка
  • VisioForge Facebook page
  • YouTube channel