look up ffmpeg on how to convert and merge
this is really good program. I am pasting my batch file so you won't have to do your own research
to convert m2ts to mp4
ffmpeg -i bhd1080.com@20150909164411.m2ts -vcodec libx264 -crf 20 -acodec ac3 -vf "yadif" bhd1080.com@20150909164411.mp4
to...