For those who are interested, you can find below the link to my audio synchronization Vegas extension. It can be used to : 1- Import directly files from your computer and synchronize them from your timeline. 2- Synchronized all events on your timeline. 3- Synchronize selected events on your timeline. 4- Simple UI with a Sync result window to asses the results. 5- Fast processing, accurate synchronization and no temporary file saved on your computer. 6- Refer to the Install.txt file for more information about where to save the extension on your computer.
You need to have ffmpeg saved on your computer somewhere to run it. The script will prompt you to select its path on the first run (The official ffmpeg download link is available in the installation instruction file if needed)
This has only been tested on VP21+ but may work on lower Magix version.
Thank you! A quick test seemed to work well. One qustion- when I change the anchor (presumably the clip where the location stays the same while the audio moves) the unanchored status still says "anchor."
If it finds that media has drift what can you do about it?
Brilliant! Thanks a lot for sharing, it will be so useful. Worked well on VP23 with 3 unsynced cameras with 30-40 min files. Easy to use, pretty quick, and one didnt even have decent audio. One suggestion - when there is an odd clip which doesnt sync although it says 'there is no overlap with other files' clicking apply anyway moves it to the start of the timeline? I think it would be good if an option could come up: 'Stay put - Move to start - move to end - delete'. Excellent work.
I do not see the behavior you describe when there is a clip without common audio with the other one.
In that scenario, the odd clip will be imported on the timeline 10s after the 1st group of the synced clips. Regions are created around each group.
If you deselect the odd clip in the result window it will either stay where it is on the timeline (using synced events mode) or not imported to the timeline (in browse file mode).
Which mode did you use? Would it be possible for you to share with me the log file (you can open it by clicking on log in the result window).
@GJeffrey My quick testing was on an old partly editied project which was a bit of mess really! I'm pretty happy with how it works, thanks for making a great tool. I went back to basics with just the camera clips all loaded on the timeline. Track 1 is an iPhone 39 mins of the whole event. Track 2 is a Sony Ax700 continuous 35min. Track 3 is a Sony A7 with clip of 16 mins followed by a number of short shots. Some of those may have synced up but the audio wasnt good enough, a lot of wind noise etc and I have done no audio cleaning at this stage. (Perhaps one day we can have AI syncing by picture content!) I used 'Sync all events on timeline'. The three main clips synced up perfectly. Of course, over such long free running there is a drift of about 3 frames after 30min. but it's close enough to do a rough edit then sync the later sections again. I notice there is an option 'Detect audio drift' but not sure what this is for. If it helps I've attached screenshots of the before and after timelines and a link to the log. https://www.dropbox.com/scl/fi/b84w60no9r9gi809rqudm/snapalign_20260114_104100.log?rlkey=ag67z4kjbkuffak9jtvc290ol&dl=0
@paul-marshall. The detect audio drift function is actually meant to detect and compensate for drift.
To use it in sync all events mode, check the detect drift box, sync as usual. Then in the result window, there will be an additional button called "Compute drift" as well as an additional column with the drift is milliseconds.
The drift is computed against the anchor file chosen in the result window.
Once the drift is computed, a tiny change of the events (audio and video) playback is automatically applied to compensate for the drift.
@GJeffrey You mean it would stretch the audio of one clip slightly? That would be excellent. I tried it with just the two longest clips IMG_2569.MOV of 38 mins and C0241.MP4 of 34 mins approx. It didnt produce a drift measurment. Here is the log after calculating the drift:
I will modify my code to have all your 30 short clips synced as well .
The file A7-2462 is failing though. Any audio in that files?
Regarding the drift computation, there is an issue with 1 file so the computation failed. I wouldn't use the iphone footage as reference though oir drifting computation as it is the one which probably has the highest audio drift.
Thanks for looking at it. Yes, A7-2462 does have audio in it but is only 15 frames long. Accidental button press perhaps. I took the iphone out and just synced the A7 and Ax700. But still not getting the drift measurement. Actually after 15 mins it was quite a small error. Heres that log:
@GJeffrey Any chance you might make the source available? I do my Vegas camera syncing optically but am curious to see if I could learn from your code how to use ffmpeg to identify locations and levels of audio peaks which I've never figured out how to do with the Vegas api.
@GJeffrey, Thank you for sharing the sync tool. My very initial test using 6 pieces of files on a timeline of roughly 3 hours long (all 4K/30fps from Sony A7IV, 2 x FX30's) resulted in one file that was largely off for some reason. Otherwise, nearly perfect. Speed-wise, it only took less than 20 minutes, which is FAST (I usually spend 1 hour or so on this manual sync process). The log file shows as follows.
Here is the latest update thanks to @paul-marshall and @Shinra Bansho feedback. - Improving sync accuracy for long files. - Improving long files syncing speed. - Added a drift selection box to choose the reference file for drift computation. - Better handling of very short files. - Solve bug in result window when switching the anchor.
Great work on this update — thank you for continuing to improve the script.
Compared to the previous version, the synchronization accuracy has clearly improved. Audio contained in video clips now aligns very closely at the sub-frame level.
I just have one question.
I am using a pre-mixed audio file as the anchor to sync other video and audio events. Only the pre-mixed audio event shows a noticeable sub-frame-level offset.
Thanks for the update. Great work. Fast and accurate, potentially saving hours of tedious manual syncing! It's not something I do very often but now I shant groan at the prospect!