Final Cut Express, crashes with AVCHD & little MacOS X walkthrough

Update: whereas Fincal Cut Express keeps on crashing, it looks like Blender (free open source software) is managing AVCHD files (MTS or else) natively and cleanly. The alternative is there and obviously better than FCE. Time to switch back to open & free.

We mostly use FLOSS (Free Libre Open Source Software) for a reason. But very often, some support for a format forces us to use non-free software, and lastly it was Final Cut Express 4.0 on MacOS X. Well, of course i’m going to tell you about a CRASH. That is something undocumented by Apple, that web searches and forums shows as very frequent, and that Apple seldom documents.

It happens when you’re using FCE4 to import new format for HD video called AVCHD (it’s just MPEG TS with H264 video codec and AC3 audio codec). When you go in the File > Log and Transfer and then drag and drop the video, during playback it CRASHES each time you read the video, reliably. ;-(

Even some companies sell software that do a patch, specifically citing this problem. Their patch ? Convert AVCHD to MPEG/MOV in order to edit it…

Actually, the problem lies in FCE4 which is bad at handling audio codec during the AVCHD playback. You wil have clue about this when looking for solution, one user mentions he unloaded some old audio codecs and got it working; also in the crash reporter you can see this:

Thread 4:
0   libSystem.B.dylib                  0x9fe48817 mach_msg_trap + 7
1   com.apple.CoreFoundation           0x9082d227 CFRunLoopRunSpecific + 2014
2   com.apple.CoreFoundation           0x9082ca42 CFRunLoopRunInMode + 61
3   com.apple.audio.CoreAudio          0×91469356 HALRunLoop::OwnThread(void*) + 158
4   com.apple.audio.CoreAudio          0×91469171 CAPThread::Entry(CAPThread*) + 93
5   libSystem.B.dylib                  0x9fe62d67 _pthread_body + 84

So I got to list the audio/sound related kernel modules:

root# kextstat -l|grep -ri audio
91    5 0x5374e000 0×17000    0×16000    com.apple.iokit.IOAudioFamily (1.6.0b7) <90 37 11>
92    1 0x537cd000 0x4e000    0x4d000    com.apple.driver.AppleFWAudio (2.2.0fc9) <91 80 47 11>
93    0 0x5381b000 0×3000     0×2000     com.apple.driver.AppleMLANAudio (2.2.0fc9) <92 80 47 11>
96    0 0×53883000 0×4000     0×3000     com.apple.driver.AudioIPCDriver (1.0.2) <91 5 4 3 2>
root# kextstat -l|grep -ri sound
181    0 0×40726000 0×4000     0×3000     com.Cycling74.driver.Soundflower (1.2.1) <91 11>

aha!! What is this?

and then I checked the audio drivers I am supporting on the system:

root# ls -al /System/Library/Extensions/ | grep -i sound
drwxr-xr-x     3 root  wheel   102 Jan 16  2007 Soundflower.kext
root# ls -al /System/Library/Extensions/ | grep -i audio
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 Apple02Audio.kext
drwxr-xr-x     3 root  wheel   102 Jul 10  2007 AppleFWAudio.kext
drwxr-xr-x     3 root  wheel   102 Jul 10  2007 AppleMLANAudio.kext
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 AppleOnboardAudio.kext
drwxr-xr-x     3 root  wheel   102 Jul 10  2007 AppleUSBAudio.kext
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 AudioDeviceTreeUpdater.kext
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 AudioIPCDriver.kext
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 IOAudioFamily.kext
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 SM56KUSBAudioFamily.kext
drwxr-xr-x     3 root  wheel   102 Jun 28  2007 VirtualAudioDriver.kext

and then unloaded the Soundflower audio extension:

root# kextunload /System/Library/Extensions/Soundflower.kext
kextunload: unload kext /System/Library/Extensions/Soundflower.kext succeeded

(you may have to quit any program using the sound subsytem in order to succeed in kernel extension unloading).

And then FCE4 started to load AVCHD properly, not crashing each time you read the AVCHD footage, but only from time to time… I suggest apple fix their “com.apple.AVCHDPlugin”. #applefail

Out of this nightmare, no patch possible, because FCE4 is not opensource. Let’s hope someone will integrate that quickly in the supported codecs for a FLOSS video editing platform :)

About admin