Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

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

2 Answers 2

up vote 6 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
    
That did the trick though I needed to add /B flag for the source and destination so as to get a proper output. –  Ryan Taylor Dec 13 '11 at 0:03
1  
Good call; I have updated the answer. –  Flimzy Dec 13 '11 at 0:38

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

 
discard

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.