David Heidelberger
Forum Replies Created
-
Thanks, Dan! I didn’t realize you could trap errors in AE expressions, very cool.
-
Don’t have it yet, but in scouring as much material as I could find online, I just saw this Apple support doc. Sounds like that might be what you’re seeing.
– David
-
[Gary Hazen] “I’m fairly certain that the world isn’t coming to end between now and then.”
I don’t know about that. I did see someone in the subway a few days ago with a sign saying that the world was ending, I forget the exact date, but sometime in May. My first thought genuinely was, “But that’s before FCP X comes out!” So maybe it’s good to get all our speculating in now!
-
Hi Chris,
What version of AE are you using? I’ve been working on a program that may help with this. I just added you as a cow-friend. Message me and we can discuss it.
– David
-
David Heidelberger
March 18, 2011 at 8:32 pm in reply to: QT calculation – Converting frames to milliseconds, coding questionI don’t know if there’s a Quicktime developer forum, but there’s definitely a mailing list.
Have you looked at the TimeScale property? I’m certainly not an expert on it, but I’m pretty sure Quicktime uses that to calculate times, and I know it can often be inadvertently set to something that doesn’t really make sense based on the actual frame rate.
– David
-
David Heidelberger
December 2, 2010 at 6:22 pm in reply to: Tracking down timecode from exported stillsHi Brent,
If you have After Effects CS3 or later, there is a way to automate this using expressions. You need CS3 because it uses a command that wasn’t available before that version. The catch is that there’s a lengthy processing step involved (on my i7 Macbook Pro, it takes about 50 seconds for every 30 seconds of footage it had to search). But if you’re still interested, read on:
- In After Effects, bring in your still and a Quicktime movie of the entire sequence.
- Drop the Quicktime movie into a new comp.
- Drop the still on top of the Quicktime movie, making sure that its duration is the entire length of the comp.
- Right click on the still image and set its blending mode to Difference. This subtracts one image from the other. If the two images are the same, it will create a black image. If they’re different, it will create an image that’s not black. We’ll leverage this a little later.
- Highlight both layers and Precomp them (Layer Menu>Precompose). Just click OK on the dialogue box that comes up.
- Now, you should have a comp that just has the nested precomp. First, we need to add an effect to this precomp.
- With the precomp highlighted, go to Effect>Stylize>Mosaic
- In the effect controls palette, set the number of horizontal and vertical blocks to 1. What you’re essentially doing is taking the average color of the frame (which for every frame except your match should be something other than black).
- Now, with the layer still highlighted, go to Effect>Expression Controls>Slider Control
- In the comp timeline, twirl down the layer controls until you can see the slider control. This is very important, you need to highlight it and press enter to rename it. You must rename it to ColorValue (capitalization matters), otherwise things won’t work.
- Now, twirl down your ColorValue effect so that you can see the stopwatch, Option-click on the stopwatch to create an expression for this effect. Then paste the following into that expression:
avgColor = sampleImage([0,0], [.5,.5] , postEffect = true);
avgBright = rgbToHsl(avgColor)[2];
avgBright;
After Effects is looking at the color of the top left pixel (doesn’t matter which one since they’re all the same now), and getting the brightness of that pixel (a number between 0 and 1) and assigning the slider to be that value. For the frame that matches your still, the slider should be at or very near 0. Now we just need to automate the search for that frame.
- The first step towards that is to highlight the slider in the ColorValue effect and go to Animation>Keyframe Assistant>Convert Expression to Keyframes. This is the step that will take a long time, and unfortunately, After Effects will stop doing the step if you navigate away from the app. So you just need to wait. In the Info palette, there should be a little status update that says “Evaluating frame xxxx of xxxx” so you can know what sort of progress you’re making. This conversion to keyframes step is necessary because if you just used the expression in the next step, it would take so long to process that After Effects will think your expression has frozen and disable it. Convert to Keyframes works around that issue.
- When the keyframe conversion is done, highlight your layer once again and add another slider by going to Effect>Expression Controls>Slider Control. Add the following expression:
minColor = 1;
myFrame = 0;
for (i = 0; i <= thisComp.duration; i+=thisComp.frameDuration)
{
avgBright = effect("ColorValue")("Slider").valueAtTime(i);
if (avgBright < minColor)
{
myFrame = timeToFrames(t = i - thisLayer.startTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
minColor = avgBright;
}
}
myFrame;
- That’s it. When you click somewhere outside of the expression, a number should show up very quickly in the slider. That should be the frame number of your freeze frame.
Unfortunately, you’ll have to repeat all of these steps for each of your stills. It’s also worth noting that if you know approximately where your still is from, you can trim the precomp layer to just that area before doing the convert to keyframes step. Then it will only evaluate that area. Everything else should still all work and give you the appropriate frame number.
Hope that’s helpful,
– David -
David Heidelberger
November 22, 2010 at 7:47 am in reply to: Altering timecode for multiple clips…can it be done all at once?Hi Michael,
There’s a program on my website that batch adds AUX TC to clips based on a constant offset from the main TC track. Look for the Multiclip Offsetter.
If you have two cameras, for example, and one was off by three frames, you would put the first camera through the program and set the offset to 0. That would add AUX TC that matches your regular TC. Then put the second camera through with an offset of 3 (or -3, depending on which direction the offset is), and then you’d have two matching AUX TC tracks and can multiclip based on AUX TC. Of course, if the cameras drift over the course of the day, you’ll still have issues, but at least this gets you part of the way.
– David
-
Hi Matt,
I have a program on my website that should automate the process for you. It’s the Clip Labeler program. Hope that helps.
– David
-
Hi Charlie,
I had a similar issue, where after bringing some clips into After Effects, the whole FCP project flashed offline, although I think it automatically reconnected, can’t remember. Anyway, I’m pretty sure, although not positive, that the issue has something to do with a setting in After Effects called “Write XMP IDs to Files on Import.” Since that’s presumably modifying the files (I remember that it changed the date modified property of the files), I think that was causing Final Cut to hiccup. You can disable that setting in the After Effects preferences under “Media and Disk Cache.”
– David
-
Final Cut will lose the path information if your PA’s media drive doesn’t have the same name and folder structure as your media drive. If you clone your drive and be sure the clone has the same name, your PA should be fine.
If that’s totally impossible, there’s probably a workaround, involving some manual work and using find & replace in the actual XML file. Depending on how spread out your media is, that might be faster than reconnecting everything by hand.
– David