My Video Problems Forum Index My Video Problems
A place to chat in a relaxed atmosphere about all things video related
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Synchronise external and camera audio tracks.

 
Post new topic   Reply to topic    My Video Problems Forum Index -> How to.........
View previous topic :: View next topic  
Author Message
rogs



Joined: 03 Apr 2007
Posts: 50
Location: Bournemouth UK

PostPosted: Mon Apr 09, 2007 9:58 pm    Post subject: Synchronise external and camera audio tracks. Reply with quote

The Problem -

Miniature audio recorders – be they minidisc or solid state – offer a very attractive, cost effective, alternative to the traditional use of radio microphones, for the capture of remote audio sources in video recordings

These machines record the audio in a variety of different formats - MP3, WMA, WAV, ATRAC -- and in a variety of qualities - but they all suffer from the same problem -- It is difficult to synchronise the remotely recorded audio with the camera recorded audio.

Although the time honoured tradition of an audio 'clapper board' works well enough to align the beginning of the two soundtracks, there is a tendency for the two tracks to drift out of sync over time -and the longer the recording, the worse the problem.

The simple reason for this drift is that the audio is being recorded at different speeds. Although the recorder will specify the sampling frequency, the accuracy is then dependent on the internal crystal oscillator of the recorder - which is, of course, a different from the one controlling the camera timing. Although these crystals may typically be accurate to within 0.5% or better, even this degree of difference between the two will cause the two recorded audio tracks to be out of sync by nearly 1 second after 20 minutes – even after 5 minutes, the 2 tracks will be 250mS different in length.

This difference is of course totally unacceptable, and corrections need to be applied.

The Solution

It is important to realise that although the sample ‘clocks’ may vary with regard to each other, they tend to be remarkably accurate over time, referenced to themselves.

This means that if you know by how much your audio recorder differs from the camera audio over a fixed period of time, and then a single correction factor will bring both tracks back into sync.

A simple procedure is outlined below, using free programs, to enable you to calculate the correction factor required for your particular recorder.

Programs required (all free):

1) Virtualdub --- (not necessary if you can extract the audio track from a video recording in you NLE)
2) Audacity – a free audio editor
3) Switch – a free audio file type converter

Step1: Set up your camera and audio recorder next to each other, and start both running (if you can, save a step by connecting your camera directly to your computer via firewire, and capturing the output directly onto hard disc, using the free DV capture program WinDV).

Step 2: Make a good audio ‘clapperboard’ point by tapping a pen firmly onto a hard surface, as close to both camera and recorder mics as possible. This will cause a fast ‘edge’ to become the reference point, which will be useful later.

Step3: Let both devices run for at least 10 minutes – 20 minutes are better, but not essential.
At the end of the period, (timing not critical), make a second similar ‘clapperboard’ reference point. Allow a few more seconds recording, and then stop both devices.

Step 4: The next step is to extract the audio from the camera recording. If recorded onto tape, ‘capture’ the file via firewire using WINDV, or if you were able to capture directly to hard drive, as described above, ignore this step.

Step 5: Open the video in Virtualdub, by clicking ‘file’ and then ‘open video file’. Open ‘file’ again and click on ‘save WAV’. This file will be your reference audio file.

Step 6: Open the WAV file saved in the previous step in ‘Audacity’ – a free audio editor.

It is now necessary to save only the part of the file between the two ‘clapperboard’ references, which hopefully stand out clearly (if you hit the pencil hard enough in steps 2 and 3!).
This must be done accurately, to within 100th of a second, or better.

Click and drag the file to highlight the beginning section, including the first ‘clapperboard’ waveform – Use the ‘fit selection to window’ tool (immediately to the right of the ‘zoom‘ tools) to magnify. Delete as much as possible before the ‘clapper’ reference. Repeat the operation until you can clearly identify the first distinct waveform of the 'clapper' reference waveform. Click, hold and place the cursor directly over the first full (clipped) waveform, where it crosses the centre line. Delete every thing to the left of that point, by clicking and dragging to highlight, and then deleting with the scissors tool.

Step 7: Repeat the above procedure for the end part of the waveform, again using the start of the second ‘clapper’ waveform as your reference cutting point. In this case, cut everything to the right of your selected reference point (not the left, as in the first case.)

Step 8: It is necessary to record the exact length of this new cropped waveform. This information is listed at the bottom of the window, but in a rather inappropriate format. Locate the toolbar at the top of the window, click ‘Edit’ –‘select’ – ‘all’, and then ‘Effects’ – ‘change tempo’ . Note the length of the file in seconds in the right hand box (the left hand box is greyed out).

Record this figure – it is the reference file length

Step 9: It is necessary to convert the file recorded on the audio recorder into an identical format to the camera audio track, namely 48 KHz 16 bit PCM. If the track is not already in this format, open it in Switch, a free file transfer program, and select the output encoding as 48 KHz 16 bit, mono or stereo to fit your audio file. This program will then convert whatever format your input file is (MP3, WMA, 44.1 KHz PCM, etc) into the required 48 KHz, 16 bit format required.

Step 10: Repeat the procedures in steps 6 and 7 for this new file. Edit the ‘clapper' points with as much accuracy as before, but notice that the 'clapper' waveform will appear different from the first, although hopefully with as clearly defined first’ zero crossing’ point.

Step 11: Repeat the procedure in step 8, and you will notice that the overall file length is different.
Overwrite the original file length into the right hand box, and take careful note of the resulting figure in the percent change box. Make sure you record whether it is a plus or minus value – it could be either! This is the most important figure, because it represents the percentage variation between the two units.

Once you have obtained this value, simply apply it to all files recorded with the same recorder and this camera. Providing you can align the start of the file with a single’ clapperboard ‘ mark, there is no need to repeat the rest, simply change the length of the external audio file by the correct percentage value to allow the two audio tracks to remain synchronised.


It may seem along winded process, but it only needs to be done once, and could then save quite a lot of time in trying to ‘align’ tracks manually, in small sections.


Last edited by rogs on Mon May 07, 2007 10:03 am; edited 3 times in total
Back to top
View user's profile Send private message
rooster



Joined: 03 Apr 2007
Posts: 39
Location: Ireland

PostPosted: Mon Apr 09, 2007 11:56 pm    Post subject: Reply with quote

What a very simplistic explanation ,its you who should be writing the books.
Bill
_________________
"A stranger is just a friend you have yet to meet"
Back to top
View user's profile Send private message Visit poster's website
sholao



Joined: 04 Apr 2007
Posts: 6
Location: London

PostPosted: Wed Apr 11, 2007 11:53 pm    Post subject: Reply with quote

Very useful indeed. I have bookmarked this, as I need to try this with my olympus ws200
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    My Video Problems Forum Index -> How to......... All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Surf Anonymous with Zzoop Proxy Free Games Online

Web Hosting for this free forum is provided by Free Bulletin Board get your free phpbb forum or free Invision forum today!



Powered by phpBB © 2001, 2005 phpBB Group