//On Windows CMD
for %i in (*.ts) do ffmpeg -i "%i" -c:v libx264 -c:a aac "%~ni.mp4"
// for keeping data rate same to get same file size
for %i in (*.ts) do ffmpeg -i "%i" -c:v libx264 -b:v 2M -maxrate 1.4M -bufsize 1M -c:a aac "../%~ni.mp4"
// Windows
copy /b segment1_0_av.ts+segment2_0_av.ts+segment3_0_av.ts all.ts
ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4
// GNU/Linux, using bash:
cat segment1_0_av.ts segment2_0_av.ts segment3_0_av.ts > all.ts
ffmpeg -i all.ts -acodec copy -vcodec copy all.mp4