//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"