Wednesday, February 17, 2010

Recording EOS movies with synced external audio - The simple way

I found a very convenient way to get high quality synced audio. I tried this some time ago with my Canon 5D Mark II but gave up because I couldn’t get the external audio synched to the movie files. Now that I know that the 5D Mark II takes some time to actually start recording (when triggered via remote) I tried it again with success.

All that’s needed is a Zephir universal remote control, an Apple computer with QuickTime Pro and an USB bus powered audio interface with phantom powered microphone input(s) like e.g. the Alesis io|2 or a Shure X2U or a Centrance MicPort Pro.

To get the Canon RC-1 remote for the Zephir click on WebztIR in the Zephir application and navigate to Canon - Camera - Remote_RC_1. To make it compatible with the Applescript below rename the rather long video starting command to "START-STOP VIDEO".



Starting and stopping audio and video recording is done by AppleScript. Copy and paste the script below into the Script Editor and press the green run button. Note that there's no guarantee for the accuracy of AppleScripts delay command.


(*
Start and stop EOS movie and QuickTime audio recording.
EOS movie recording starts with a delay after receiving the remote signal but it stops at the same time as the audio recording.
To sync video and external audio align the track ends.
Requires a Zephir universal remote control (thezephir.com), an Apple computer with QuickTime Pro and an USB bus powered audio interface with phantom powered microphone inputs.
2010, Martin Koch, controlyourcamera.blogspot.com
*)

tell application "ZephIR" to activate --get ZephIR ready
tell application "System Events" to set visible of process "ZephIR" to false --hide ZephIR

tell application "QuickTime Player" to activate --get QuickTime Player ready
tell application "QuickTime Player" to new audio recording --prepare new audio recording

tell application "Script Editor" to activate
tell application "Script Editor" to display dialog "Recording" buttons {"Cancel", "START"}

say "three"
delay 1
say "two"
delay 1
say "one"
delay 1
say "action"
beep

tell application "ZephIR" to fire zephir command "START-STOP VIDEO" of component "Canon RC-1"
tell application "QuickTime Player" to start first recording

tell application "Script Editor" to display dialog "Recording ..." buttons {"STOP"}

ignoring application responses --don't wait until the Zephir action has finished
tell application "ZephIR" to fire zephir command "START-STOP VIDEO" of component "Canon RC-1"
end ignoring
delay 0.33 --alter this delay until the EOS movie and QuickTime recording end at the same time.
tell application "QuickTime Player" to stop first recording
tell application "QuickTime Player" to close first document




The AppleScript starts movie recording with the help of the Zephir universal remote control and uses the QuickTime Player to record an audio file at the same time.


The audio files are automatically saved at a location that can be determined with QuickTime Player > Preferences… - Recording. They are automatically named Audio.mov, Audio 1.mov, Audio 2.mov and so on. With the 5D Mark II file numbering set to “Auto reset” paired file naming can be achieved so finding the corresponding audio files is easy.


All that’s needed to sync the audio tracks is to align the track ends. AppleScript doesn't guarantee exact timing but I found that the synchronisation accuracy most of the time was high and repeatable.

I run the script without delay first and measured 10 frames difference between the audio spikes. At a frame rate of 30 fps one frame equals 1/30 = 0.033 seconds so since the external audio was 10 frames earlier a 0.33 s delay did the syncronisation.



The screenshot above shows the timeline zoomed in to a one frame level. As you can see the offset is really low and not audible. But since AppleScripts timing is not dependable such a synchronisation accuracy is not always the case.

If the audio sync is not perfect select the video track and press the . or , key to move the track by one frame until the audio waveforms line up.

No comments:

Post a Comment