I have four MP4 files called "file_1", "file_2", "file_3" and "file_4" and I wish to merge them into one file in the following order: file_1, file_2, file_3 and file_4.
file_1 has the following characteristics:
frame width = 640
frame height = 480
frame rate = 29 frames/second
audio sample rate = 44kHz
file_2, file_3, and file_4 each have the following characteristics:
frame width = 640
frame height = 480
frame rate = 30 frames/second
audio sample rate = 48kHz
Using the "append" feature in Avidemux v2.5.4, I merged file_2 and file_3 into file_2_3, with the audio and video remaining in sync in file_2_3. Then, once again using the "append" feature, I merged file_2_3 and file_4 into file_2_3_4, with the audio and video remaining in sync in file_2_3_4.
Then, I merged file_1 with file_2_3_4 into file_1_2_3_4. However, the audio and video in file_1_2_3_4 were not in sync. When file_1_2_3_4 is played, everything is OK during the file_1 portion. However, starting with the file_2 portion, the audio and video go out of sync.
Then, I tried the reverse. I merged file_2_3_4 with file_1 into file_2_3_4_1. When file_2_3_4_1 is played, the file_2_3_4 portion is OK. However, the audio and video go out of sync in the file_1 portion.
So, I used Avidemux to change the frame rate on file_1 to 30 frames/second. The frame width, frame height, and audio sample rate remained the same. Once again, I used Avidemux to merge file_1 with file_2_3_4 into file_1_2_3_4. Once again, starting with the file_2 portion, the audio and video go out of sync.
So, what do I have to do to make sure that audio and video are in sync throughout file_1_2_3_4? Should I convert the audio sample rate of file_1 to 48 kHz? What software do I use to do this? I heard of a software tool called MP4 Joiner. Will this help?