check footage item as sequence

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
tapsystem
Posts: 21
Joined: February 19th, 2013, 2:44 pm

Hi,

a new question :roll:
When i'm working with item in project panel, i need to know if the item is an images sequence or a single image ...
i try to list item to check link and work with it, i need to know which entry are a sequence entry ...

I've try several solution but i can find the good one :

item.duration : give me positive return with image sequence and video file ...
item.mainSource.isStill : give me only the possibility to extract single image but in this case i can't filter video file

... I hope i'm clear in my explanation :oops:

can i retrieve the file type for a video or image (codec, compression, ... or something like) that without use the extension ?

Tks for your help

Mr
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

Did you find a solution for this?

The way I ended up doing it in my pt_OpenSesame script was to try importing it again. item.mainSource.file gives you the first file in a sequence if it's an image sequence, so if you import it again and it's a still (and you already know it isn't a still in your project) then it must be a sequence.

Code: Select all

var importFile = new File(theItem.mainSource.file);
var importOptions = new ImportOptions(importFile);
var theImport = app.project.importFile(importOptions);
if (theImport.mainSource.isStill) alert("it's a still");
else alert("it's a movie");
theImport.remove();
I think I tried other solutions such as testing for sequence range numbering in the name as shown in the project (i.e. just item.name) but this can't be guaranteed as the user may have renamed the footage in the project.

Paul
tapsystem
Posts: 21
Joined: February 19th, 2013, 2:44 pm

Hi,

tks for your feedback, idea is good to check at import time, but my objectif is to work with missing footage ....
so i can't work by testing file importation, because these file don't exist ;o(

Maybe another idea

Tks

Mr
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

You could check for [0001-00xx] type sequence naming in the project item although the user could have renamed it. You could check the extension against a known list of still/seq file formats.

Paul
Alan Eddie
Posts: 30
Joined: January 12th, 2012, 1:36 am
Location: Ireland
Contact:

Can you just perform more specific tests?


if((items instanceof FootageItem) && (items.mainSource instanceof FileSource)
&& (items.mainSource.isStill == 0) && (items.hasVideo == true)&&(items.footageMissing == true)){//do stuff...}
Alan Eddie
_______________________
www.alaneddie.com
3d Animation and VFX
RTE
Dublin
Post Reply