Resyncing audio to video with ardour

3 replies [Last post]
Solv
User offline. Last seen 4 years 41 weeks ago. Offline
Joined: 2006-03-27
Posts:

I recorded a conference on the weekend, with 4 talks between 1/2 hr to 1 hour long. Due to unforseen circumstances I ended up using my brothers laptop with audacity to record the audio (I would normally use my multitrack ardour rig), and I recorded the video with a Panasonic NV-GS400 (great camera btw).

I figured that being digital the audio should sync quite nicely, so I got the files off the laptop, grabbed the video via kino, and layed it out in cinelerra. Woops, I had recorded audio in 44.1Khz because I sold CD's of the talk as well, but of course the video was in 48Khz. The audio was about 15 secs out of sync over the 40 minute talk. So I upsampled from 44.1 to 48 in audacity and reimported into cinellera assuming that would solve the problem.

NOPE!

There was still a drift of over 10 seconds, apparently due to the camcorder not locking audio properly (I read something about this on the linux audio forums). So what the hell could I do? The other problem was the second camera angle which can often be cut to in order to get around these problems was rubbish...couldn't handle the low light like my GS400...it was embarassing in comparison!

This is what I did:

I exported the video only from kino as one big DV file. Then I started a new ardour session in 48khz, imported the 44.1 Khz file which it upsampled for me, and then opened the DV file in xjadeo - synced to jack of course.

Okay the drift was still there, so definitely it wasn't a problem with cinelerra or audacity in terms of sample rate issues etc etc.

Luckily thanks to ardour, the fix was easy. I moved the audio to the first frame of when the speaker opened his mouth and made sure I had good sync for around 30 seconds. I then went to the end of the talk and inserted a marker at the very instant he closed his mouth from the last word.

Using the object tool, I dragged the boundary of the region until it met up with the last word in the audio file. Then I selected the time stretch/shrink tool and dragged the region back to the marker. It took about 60 seconds to resample the audio and WHALLA! Everything was now in perfect sync. That's right over 40 minutes the massive drift had been corrected with NO loss in audio quality and maintained PERFECT sync throughout the talk. I jumped the playhead around to many spots to check, and not one iota of drifting in or out!

Thanks Paul, Thanks all the other Ardour Developers...

ARDOUR TO THE RESCUE ONCE AGAIN!

Solv
User offline. Last seen 4 years 41 weeks ago. Offline
Joined: 2006-03-27
Posts:

Well, I thought I'd update this for anyone out there who's interested. After updating to Ardour 2.2, the time shift library and options changed. Now there is a whole lot of different options to choose from..mostly I don't understand them.
I had to do more audio/video syncing, and so I went about the same method as above, but the timeshifting was causing all sorts of comb filtering and horrible effects...I was starting to get worried! This library is supposed to be much better...but so far I wasn't seeing it (although I imagined for musical changes it would have been quite good).
Eventually, I found the correct option and it works PERFECTLY!
The correct setting for me was to use "Unpitched Solo Percussion" and the Strict Linear Button OFF. This made the adjustments sample accurate and with no comb filtering or phasing effect whatsoever...

Thankyou developers of RUBBERBAND and ARDOUR!

thorgal
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 2007-08-03
Posts:

hey! sounds great :)
maybe a pointer to the meaning of the different rubberband settings would be appropriate. I started using it a lot but still have to quickly figure what the best setting is in an given context.

cannam
User offline. Last seen 6 years 8 weeks ago. Offline
Joined: 2006-08-01
Posts:

If you were able to provide me with any examples of audio that you were trying to rescale and found problematic with Rubber Band, along with details of the scaling necessary ("from duration X to duration Y"), that might be quite handy. It would be nice to be able to add a Speech option in future versions: the current one is not well tested for speech, as you discovered. Contact me at cannam at all-day-breakfast.com if you have any example material you would be prepared to share.

I realise the sort of audio you're working on might involve rather large files, so this might not be practical, but just a thought.

Thanks!

Chris