PDA

View Full Version : LUA and AVID XML-XSL



Marcus Vasques Osorio
03-08-2010, 08:03 PM
Hi all,

Have got an XSLT to create a LUA from an AVID XML, but can not get it to load into bin:

I have tested with exactly the same result XSLT from one of LUA deanan provided and clips load perfectly??? completely lost: I am new to LUA but not to XSLT, here is the result of the XSLT

clip1 = REDX.clip("/Volumes/Media/REDX/A344_C002_0917BL_001.R3D")
clip1:setInOut(0,40)
a1 = REDX.activate_bin();
a1:addClip(clip1)
clip2 = REDX.clip("/Volumes/Media/REDX/A344_C003_09178K_001.R3D")
clip2:setInOut(2,91)
a2 = REDX.activate_bin();
a2:addClip(clip2)
clip3 = REDX.clip("/Volumes/Media/REDX/A344_C001_0917FU_003.R3D")
clip3:setInOut(53,90)
a3 = REDX.activate_bin();
a3:addClip(clip3)

and here is the original edited file that deanan placed up which works perfectly and imports trimmed clips into REDCINE-X



-- Load a new clip.
clip1 = REDX.clip("/Volumes/Media/REDX/A344_C001_0917FU_003.R3D")


-- first argment is inclusive and the second is exculsive [in, out)
clip1:setInOut(0, 40)

ab = REDX.active_bin();
ab:addClip(clip1)

-- Load a new clip.
clip2 = REDX.clip("/Volumes/Media/REDX/A344_C002_0917BL_001.R3D")


-- first argment is inclusive and the second is exculsive [in, out)
clip2:setInOut(2, 91)

a1 = REDX.active_bin();
a1:addClip(clip2)

clip3 = REDX.clip("/Volumes/Media/REDX/A344_C003_09178K_001.R3D")


clip3:setInOut(53, 90)

a3 = REDX.active_bin();
a3:addClip(clip3)

what am I missing, can anyone else see a spelling or missing code....

have added text files as ZIP too



cheers

Marcus

Zach Gray
03-08-2010, 09:07 PM
Just looking at it... might be a typo?

Deanan is using

a1 = REDX.active_bin()

You are using

a1 = REDX.activate_bin()

.... also, why do you have to keep redeclaring a1, a2.... seems like you could just keep re-using the "ab" variable.

so if

ab = REDX.active_bin()

couldn't you use

ab:addClip(clip3)
ab:addClip(clip4)

... I'm brand new to LUA, just seems like it would work.

Marcus Vasques Osorio
03-08-2010, 10:11 PM
Just looking at it... might be a typo?

Deanan is using

a1 = REDX.active_bin()

You are using

a1 = REDX.activate_bin()

.... also, why do you have to keep redeclaring a1, a2.... seems like you could just keep re-using the "ab" variable.

so if

ab = REDX.active_bin()

couldn't you use

ab:addClip(clip3)
ab:addClip(clip4)

... I'm brand new to LUA, just seems like it would work.

brilliant will test immediately, teach me do script at 3 am :-)

I am sure I can do variable will try later

thanks once again

Marcus

Marcus Vasques Osorio
03-08-2010, 10:13 PM
worked perfectly

Marcus Vasques Osorio
03-08-2010, 10:25 PM
VERY VERY BETA, NOT TO BE USED ON PRODUCTIONS

ok here is the XSLT, it is very basic hope to change this soon

Export from FilmScribe an XML
Via TestXSLT add my XSL
and then XML

Process and it should work...

The path is currently something you need to change manually in the XSL, working on that

Marcus

jamie parry
03-09-2010, 12:43 PM
Hi
its jamie parry here
haven't been here for a while (busy grading)
sooooo does this lua/redcine-x combo let you conform from an AVID decomposed EDL like my app jamfuze so you could

export EDL
get all those shots in redcine-x
do a first pass grade in redcine-x,
export all the shots as separate dnxhd 185X MXF
relink in AVID to original sequence

or is it something I need to write?
it would be written in bash probably so would work on Windows under cygwin (probably)
I have some spare time coming up...
if anyone wants to point me at documentation or anything I can probably do it and get to the pub quicker.
;-)
j

Marcus Vasques Osorio
03-09-2010, 01:29 PM
Hi Jamie, Pub sounds good...

Anyway the scripting part is pretty new right now. Deanan promised more at a later date, personally I think that XML is a easier option when it comes to AVID, lot more metadata and easier to parse

Go ahead and write I was just playing around last night with a XSL, leave the C etc to others

Marcus

jamie parry
03-09-2010, 02:36 PM
Hi Marcus
so the xslt..
transforms the xml from filmscribe into a lua script for redcine-x is that right?
then do you import the lua into redcine-x or what?
I'm really behind on this one!

as for metadata... the only metadata I need in the MXF to do "relinking" for a conform on the Symphony is "tapename" and "timecode". Both those are in EDLs so the rest of it can bugger off for now.
If that info can be somehow be placed in the DNxHD MXF that redcine-x makes from a cut down clip then we should be good to go yes?
I leave the "whole metadata carried through" solution to you Marcus!
j

Marcus Vasques Osorio
03-09-2010, 02:48 PM
Jamie,

XSLT tranforms to LUA which you then add script in REDCINE-X which should find the relavant clips and there in-out points..

I know that the MXF that REDCINE-X exports has both tapename and timecode, needed at least for offline MXF (DNX36) not sure about truncated sequqnce clips? not tested that yet, especially timecode part.

my xslt is very simple but needs work doing on it, lots hard coding so not that flexible yet, also relies on the fact that source material is in original place, or copied to a single folder...

hope to change a few things asap

Marcus