Log in

View Full Version : Fixing very weird frame order, custom IVTC or similar?


DanielSB
12th November 2012, 17:16
Hello :)

I've offered my brother some help in trying to restore a video project that his father-in-law has put together using iMovie on his Mac. I'm gonna give an explanation of why I'm asking my question first, then just the question. Feel free to skip to the end to get to the question if you wish :)

The short version is that the project sometimes previews (never exports) sanely in iMovie (looks like normal footage), sometimes not, "not" meaning that the video looks like it was shot by a cameraman with a very very serious case of the shivers (crackhead without crack). Everything is jumping back and forth.

The father-in-law has of course deleted 99% of the raw video files after "importing" them into iMovie.

Long version is this:

AFAICT, the files that iMovie has converted, has in its library, and has somehow converted *are* damaged. I've tried to play them back on Linux and Windows, but cannot find anything that will play back the "Apple Intermediate Codec", or "icod", that these clips are now encoded in.

The two original clips that actually remain from the source, some Samsung HD camera, are 1080i50 footage. If played back on a vanilla Lion Mac (which is what I was given when the father-in-laws MacBook Pro was handed to me), QuickTime will report that they're "Apple Intermediate Codec" at 720p50. And the video will be all over the place, exactly as with the project that is so messed up. Of course, this isn't true, as an installation of QuickTime 7 reveals. They're actually "Samsung AVC Encoder" codecs, at 1080i50, and look just fine (albeit in need of deinterlacing if to be watched on a progressive display).

So, QuickTime 7 will play back those original files correctly. QuickTime X, the default framework in later Macs, will mess them up completely and obscure the original codec used. This explains what has happened. It also explains why the rest of those files, after having been "imported" by the QuickTime framework, are now very broken and won't play back correctly, even in QuickTime 7 (which doesn't seem to lie (as much?) about codecs as QTX, and doesn't use that "Apple Intermediate Codec" which to me sounds like a frameserver if it were broken?).

Anyway.

There are two options here as I see it to fix this.

1) iMovie seems to be able to partially fix this insane "shakiness" of the video (Final Cut won't), if I take one clip in the library, create a new project with just that clip in it, and export it to h264. It's not 100% okay - there will still be an occasional jerk back and forth, but it's acceptable given the type of project (family/friend footage). I'm assuming someone (not me) could do this for every clip (more than a hundred), replace the broken files with the exported ones, and end up with a project that'd be quadruply encoded (probably five times, as iMovie won't export to DVD, the target) but watchable.

2) Export the broken thing as it is in 1080p, and try to fix it programmatically. There seems to be some kind of "logic" to the destruction of the source files. Using my own limited experience , it's as if it's a pulldown filter wrongfully applied to a 1080i50 native source, then put out to a 720p50 target. I haven't figured out the sequence yet, but I see sequences of duplicating frames, then jumping back 6 or 7 frames, jumping forward again and playing back two or three continuous frames in succession. Having seen that iMovie is capable of producing actual progressive 720p25 content from this mess, I'm assuming all frames are there, their sequence is just messed up beyond belief, and duplicates need to be discarded.

In the case of option 2, are there any plugins that will help me do this?

Thanks in advance,
Daniel

PS: I'm writing this at the end of the day, so I'm calling it a day wishing that tomorrow someone might've answered :) Please don't take a long response wrongfully.