Getting Embedded timecode from Clip by script
Hi folks
I'm hitting a wall here and I was hoping someone could help.
I'm trying to export a simple text-file of the in- and out-point of a clip used in a composition. BUT I need that in- and out-point to be using the sources embedded timecode, which starts and something like frame 22000.
So while the in-and-out of the layer/clip in the composition is 200-500, what I need saved out is 22200-22500. I can see that AfterEffects can read the meta-data since it shows the embedded timecode in the project-item view and in the footage view.
But I can't figure out how to get the info by scripting in extendscript.
I've gotten this far that I got the in-out of the selected layer in the active composition, and I can find the source of the footage, so all I really need is the start frame of the embedded timecode from the source. Writing and saving out a file is not a problem either, even though its not in the current script.
Heres an example of the script, run from Extend Script ToolKit:
function Run(){
var cur_comp = app.project.activeItem;
var cur_layer = cur_comp.selectedLayers[0];
$.write(cur_layer.name + "\n");
cur_in = cur_layer.inPoint;
cur_out = cur_layer.outPoint;
$.write("IN: " + cur_in + "-OUT: " + cur_out + "\n");
var cur_source = cur_layer.source;
full_duration = cur_source.duration;
$.write(cur_source);
return cur_source
}
So if anyone can help me here it would be much appriciated 🙂
