Home » Questions » Computers [ Ask a new question ]

Synchronizing audio and video using MP4Box / ffmpeg to concatenate files

Synchronizing audio and video using MP4Box / ffmpeg to concatenate files

I have two H.264 encoded MPEG-4 files that I need to concatenate. I have been using MP4Box for this task by first ensuring the files are encoded identically (even went so far as to compare output from h264_parse on their video tracks) and then concatenating with this command:

Asked by: Guest | Views: 57
Total answers/comments: 2
Guest [Entry]

"I faced the same problem. For correct synchronization you have to write the MP4Box command as follows:

MP4Box -add file1.mp4 -cat file2.mp4 -new output_file.mp4

instead of using -cat use -add before the first video. The remaining options are correct and you can put -new before the output video parameter."
Guest [Entry]

"From the mkvtoolnix package use mkvmerge:

mkvmerge -o ""output file"" ""input file"" +""appended file"""