Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recorded several community theater productions with a Panasonic TM900 camera. The settings on the camera were to record at 1080p @ 60 FPS. However, I noticed that the camera produces several video files (.m2ts).

While the included Panasonic HD Editor software plays the videos seamlessly that is not the case with other video players such as Windows Media Player.

I want to be able stitch together two or more m2ts video files without losing the quality of the original footage. What software should I use to do this? I do not need fancy editing capabilities though I would like to cut some scenes from the video such as during the play's intermission.

Open source software or at least free software is preferred but commercial software is not out of the question if it works well and it is easy to use.

share|improve this question
up vote 8 down vote accepted

I believe you can join MPEG ts (transport stream) files simply by joining them together. In Linux:

cat file1.m2ts file2.m2ts file3.m2ts > joined_file.m2ts

In Windows/DOS:

copy /b file1.m2ts + file2.m2ts + file3.m2ts joined_file.m2ts /b

As long as the input files are split properly, and each new file begins with a key frame (and I would expect your camera does this), this should work just fine. And even if your camera is not careful about splitting right before a keyframe (again, I'd be surprised if it doesn't), as long as you re-join in the exact same order, it ought to work.

share|improve this answer

While the cat/copy option mentioned generally works, I've found that it can cause problems with some media players, due to timecode issues. I would prefer to use ffmpeg's concat protocol to achieve the same effect (but more reliably in my experience):

ffmpeg -i "concat:in1.m2ts|in2.m2ts|in3.m2ts|in4.m2ts" -c copy output.m2ts
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.