0

I'm writing a program Which will concat multiple (mp4 format) to one file.But Problem is that my code only show last video file in merged file(m.mp4).The code which I am using is given below for description.

FileStream fs = new FileStream("m.mp4",FileMode.Append);
            for (i = 1; i <= 3; i++)
            {
                //m1,m2,m3 are video mp4 files on my disk
                var bytes = File.ReadAllBytes("m" + i + ".mp4");
                fs.Write(bytes, 0, bytes.Length);
            }
            Console.WriteLine("Done!!");
Moon MALIK
  • 41
  • 4
  • possible duplicate of [How to merge 2 video files together in C#?](http://stackoverflow.com/questions/6890699/how-to-merge-2-video-files-together-in-c) – Luc Morin Jul 20 '15 at 01:07
  • Luc Morin Problem is that its an challange without using external library merge two video files – Moon MALIK Jul 20 '15 at 01:18
  • Yes, without a library it is a challenge because you would have to write a decoder and encoder for mp4. Your code does concatenate the 3 files flawlessly but that doesn't give you a valid mp4 file. It is up to you but if you ask to answer with writing a decoder and encoder is way to broad. – rene Jul 20 '15 at 08:31
  • yes want decoder and encode – Moon MALIK Jul 20 '15 at 13:24
  • send me code about this – Moon MALIK Jul 23 '15 at 23:43

0 Answers0