720p -> H.264 (x264) video + AAC 128kbps audio:
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -qscale 0 -acodec libvo_aacenc -ab 128k -ar 44100 -ac 2 -s 1280x720 -b 1M output.mp4
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -qscale 0 -acodec libvo_aacenc -ab 192k -ar 44100 -ac 2 -s 1280x720 -b 2M output.mp4
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -qscale 0 -acodec libvo_aacenc -ab 128k -ar 44100 -ac 2 -s 1920x1080 -b 1.5M output.mp4
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -qscale 0 -acodec libvo_aacenc -ab 192k -ar 44100 -ac 2 -s 1920x1080 -b 3M output.mp4
(You could also omit the -s
switch to keep the size the same as the input and adjust the -b
param to adjust quality more predictably, or leave it out altogether to make ffmpeg automatically determine a good quality)
ffmpeg -i output-p1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts" -c copy -bsf:a aac_adtstoasc single-output.mp4