public void JoiningVideo()
{
string j = @"D:/test2";
string outputpath = @"D:/test3/beforeEventab1.wmv";
DirectoryInfo di = new DirectoryInfo(j);
FileStream fs;
fs = new FileStream(outputpath, FileMode.Append);
foreach (FileInfo fi in di.GetFiles(@"*.wmv"))
{
byte[] bytesource = System.IO.File.ReadAllBytes(fi.FullName);
fs.Write(bytesource, 0, bytesource.Length);
}
fs.Close();
}
This following is a code to join two videos. When I run the program it joins two videos and puts joined video in a folder. The joined video size is correct as it should be.
But when I play the video it plays the first part of the video in WMP but when i play the video in VLC it plays the second part of video.