Hi All,
I wanted to follow up on my own post in case anyone finds this via search.
In my case, I narrowed down the problem clips and tried to find what was in common amongst them. In the end, the only thing in common was that they all used the aac high efficiency codec (AAC-HE) or version 2 of the HE codec. I don’t know why this would cause a problem—or even for sure whether it was the thing causing the problem—but that was most in common amongst them.
I also found that a bunch of the problem clips had 44.1khz sample rates while my project was 48khz. But this wasn’t true of all clips and I had the same glitchy problems from clips that were sampled at 48khz.
I *did* realize once I narrowed down the problem that there were some clues in the audio waveform representation on the timeline … a sort of drop-out was visible, even though it usually caused no audible issue. This wasn’t true universally, but it was much of the time.
So anyway, in the end my strategy for repair became an iterative process something along these lines:
– re-encode the original clip’s audio to aac (not high efficiency) using ffmpeg
– if that didn’t work, upsample any 44.1khz audio to 48khz.
– relink
One of those worked for about half my problem clips. From there, I had to:
– sometimes open the clip in QT and export back out (fixed a missing audio issue in FCPx)
– sometimes open the clip in VLC and do the same (if QT trick didn’t work)
– re-encode both audio and video
Occasionally no matter what I did the new version was a tiny bit shorter than the old and FCPx wouldn’t relink it. Also, sometimes, especially when sample rate changed from 44.1 to 48 I had to mod the segment because the audio shifted position by around 1 frame.
Finally, when all else failed (and it did a few times), I ended up re-encoded the source video to webm/opus and then back to h264/aac. Somehow this seemed to “cleanse” the file, removing whatever had been buried in it that gave FCPx fits. I’m sure I lost quality here, but this was better than the glitchy clicks I got on export.
HTH someone else some day.