Audio Sync Issues With After Effects

After completing a recent project in After Effects, I rendered out the entire 8 minute video as a JPEG sequence. The reason? An A/V company we were working with for a live event planned on handling all of the compression for us, since the composition was a whopping 15,000 pixels by 3,000 pixels. I just wasn't able to render something that large with a codec that could bring the file size down to a real-time, playable video. A ProRes file at that frame size was too large, but an MPEG4 at half the frame size was too compressed, and the final video looked pixelated when scaled. So, I delivered the entire video as a JPEG sequence with the audio as a separate WAV file.

Now, with a project that large, I couldn't preview the video in real-time within After Effects. A RAM preview would take forever (The JPEG sequence took roughly 20 hours to export). So, to see the video, I had to render it out as a 1920x1080 ProRes 422 file. This took roughly 5 hours to render. Afterwards, I was able to get a better sense of flow, pacing, and transitions. The only realy problem? The audio slowly drifted out of sync with the video. 

I'll spare you the details of every troubleshooting step I took in this process and skip right ahead to the solution that was discovered. 

All of the audio sync issues were due to the JPEG sequence itself. Here was my worflow:

-I took my Master composition and rendered it out as a JPEG sequence. 

-I re-imported my JPEG sequence and created a new composition based on those specs. 

-I dropped in the audio from the Master composition. 

-I rendered that out as a 1920x1080 ProRes file for review. 

-The audio drifted out of sync. 

I rendered my ProRes file from the JPEG sequence, rather than from the Master composition, because it wouldn't take near as long. When I noticed the audio issue, I went back to my Master composition and spot-checked all audio, to make sure the audio of individual elements within the comp lined up with the final audio mix.  

Confident that all video was in sync with the audio inside of my Master composition, I rendered out a short 10-second sample from the Master composition. The results were good: the audio was in sync. So, the problem was with the JPEG sequence.

Upon further study, it was noted that the JPEG sequence was a full 30fps, which didn't match the 29.97fps project. So, there was a difference of .03 frames for every second of video. This is why the audio was drifting.

So, instead of creating an After Effects composition with the same specs as the JPEG sequence, I manually created a new composition and set the frame rate to 29.97fps. Then, I dropped in my JPEG sequence and audio as before. Then I rendered out a new 1920x1080 reference video. 

The audio was still out of sync. 

After that test, it was obvious that After Effects did not automatically conform the 30fps JPEG sequence to 29.97 when dropped into a 29.97 composition.

To fix this issue, if you ever come across it in your own work, is to interpret the JPEG sequence at 29.97fps before dropping it into a composition. To do this (inside of After Effects CS6)...

-Right click on the JPEG sequence while it's still in the Project Panel. 

-Click "Interpret Footage" 

-Click "Main" 

-Inside the dialog box, specify the frame rate at 29.97fps rather than 30fps. 

If you have ever had audio sync issues while working with JPEG sequences inside of After Effects, hopefully this will solve the problem for you. 

Be sure to share any of your own tips in the comments below.