Out of sync audio and video can be very tricky to handle, on a computer multimedia players like Videolan VLC provides easy methods to experiment with timings and fix audio sync with video correctly. However, you need to use other utilities when you want to save the fixed audio-video sync as we will be demonstrating ahead.
- Experiment and find the correct audio sync timings by utilizing VLC media player, to figure out whether the audio is delayed, or ahead, and by how much time. To do so navigate by Right-clicking VLC media player -> Interface -> Track Synchronizationand experiment by increasing or decreasing the audio delay on the fly using keyboard shortcuts "j" and "k" and note down the correct value.
- Since this is an .mkv file, download the mkvtoolnix pack for manipulating it.
mkvmerge -i your_video_file.mkvto get information about the video file, we need to note down the ID of the audio track we wanted synced.
- Finally, perform the audio sync shift using the command :
mkvmerge -o output_fixed_filename.mkv -y audio_track_id:time_to_shift your_video_file.mkv, see the example below for clarification.
- Once the conversion process get completed, you will have a new file with the audio shifted and synced to video.
- mkvmerge works for .mkv files, for other video formats like .avi you need to uses tools like YAAI and virtualdub.