To merge two MP4 file, it's necessary to pass by .ts file.
ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts input1.ts
ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts input2.ts
ffmpeg -i "concat:input1.ts|input2.ts" -c copy output.mp4
But, I have this error on first/second command:
Codec 'mpeg4' (13) is not supported by the bitstream filter 'h264_mp4toannexb'. Supported codecs are: h264 (28) Error initializing bitstream filter: h264_mp4toannexb
Have you got an idea?