A/V Sync time warp

flyingski wrote on 12/2/2013, 12:36 AM
I recently ran into an audio/video sync problem while recording continuous two hour+ videos in the AVCHD format and rendering the files to the mp-4 format for upload to Vimeo. I reproduced the exact same out of sync condition with two identical cameras, 3 computers, multiple render formats and different file importation methods. This is ntsc 29.97 video from Cannon M-500 camcorders and I'm using V12 Pro.

The camera breaks the recording into multiple files every 1.9 GB (11:20). I surmised the out of sync must be related to the re-assembly because if each individual file is rendered separately the sync is fine. It's only when I try to render one continuous 2:00+ file that things go wrong. Here's what I discovered and if someone can explain this to me I'm all ears.

Importing the files directly from the card or coping them to the hard drive first made no difference. Cannon's file import utility copied the individual files exactly the same as Windows Explorer did. Be it from a file copied to the hard drive or directly from the card, if the individual files were assembled into one file using the Vegas Device Explorer the resulting file was a different length than if the individual files were imported and butted together on the time-line And here's the rub: neither the single unbroken file created by device explorer or the butted together files maintained A/V sync when rendered. Files imported with TSmuxer were of yet another length and still out of sync. Things start in sync and get progressively worse. Lips are noticeably out of sync by about the 40 minute point and laughable at 2 hours in the rendered version.

I set a camera up to record a running stopwatch and at the end talked to the camera so I could check both the actual time and lip sync. I repeated this test twice and the two importation methods (Device Explorer & Individual) produced the exact same results each time. The two hour marks on the stop watch occurred at different points and neither matched the two hour point on the time line.

Using the 2 hour mark on the Vegas time-line as a reference point the Device Explorer import produced a file that was 8 frames short of 2 hours. The 11 butted together files were 28 frames short of the 2 hour mark.

The maddening part of this is that whether I used the Device Explorer import or the Individual File import method the sync was perfect for either one when viewed in the Vegas preview window while editing. The out of sync occurs only when the file is rendered. It rendered out of sync files in mp-4 using Sony AVC, MC and TMPGEnc VMW5. It was also out of sync in mpeg-2, AVI and MXF formats. The Device Explorer file, which came closest to matching the Vegas 2 hour time line mark is the most out of sync when rendered.

Through trial and error I found if each individual clip's AUDIO file was cross-faded one frame into the preceding clip the rendered file was perfect from start to finish. This resulted in an audio file that was 38 frames shorter than the 2 hour mark on the time-line The audio cross-fades were indistinguishable in the final rendered file.

Here's the file info: AVCHD format at 22.7 Mbps 1920 x 1080, 29.97 AVC (High@L4.0) (CABAC / 2 RefFrames). Audio 256 Kbps, 48.0 Khz, 16 bits, 2 channels, AC-3. In other words, the standard
Canon MXP 24 Mbps High Quality mode.

Is this something unique to these cameras? Is the audio off, is the video off, is the time line off? I don't care where the actual two hour mark really is as long as the lips announcing it agree with the ears.

Comments

john_dennis wrote on 12/2/2013, 1:07 AM
Have you tried the DOS method of joining the files as described in this thread?

"[I]Through trial and error I found if each individual clip's AUDIO file was cross-faded one frame into the preceding clip the rendered file was perfect from start to finish. This resulted in an audio file that was 38 frames shorter than the 2 hour mark on the time-line The audio cross-fades were indistinguishable in the final rendered file.[/I]"

Have you tried Control-Dragging the audio out 38 frames to match the video on the final output? I'd use WAV (PCM) for the intermediate renders.

flyingski wrote on 12/2/2013, 1:33 AM
Thanks for the response John. I used WAV as an intermediate and it made no difference. Control+Dragging out 38 frames, while it looked like logical, actually made things vastly worse. The audio file needs to be shortened. I tried Control+Shrinking and could get portions of the file close but never correct for the entire project.
musicvid10 wrote on 12/2/2013, 11:49 AM
You may just have to trim or overlap audio frames if neither the Canon utility nor Vegas' Device Explorer gets it quite right. Assuming the sync is right within each captured clip, it shouldn't take too long.
flyingski wrote on 12/2/2013, 1:56 PM
Overlapping frames is the only solution I see. I tried the command prompt copy command to concatenate the files and that produced exactly the same file Device Explorer did. A single frame cross-fade on the individual files goes very quickly and produces a perfect file.

I'm still interested in knowing if anyone else has encountered this problem and wonder if every camera is different.