Activity › Forums › Adobe After Effects › Export list of assets with frame size
-
Export list of assets with frame size
Posted by Xavier Paredes on August 17, 2018 at 8:12 pmI have a job in which I was supplied with about 300 AVIs. I need to somehow generate a simple list of assets with just the file name and the frame size of each original file. I have not—nor do I need to—place the videos in comps as I’m only using AE hoping I can somehow generate this list with it.
Ideally, I’d like to import this list into Excel so hopefully, a tab-delimited text file would be great.
What I tried so far:
– Export FCP XML: Gives me too much garbage I don’t need
– Adobe Bridge: Doesn’t seem to have any function to do this despite that fact that I can see the frame size in List View.
– After Effects: I can’t see this function anywhere.I’m hoping that perhaps there’s a script somewhere that I can use in AE to do what I need.
If neither of the above-mentioned apps can do this can someone recommend one that can?
Any quick replies will be appreciated as this is sort of a rush job.
Thanks!
Xavier
Xavier Paredes replied 3 years, 8 months ago 3 Members · 11 Replies -
11 Replies
-
Walter Soyka
August 17, 2018 at 9:11 pmHere’s a quick and dirty script that will present the name, width and height of every item in an After Effects project in a dialog box with editable text (which you can copy and paste directly into Excel). It does no error checking, so if you have items without width and height, it will fail with an error.
Save this snippet with a text editor as a .jsx file and run it from Ae.
// quick script to yield names and frame sizes for every item in a project{
var namesAndFrameSizes = "";for (var i = 1; i < app.project.numItems; i++) {
namesAndFrameSizes += app.project.item(i).name + "\t" + app.project.item(i).width + "\t" + app.project.item(i).height + "\n";
}alertScroll("Names and Frame Sizes", namesAndFrameSizes);
}function alertScroll (title, input) // string, string/array
{
// if input is an array, convert it to a string
if (input instanceof Array)
input = input.join("\r");
var w = new Window("dialog", title);
var list = w.add("edittext", undefined, input, {multiline: true, scrolling: true});
// the list should not be bigger than the maximum possible height of the window
list.maximumSize.height = w.maximumSize.height - 100;
list.minimumSize.width = 600;
w.add("button", undefined, "Close", {name: "ok"});
w.show();
}Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Xavier Paredes
August 17, 2018 at 11:21 pmHi Walter,
Amazing! Thanks so much. By any chance is it possible to have the script also print the duration? If it’s too much trouble don’t worry about it. The most important was to be able to have the frame sizes.
Thanks!
– XavierXavier
-
Walter Soyka
August 20, 2018 at 5:32 pmThis version adds frame rate and duration:
// quick script to yield names and frame sizes, frame rates, and durations for every item in a project{
var projectTimeDisplayType = app.project.timeDisplayType;
app.project.timeDisplayType = TimeDisplayType.TIMECODE;
var namesAndFrameSizes = "Name\tWidth\tHeight\tFrame Rate\tDuration\n";for (var i = 1; i < app.project.numItems; i++) {
var asset = app.project.item(i);
var frameRate = parseFloat(1/asset.frameDuration).toFixed(2);
namesAndFrameSizes += asset.name + "\t" + asset.width + "\t" + asset.height + "\t" +
frameRate + "\t" +timeToCurrentFormat(asset.duration, frameRate, true) + "\n";
}
app.project.timeDisplayType = projectTimeDisplayType;
alertScroll("Names and Frame Sizes", namesAndFrameSizes);
}function alertScroll (title, input) // string, string/array
{
// if input is an array, convert it to a string
if (input instanceof Array)
input = input.join("\r");
var w = new Window("dialog", title);
var list = w.add("edittext", undefined, input, {multiline: true, scrolling: true});
// the list should not be bigger than the maximum possible height of the window
list.maximumSize.height = w.maximumSize.height - 100;
list.minimumSize.width = 600;
w.add("button", undefined, "Close", {name: "ok"});
w.show();
}Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Xavier Paredes
August 20, 2018 at 10:36 pm -
Walter Soyka
August 21, 2018 at 12:45 amI imagine you had a folder in the list?
This version should be more robust and yield a little more information. I’ve also fixed a bug where the last item in the list wasn’t displayed.
// quick script to yield tab-separated name, type, width, height, frame rate, and duration for every item in a project{
var projectTimeDisplayType = app.project.timeDisplayType;
app.project.timeDisplayType = TimeDisplayType.TIMECODE;
var namesAndFrameSizes = "Name\tType\tWidth\tHeight\tFrame Rate\tDuration\n";for (var i = 1; i <= app.project.numItems; i++) {
var asset = new Object;
asset.name = app.project.item(i).name;
asset.typeName = app.project.item(i).typeName;
asset.width = (isNaN(parseInt(app.project.item(i).width))) ? "-" : parseInt(app.project.item(i).width);
asset.height = (isNaN(parseInt(app.project.item(i).height))) ? "-" : parseInt(app.project.item(i).height);
asset.frameRate = (isNaN(parseFloat(app.project.item(i).frameDuration))) ? "-" : parseFloat(1/app.project.item(i).frameDuration).toFixed(2);
asset.durationTimeCode = (isNaN(asset.frameRate)) ? "-" : timeToCurrentFormat(app.project.item(i).duration, asset.frameRate, true);
namesAndFrameSizes += asset.name + "\t" + asset.typeName + "\t" + asset.width + "\t" + asset.height + "\t" + asset.frameRate + "\t" +asset.durationTimeCode + "\n";
}
app.project.timeDisplayType = projectTimeDisplayType;
alertScroll("Names and Frame Sizes", namesAndFrameSizes);
}function alertScroll (title, input) // string, string/array
{
// if input is an array, convert it to a string
if (input instanceof Array)
input = input.join("\r");
var w = new Window("dialog", title);
var list = w.add("edittext", undefined, input, {multiline: true, scrolling: true});
// the list should not be bigger than the maximum possible height of the window
list.maximumSize.height = w.maximumSize.height - 100;
list.minimumSize.width = 600;
w.add("button", undefined, "Close", {name: "ok"});
w.show();
}Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn] -
Xavier Paredes
August 21, 2018 at 1:17 amHi Walter,
That worked perfectly! You saved me several hours of work. I don’t know how to thank you enough!
– Xavier
Xavier
-
Vivien Lemaignan
August 23, 2022 at 12:32 pmHi Walter,
I’m taking the opportunity to bring up this post because it’s while searching for a script that I came across it
For my needs, I am looking for a script that could allow me to create a list (excel or other) of the exact names of the media present in a composition.
We used a lot of low resolution images for animation and I now need to ask for high resolution images with the exact names of the sources that are present in the composition
Having the information of the dimensions of each image is a plus but not obligatory.
The only difference with your script is that I would like to be able to select the composition and run the script 🙂
Do you think this is possible ?
Thank you in advance for your help
Best
Macviv
-
Walter Soyka
August 23, 2022 at 6:43 pmHi there!
Yes, this is totally doable, but I’m a bit busy today. If this is something that you need right away, here’s what you can do now:
1. Save a backup copy of your AEP file, just in case. (Save, followed by Save and Increment is perfect for this.)
2. Select the composition that you want the report for in the project panel.
3. Select File > Dependencies > Reduce Project. (This will eliminate everything in the project panel except for your selection and any items referenced by your selection.)
4. Run the script to get the list of assets, type, width, height, frame rate, and duration. Copy the list out of the dialog.
5. Undo the Reduce Project to get everything back.
-
Vivien Lemaignan
August 24, 2022 at 8:13 amHi Walter,
Thank you very much for your feedback.
I tested the script with the reduction of the project on the composition and it works well. For my needs I removed some info from the script that I didn’t need.
// quick script to yield tab-separated name, type, width, height, frame rate, and duration for every item in a project
{
var projectTimeDisplayType = app.project.timeDisplayType;
app.project.timeDisplayType = TimeDisplayType.TIMECODE;
var namesAndFrameSizes = "Name\tType\tWidth\tHeight\tFrame Rate\tDuration\n";
for (var i = 1; i <= app.project.numItems; i++) {
var asset = new Object;
asset.name = app.project.item(i).name;
asset.typeName = app.project.item(i).typeName;
namesAndFrameSizes += asset.name + "\n";
}
app.project.timeDisplayType = projectTimeDisplayType;
alertScroll("Names and Frame Sizes", namesAndFrameSizes);
}
function alertScroll (title, input) // string, string/array { // if input is an array, convert it to a string if (input instanceof Array) input = input.join("\r"); var w = new Window("dialog", title); var list = w.add("edittext", undefined, input, {multiline: true, scrolling: true}); // the list should not be bigger than the maximum possible height of the window list.maximumSize.height = w.maximumSize.height - 100; list.minimumSize.width = 600; w.add("button", undefined, "Close", {name: "ok"}); w.show(); }My only small (really small) concern is that my project is quite heavy because there is a lot of composition and reduce and then cancel it takes time…if you know how I could add a line in the script to tell it to focus on the selected or open composition I am interested 🙂
thanks again for your help
Best
Vivien
-
Walter Soyka
August 24, 2022 at 6:14 pmI understand, and I can help. But it’s not just a quick line in the script — we have to step through the open composition (or all selected compositions), and also any precomps that they use, recursively, looking for footage items. It’s not hard, it’s just going to be a day or two before I can dedicate the time to it.
Reply to this Discussion! Login or Sign Up
