2010-02-08

DSLR Sync Drift in Final Cut Pro

This post is a follow-up to my earlier post about the 99.9% speed problem that some people encounter with Final Cut Pro. I have learned a few things since then so now I can explain better what is going on. I have also simplified the procedure for avoiding the problem. Thanks go to Philip Bloom and Robin Charters for illuminating discussions about this unfortunately complex topic.

Symptom: My sound drifts out of sync!

You carefully synchronized your audio track with your video. (I hope you used PluralEyes :). It lines up nicely at one point in the timeline, but the farther away you get from that point the more out of sync the audio and video get.

There are a couple of different reasons why this can happen. Perhaps the clock in your audio recorder is not very accurate. (The Zoom H4 and M-Audio Microtrack are not very good in this regard. The Zoom H4n however is excellent and is highly recommended.) Another possibility is that some frames were dropped while capturing.

But if you are working in Final Cut Pro, a far more likely explanation is that it has not been set up exactly right. More specifically if you sometimes work with NTSC frame rates (like 23.98 or 29.97) and sometimes with non-NTSC frame rates (like 25 for PAL or 30 for the Canon 5D), then you have to take some care.

This problem is not specific to video from DSLRs but their rise in popularity and the accompanying increase in the use of dual-system audio techniques has resulted in the problem showing up more often.

A not-recommended solution

Some people solve the problem by changing the speed of the audio clips to 99.9% or 100.1% depending on which version of the problem is happening. I don't recommend this approach because it causes the audio to get resampled twice for no reason, which extracts a performance and quality penalty, and because it can cause issues in downstream processing. Better to set up FCP properly in the first place.

The recommended solution

In this section I'll just tell you what to do so you can get back to editing. But if you want to know why, you can read more about that farther down.

The key points to avoid the problem are these:
1. Don't mix NTSC and non-NTSC material in one sequence. (Instead, use Compressor to conform everything to a common frame rate.)
2. Use an Easy Setup that matches your clips, especially with respect to the NTSC properties of the frame rate.

How to avoid the problem in the first place

1. In FCP, close all open projects. Update: It wouldn't hurt to also turn off the option to automatically re-open the last project in FCP. (Uncheck the box Final Cut Pro > User Preferences... > Open last project on application launch.)
2. From the FCP menu choose an Easy Setup that matches the frame rate of your video clips. If you can't find an exact match, pick one with the same NTSC properties as your video. For example, if you are working with 30.00 fps material from a Canon 5D, then choose an Easy Setup with a 25 fps frame rate.
3. Quit and re-start FCP.
4. Create a new project and import your clips.
5. Add your video clips to the timeline first so that Final Cut will auto-conform the sequence if that's needed.

How to fix a broken sequence

The following procedure is not foolproof but it has worked for people, and it's pretty quick to try. I just wouldn't rely on it.

Maybe you've already done a lot of work on your project and can't bear the thought of starting over again from scratch. The following procedure will let you solve the problem for an existing sequence, but it may have to be re-done if you add more audio clips later. Because of this fragility it is not our preferred procedure.

1. Select the problem sequence in the FCP browser, right-click it and choose Export > XML.
2. Open that XML file in a text editor.
3. Look for the tags <ntsc>. If they all say
<ntsc>TRUE</ntsc>
or if they all say
<ntsc>FALSE</ntsc>
then you don't have a problem. But if there is a mix of TRUE and FALSE values, you need to change them so they are all the same. What value should you pick? The one that matches the NTSC-ness of your video clips.

Once you have fixed the XML, you must go through the procedure to establish a new Easy Setup as above or the NTSC changes won't stick.

Why does this work?

When you add a video clip to a sequence, FCP knows what frame rate to use: it just looks at the video clip properties. Audio doesn't have a frame rate like video, but FCP needs to assign it one because many editing operations are tied to the video frame rate. So when you add an audio clip to a sequence, FCP has to pick a frame rate for it.

That choice is apparently made based on the sequence presets (which are set by the Easy Setup), and can depend on what settings are in the cache, not just those that are currently selected. You have to go through all the re-start, etc. steps to ensure that the cache is cleared. FCP seems to be able to adapt to whatever frames-per-second are chosen, but it needs some help to get the NTSC property right.

But you don't need to understand those subtleties. You'll be safe if you always follow these steps: (1) choose an appropriate Easy Setup, (2) restart FCP, (3) create a new project.

57 comments:

  1. Bruce, it seems to me that if you've gone to the trouble of figuring out how to sync different audio tracks with each other, pluraleyes should be able to adjust the framerate of each sync'd track so that the synchronization is maintained throughout the duration of the sync'd portions. Shouldn't this theoretically be possible?

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Anonymous3:26 PM

    Audio has no frame rate, it has a sample rate and bit depth. If the sample rates and bit depths match the Sequence Settings, things are fine.

    ReplyDelete
  4. @Anonymous: Sorry, but no. It is true that audio has no frame rate but Final Cut needs to assign it one to work with it. The one it assigns depends on the sequence settings, as described.

    ReplyDelete
  5. Anonymous12:17 AM

    Funny, I seem to be experiencing this issue right now. Sequence/Capture presets are in order. Using audio captured from H4 zoom though. Any advice for remedying the H4 audio?

    ReplyDelete
  6. @Anonymous: The clock on the H4 is not terrifically accurate so there will be drift. It's not horrible though. In our tests it slips about one video frame every six minutes. So if you can cut up your clips to keep them short you'll be OK.

    ReplyDelete
  7. awesome. thanks so much for this post. I recently upgraded to the new firmware on the 5d, recorded a week of work in 24p using dual sound with the h4n zoom and couldn't manage to get it synced. Panic is over.

    ReplyDelete
  8. Anonymous11:39 PM

    I shot an interview on a T2i and am editing on FCP 7. Video clips range from one to twelve minutes, but sometimes I left my H4N running. When syncing with pluraleyes it will lay the audio track over two or three video clips, which makes sense since the audio was recording the entire time. In some of the pluraleyes sequences I get 2-3 video clips and audio. I assume this because audio was running over all video tracks. I cut the audio using the razor tool at the edit points of the video then link each one to respective video and drag into the bin. When I check the clips in the bin there are sections of audio with no video... sections where it synced perfectly... and sections with video and no audio. Is there a way to make this cleaner. Is there a way for pluraleyes to sync only with available video and do nothing with the extra audio

    ReplyDelete
  9. @Anonymous: This is probably a better question for our forums than this blog post, but the answer is that there is an update to PluralEyes in the works that will simplify this workflow.

    ReplyDelete
  10. avilewis4:48 PM

    Hi Bruce,
    Thanks for this supremely useful post!
    I've just come back from my first full shoot with the 5D - I work for an international news network, so we shoot in PAL. I have the latest firmware upgrade and we shot 25P, recording 48mhz audio on the H4N.
    I'm not actually editing on my system - just need to line up audio and video so I can pick interview clips to include in my script. I generally do long interviews, 40 minutes+, so there are multiple video clips for each audio clip - we record continuous audio and use the elapsed time in the .wav files as our substitute for timecode.
    Hope this is clear(ish) so far!
    I happily bought PluralEyes, and have been using it with relative success - it is lining up the H4n material with the 5D video (with Rode shotgun for reference audio), though it is not frame accurate. There is still a discrepancy of a number of frames, as well as drift over the course of the interviews.
    So I have two issues - first, can you recommend what I should try to get PluralEyes to be even more accurate the first time around?
    Second, can you recommend an Easy Setup that I should use with my 25P footage? Since I'm just viewing and making notes on the interviews, it seems like a huge amount of time to transcode all the clips with Mpeg Stream Clip - so I've been trying (I know, I know!) to work with the h264 raw footage from the camera. It's playing pretty well, although I admit my system is bogging down a little.
    Thanks in advance, and sorry if this blog is not the right spot to seek advice in this depth - I know I'm prevailing on your inherent generosity as a fellow Canadian. :)
    cheers,
    avi

    ReplyDelete
  11. avilewis7:42 PM

    Update:
    I bit the bullet and processed all the clips, using a 25p codec (XDCAM).
    Magic! PluralEyes works perfectly and no drift.
    Thanks again for this repository of wisdom!

    ReplyDelete
  12. I had this problem fixed with an Easy setup for 30fps, but with the firmware update it's back. Now my audio drifts the other direction, and I have no clue which Easy Setup setting to use from here out. This is an area of FCP setup I only vaguely have a grasp of (the do it once and forget about it methodology). But here's how I understand my current problem.

    I fixed the audio drift previously by making my Easy setup a true 30fps sequence setting. Audio conformed to that. With the firmware update the 5D is now shooting at a true 29.97fps. Because my Easy Setup still is set up as 30fps, the audio imports as that, but the camera is slightly slower. Is my logic correct? I can fix an audio track by changing the speed to 100.1%.

    So, what do I pick for a new sequence setting? When you say in your post to chose a 25fps setting, it thoroughly confuses me.

    ReplyDelete
  13. The principle is: pick an Easy Setup that matches the frame rate of your footage. You've got 29.97 fps video now so pick an Easy Setup for 29.97 fps.

    ReplyDelete
  14. it is entirely possible you have answered this above and I am just having trouble figuring it all out. I shoot the majority of my work with the 5Dm2 in 30p. however, still use the Canon XLH1 & XHA1 (1080 30p) for small pieces and use that audio as well when editing with FCP. I use MPG Streamclip prores with all 5D footage before going into to FCP. Is there a special setting I can use when I am capturing the H1 & A1 tape into FCP so it matches up with the 5D? I have been capturing the tape with "sequence preset 1080p30" and fairly certain that is incorrect. Thanks for your help!

    ReplyDelete
  15. Anonymous9:19 AM

    Using a Canon 1Dm4 with Marantz 661. I solved the sync problem by running the video clips thru Compressor creating AppleProRes HQ files. Pulled the footage and AIFF files into FCP and Plural Eyes sync'd them perfectly.

    ReplyDelete
  16. Anonymous9:02 AM

    Ok, so I am having some major issues. I have 30p footage shot with the Mark II and recorded using the Zoom H4N. I synced them and all is fine and well in the beginning, but then it goes out of sync down the timeline. I tried the 99.9% and that still doesn't work. Please help!

    ReplyDelete
  17. @Anonymous: You said you tried the 99.9%, but I'm going to assume that you actually read the post (which is all about why you should not make a 99.9% adjustment) and followed the steps recommended in it.

    Depending on which firmware version you are using, the 5D footage will be either 29.97 fps or 30.00 fps, so be sure you are setting up for the right one. Also, be sure that you are not mixing footage with different frame rates on the timeline.

    If that's all good, all I can tell you is to try again and do not skip any steps. I've never seen a case where all the steps were followed to the letter and it didn't work.

    ReplyDelete
  18. Bruce,
    I really appreciate your help. I've been following all your steps over and over, still no luck. Sync is fine at top and then drifts after one minute.
    Interview is shot with Canon 5D Mark II 30fps, 44.1
    Duel audio recorded 44.1 on TAS Cam DR10.
    I have compressed the 30fps in Compressor to ProRes
    I have followed your steps over and over many times to change easy set up.
    I have closed FCP, restarted, imported material, new projects, new timeline, still same drift. Plural eyes syncs fine, but after a minute or so drift still happens. Any clue what is happening? Many thanks, Mary

    ReplyDelete
  19. @Mary: It is possible that the Tascam doesn't have a very accurate clock. We haven't tested that model, so I can't say for sure. If you send us your project and log files as described on the page below, we can take a look.

    http://www.singularsoftware.com/submit.html

    Bruce

    ReplyDelete
  20. Thank you Bruce I will send them tomorrow. So nice of you to help.

    ReplyDelete
  21. Bruce,
    I sent in my project via Dropsend. Did you receive it? Thanks, Mary

    ReplyDelete
  22. Hi Mary, got it. I can confirm that there is no significant drift in the Tascam. You didn't include the project file (.fcp) among the data you sent. That will have some clues too, so if you'd like us to investigate that please send it.

    I still suspect that it is the FCP settings that are the root of the problem, but the project file will tell us for sure.

    Bruce

    ReplyDelete
  23. Thanks Bruce I resent it.
    Mary

    ReplyDelete
  24. Anonymous4:55 PM

    It should be said that with the "not recommended" solution there is a difference between "resampling" and a "speed change". I'm pretty sure that FCP does real time SRC so that all audio conforms to 48k. So if you're throwing a 44.1 sound file into your timeline, you're already suffering a quality hit due to FCP's SRC. You're better off a) recording in 48k to begin with, when possible, or doing an offline SRC with something like Izotope's SRC which is arguably better than FCP's SRC.

    If a pull down or pull up rate is required (i.e. 99.9% or 100.1%) this is not a resampling (yet). it's a speed change. It's just telling FCP to literally speed up or slow down the file in question so it lines up with your video.

    Now if you've only done these two thing so far:

    1) offline high quality SRC
    2) speed change

    Then you've arguably improved your quality. It's not until you export where you conform your 48048 (or whatever) back to 48000 that you have to do the second resampling. It's at that point that you take the hit - and I for one am not going to hear much of a difference in most applications.

    In any case post production starts in pre-production. When pre and post are coordinated and the output specs are ironed out ahead of time the old adage, "fix it in post" is jest in irony rather than in seriousness...

    ReplyDelete
  25. Hi Bruce,
    Did you get a moment to take a look at the project I sent you? Any ideas on what is wrong?
    Many thanks,
    Mary

    ReplyDelete
  26. @Mary: Sorry, thought I already responded but apparently not. The project file confirms that the phenomenon described in this blog post is what you are running into. I'll follow up with you via email for next steps.

    Bruce

    ReplyDelete
  27. Thanks Bruce. I'll look for your email.
    Mary

    ReplyDelete
  28. I can't thank you enough.

    ReplyDelete
  29. In AVID there's a way of syncing sound to a clip then creating a new clip with the additional tracks. Is there a corresponding feature in FCP?

    ReplyDelete
  30. I'm still at loss. Even with new project with 25p Easy Setup, FCP still assigns 24p timebase to audio clips. I'm at my wits' end.

    ReplyDelete
  31. Anonymous6:06 PM

    I just ran into the Sync Drift problem and wasted 1/2 a day until I found your article. I am editing a two hour music concert that was shot in PAL and remixed to the PAL picture. However, due to delivery requirements, I had to edit the NTSC version first and, hence, started the FCP project with an NTSC Easy Setup. When it came time to conform the PAL version, the audio, while in sync in the beginning, drifted out of sync by approx. 5 seconds at the end.

    I tried the 99.9% solution and it worked. However, you don't seem to prefer that and, since ours is a music project, the sound quality is critical. The problem is, I can't really start from scratch with a new PAL project because I will never be able to conform the edits from the NTSC version. If I can create a PAL timeline in the same project, at least I can cut and paste across the timelines.

    So, I would like to change the XML file as you recommend to conform the audio to a PAL timeline. Is this the correct procedure:

    In the sequence XML file, set all the tags FALSE. Then, in the original Final Cut project, change the Easy Setup to 25fps PAL, close the program, re-open it and import the modified XML.

    Thanks for all your help.

    Michael Prescott

    ReplyDelete
  32. Anonymous8:34 PM

    I record concerts using an EX-1,at 29.97fps with separate audio from SoundDevices 722 at 96khz. In a one hour concert there is an approximate drift of about 10 frames. To avoid the problem, I use a program called SoundHack to change the audio header before importing to FinalCut. I change the sample rate spec from the value 96000 (stamped in by the recording device) to the new value, 96009. Then the audio comes into FCP without drift - I just have to align at one spot and sync is then maintained. This works better than using the FCP speed change command because there is no fancy processing going on in an attempt to leave pitch unchanged - and theoretically, the pitch needs to change anyway in order to match the camera audio (not that I can actually hear an A440 pitch difference of 1 beat in 25 seconds !).

    ReplyDelete
  33. I have a horrible audio drift problem and I tried your XML solution and it didn't work. My original footage is mixed, I have stuff shot on a 7D that is 30fps and I have a lot of 29.97 fps in the same timeline. I don't know if that is the root of my problem, but I am desperate for a solution. Any more suggestions? All of the audio is at 48 so I know that is not it.

    ReplyDelete
  34. --What is the current state of affairs re drifting synch if you are using:

    -- Canon Plug in for Final Cut which converts 5D Mk11 and 7D footage to ProRez Lt and 29.97 fps. When I go info on my clips it says 29.97, 48khz audio left and right.

    --The latest version of Plural Eyes

    Do I still need to do Easy Setup if I want to avoid drift when combining audio from a Zoom 4Hn set up to record at 48khz

    What about synching audio from an XHA1 in the same sequence?

    Tim



    Tim

    ReplyDelete
  35. @Tim Palmer--Benson:

    Canon plug-in: The problem is not specific to Canon. It is just a matter of the frame rates. 29.97 fps does not guarantee it will work. You have to make sure the Easy Setup is correct.

    Latest PluralEyes: It is not a PluralEyes issue. Unfortunately we cannot correct the problem from within PluralEyes.

    Zoom H4n at 48kHz: Mixing audio sampling rates (typically 44.1kHz and 48kHz) is not a problem. But if you mix video frame rates like 29.97 and 30.00, you will always have a problem. You need to transcode to a common frame rate.

    Bruce

    ReplyDelete
  36. @Margo: Mixing 29.97 fps and 30.00 fps doesn't work in FCP. You need to transcode to a common frame rate. Typically you will use Compressor to go to one of the ProRes codecs.

    Bruce

    ReplyDelete
  37. @Michael Prescott: The fix-up procedure you describe should work.

    Bruce

    ReplyDelete
  38. Hey I just wanted to add a bit of info here... You can use compressor to batch change audio files if in fact they are uniformly slower or faster. Look for quicktime/audio formats in the compressor settings - you'll see 48/16 - change the frame controls to on and change the speed of the clip to 99.1 or 100.1 as needed - save that setting and then apply it to all your audio files. A lot easier than doing it manually in the timeline - also allows you to merge clips in the browser (which is what I do)...

    ReplyDelete
  39. Hello! I have just edited a 2 hour concert with 29,97 fps (from newer Canon cameras) and I am having trouble syncing them to the master audio track (48khz). The sequence setting appear correct, but my easy setup was set to DV PAL. How can importing a 48khz wave file into a sequence be a problem when the cameras audiotracks also are 48khz and playback perfectly in sync? Are there no simple solutions to this simple problem?

    ReplyDelete
  40. Anonymous1:31 PM

    Can you clarify this quote? To me it is very confusing:

    "if you are working with 30.00 fps material from a Canon 5D, then choose an Easy Setup with a 25 fps frame rate."

    If you suggest to match footage and easy-set-up, then why suggest a different frame rate in this example?

    Also, why are the many mentions of NTSC relevant?

    ReplyDelete
  41. Jeremy3:22 PM

    I'm working with a new canon 5d mark ii and shot everything in 24fps (which is really 23.97). I have changed my easy setup to match this - Apple Pro Res 422 23.97 fps, as well as trying Apple Pro Res 422 24fps... but I still have to speed the audio up to 100.1% to keep it in sync. I used completely new projects each time I created a new Easy Setup as well... why is my audio still not in sync?

    ReplyDelete
  42. @Jeremy Did you also close all projects in FCP and re-start it, before making your new project? I have never had the procedure fail when every step is followed exactly.

    ReplyDelete
  43. Jeremy1:48 PM

    Hey Bruce,
    After hours of running in circles, turns out I was creating a sequence preset in Audio/Video Settings, but never actually creating the Easy Setup. Call it user error (or stupidity). Thanks for the help!

    ReplyDelete
  44. Hi - I have done as you said - but can't understand how the audio is going to be retagged...? I have reimported it into a new proj, and checked on the xml - it's still FALSE on the audio tags...

    ReplyDelete
  45. Hi - I've followed your steps (thank you) but the xml still shows FALSE tags for the audio in an NTSC proj. How do I get FCP to think of the zoom H4N audio as NTSC from the start?

    ReplyDelete
  46. erm cancel that - somehow it now works!

    ReplyDelete
  47. Thanks You just save my day!
    Great Work!

    ReplyDelete
  48. Here is an interesting audio drift case that got solved with your wisdom although there is still a mystery. I got footage from the Canon 7D shot at 23.98 fps, native audio at 48, 16 bit. Audio from the audio mixer was recorded at 48K, 24 bit. As usual, I converted the footage to Prores and also made the native audio from the camera to be 48K, 24 bit instead of the native 16 bit.
    When I brought them to a new FCP sequence FCP wanted it to be 48k 16 bit but my prores footage and my audio source are 24 bit. I decided to change the bit rate of the sequence to 24 bit then. Then, I exported the wave files to AIFF (standard at my workplace)and when I imported the AIFF 48/24 bit to the sequence this new audio file was 1 1/2 second shorter than the wave file and was drifting over time.
    I got hold of your posting and did an easy setup test, quitting FCP, etc. I noticed again that with the Easy Setup FCP wanted to make the sequence 48/16 bit. This time I embrace it even thought it wasn't making sense. Then, both the original waves files and the converted AIFF (which we use to edit) were all in sync.
    Is it possible that FCP remembers the actual 48/16 bit from the h264 footage in the converted Prores which is 48/24 bit? This is a real mystery. Thanks for your valuable support.

    Mabel Valdiviezo
    Video Editor

    ReplyDelete
  49. Thanks so much! I have been struggling with this issue for a while and following your steps finally corrected the problem! Cheers!

    ReplyDelete
  50. Andy B8:04 AM

    Hi Bruce,

    I made the mistake of having my Zoom H4N set to 44100hz 16 bit, while my Canon 7D was filming at 25fps at the default audio setting of 48000hz. I'm editing in Premiere Pro 5.5 and it starts drifting almost straight away. In a five minute music performance it's out by 28 frames by the end (the Zoom audio lags behind the 7D footage).

    My project and timeline settings are at 48000hz so I used Adobe Audition to re-save my Zoom recording to 48000hz but I still have the same problem. Is the easiest solution just to get the free pluraleyes trail? Will this change the drifting issue as well as synch it up? ( I used clapperboard at the start of the footage and did it manually).

    And to avoid next time, do I simply set the H4N to 44000hz?

    Tearing my hair out a bit with this, many thanks.

    Andy

    ReplyDelete
  51. Hi Bruce.
    @ Andy B I have the exact same problem. Recorded Pal 25fps to sony camera and audio 44100hz to Adobe Audition. Drifts after a few minutes. I have hanged frame rate in Compressor, done the new fcp sequence thing with no success. No sleep and I need to have edit ready by Monday.

    Pls help Bruce.

    Douglas.

    ReplyDelete
  52. Audio sample rate is not a factor. If the steps described in the blog post are followed exactly, I've never seen it fail. You can check whether you've got the setup right by running the CheckFPS utility that is available here:

    http://www.singularsoftware.com/troubleshooting.html#drift

    Bruce

    ReplyDelete
  53. Anonymous6:24 AM

    Bruce you're a life-saver. Sanity restored.

    many thanks.

    ReplyDelete
  54. Anonymous9:37 AM

    +1,000,000 karma points. TY!!

    ReplyDelete
  55. Anonymous3:36 AM

    Hi Bruce,

    Thanks for your thorough article. I think I followed your steps correctly but still encounter a sync problem. I shoot with a 5D, am based in Europe so I shoot pal 25fps and record with a philips device (When I was still at film school I used a marantz and never had this problem). When I change my easy setup to pal 25fps I still encounter the problem. When I try your non recommended option (99,9%) it does sync. But because you don't recommended I hope I can still solve the problem via the easy setup way. Should I put it on pal 25 fps?

    I am not a fcp expert and wonder about the compressor part. Should I compress it to proress before pluraleyes? And is that done by putting my sequence settings on prores and then render it or should it be done in the program compressor?

    Hopefully you can tell me what I did wrong.

    Thanks in advance,

    Daan

    ReplyDelete
  56. Mark B.3:45 PM

    This is great, works perfectly—NOTE FOR FCP 6 USERS: there's a critical extra step, you have to manually trash the preferences in order for it to work, simply restarting FCP is not enough. I don't know if it's necessary, but I restarted my Macbook Pro as well just to be sure. Once I did that and tried Bruce's fix again it worked like a charm.

    ReplyDelete
  57. OK. I'm running Final cut 7, found this article and it's just saved me an all nighter! Thank you A MILLION for posting it. I've been on a wild goose chase thinking there's something i'm missing out about my h4n's sample or bit rate record settings matching up with the 25fps from my canon 5d. For me changing the easy setup and starting a new project (the preferred method above) ensure's that there isn't all that true rubbish in my XML file when what I need is a PAL timebase. Thanks again. Legend.

    ReplyDelete