Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

I have a problem when merging two h264/mp4 files with the same parameters except length. I'm using the command

mp4box -cat ....

After that the video player's behaviour is strange: if I drag the time slider closer to the end of file it restarts the video; Sometimes the player shows an incorrect video file length; Also there is a problem with audio sync.

1 Answer
1

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.