Hello, I have two different versions from the same video, and I want to mux one's audio to other's video. but their timing doesn't match so I can't just use MKVToolNix GUI, so I wanted to know if there's a way I can sync the audio, automatically or manually both will be great. Thanks in advance.
+ Reply to Thread
Results 1 to 6 of 6
Did you succeed? Can you give more detailed information on how?
sorry for the very late report but one of the videos turned out to be an edited edited version of the original so it's basically impossible to sync them. also @pikarden, using MKVToolNix GUI, you can edit the timing of the audio by adding a delay value in the timestamp box on the right, you can also stretch it. to do so you should probably investigate the needed value by delaying the audio in a player such as video lan
sorry for the very late report but one of the videos turned out to be an edited edited version of the original so it's basically impossible to sync them.
My experience with trying to sync an audio track to a different video...
Of course the number one problem is that the two videos may be different lengths. There are tools that will let you stretch/compress an audio track to a different length while preserving the pitch, however even if you match the length of the target video exactly, the audio may still be out of sync. This is because the two videos may have different amounts of silence at the start and end. That extra 'padding' is going to throw off the timing.
Think of it this way: You place two rubber bands next to each other and draw marks across them. If the two of them are the exact same length, then when you stretch them both, the marks will still line up. If one of them is shorter than the other one and you stretch them to the same length, now the marks will be in different places because one of them will be stretched more than the other.
I've synced three audio tracks to different copies of videos. In every case, I had to manually edit the audio track to get it in sync. There may be easier or more automatic ways of doing this, but if there are, I don't know what they are. I know there exists software where people seem to manipulate audio and video tracks as easily as text in a word processor, but I don't have any of those programs.
This is what I did;
I used a copy of Cool Edit Pro for this. I suppose you could use Audacity, but when I tried, it would pause after every edit which made it unacceptably slow in my opinion. Maybe a much faster system would negate this, but for me, Cool Edit Pro was the superior choice.
I started by demuxing the original audio and stretching/compressing it to get it as close to the target video length as possible. Then I muxed it to the target video and opened it in MPC-HC, although VLC will work too. As soon as it came to something where I could tell the sound was out of sync (dialog, gunshot, etc), I used the +/- keys on the numeric keypad to adjust the audio delay. Once I had it in sync, I noted the time index and how much of a delay it needed to bring it in sync. Then I checked the start to make sure that such a delay was OK there as well. I then skipped ahead in the video looking for the next spot where it was out of sync. When I found it, I adjusted the delay again until it was in sync, noting the time index and how much I needed to add or subtract from the existing delay to bring it in sync.
That last part is important! If you need +200ms to bring the first point in sync, then you need +500 to get the second in sync, you would mark down +300ms for the second. Otherwise by the end of the file, you'd be adding +50,000ms delays between sections! So only write down the amount you had to add or subtract from the previous amount!
Once you're done, you should have a list of points where the sound is out of sync and how much you need to adjust it to bring it in sync. Load the audio into your editor of choice, and zoom into the waveform. Find the first spot where you need to adjust the timing and look for a section of silence, which will look like a flat line in the waveform. If you can't find a bit of silence, try to find a quiet section, or where there's just a background noise. If you need to subtract time, cut the required amount. If you need to add time, add the required amount of silence. If you don't have a silent section, copy a bit with just background noise and insert that in the same section. In either case, play the part that you just edited to make sure that your edit isn't noticeable. If it is, undo it and try again.
I find that edits of 200-300ms to background noise, like engine sounds, waves, wind, etc, aren't noticeable. Don't try to do it with a siren sound, music, etc, as those will be noticeable.
Repeat that for all the points that it goes out of sync and then save it. Mux it with the target video and check it. If you still find spots that need adjusting, note them and make the necessary edits.
As I said, there may be easier, faster ways to do it, but this was the only way I knew how to do it.