2 h264/mp4 files does not merging in right way by mp4box
I believe this statement:


  I've a problem while merging 2 h264/mp4 files width the same parameters except length


is incorrect. In addition to length your video files have different picture dimensions, and that prevents the merge.

Your "input sample" shows a track size of 853x480. The output, however, shows that track #1 is 1024x576 and track #3 if 1280x720.

So clearly, the input file that you are showing in your example is not one of the files you merged in the output. There are at least three different files at play here, and each has a different picture size.

To be able to merge two files they must have the same picture size. As a test, you may want to try merging the same file twice.