For simple videos, you can use the following command line:
ffmpeg -i 1.m4s -i 2.m4s -codec copy output.mp4
(If the output video cannot be played on the computer, use the following command)
or
ffmpeg -i 1.m4s -i 2.m4s -threads 2 -preset veryfast -crf 20 output.mp4
The various options mean:
-i: input file
-codec copy, if the output file cannot be played due to lack of codec, replace -c copy with -threads 2 -preset veryfast -crf 20 may help you
-threads 2: Multi-thread to speed up the conversion, it depends on your computer CPU
- preset veryfast: 10 options: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo, speed from fast to slow
-crf 20: Select the quality of the output video, 0-51, 0 is the best quality, 51 is the worst quality