Joining Multiple .wmv Files with C#
<p>I am trying to join several .wmv files with C#.....Below is my coding.....The coding is working fine, It's reading and writing all the .wmv files into a stream.....But, when I am playing the joined video with my windows media player, the first video is playing only.....Suppose there are 5 video files of 20 mb.....after i join them the file size becomes 100 mb....But,when i play it the first video is playing only.....But, i need to play the whole video....what can I do?</p>

<pre><code>private void JoinFiles(string FolderInputPath, string FileOutputPath)

{

// Needed to get all files in that directory

            DirectoryInfo diSource = new DirectoryInfo(FolderInputPath);

            // Filestream to reconstruct the file

            FileStream fsSource = new FileStream(FileOutputPath, FileMode.Append);

            // Loop through all the files with the *.part extension in the folder

            foreach (FileInfo fiPart in diSource.GetFiles(@"*.wmv"))
            {



                  // Create a byte array of the content of the current file
                Byte[] bytePart = System.IO.File.ReadAllBytes(fiPart.FullName);
                // Write the bytes to the reconstructed file
                fsSource.Write(bytePart, 0, bytePart.Length);

               }

            fsSource.Close();      

            // Close the file stream

 }    
</code></pre>
