assistant editor Unix tricks

It’s time to take apart some Final Cut Pro xml and add some newly received VFX clips to the VFX database. One of these days, I’ll explain all of these steps and how they might be useful in other workflows. For now, enjoy a look at a relaxing vacation from graphical user interfaces and mouse-clicks; A trip to the Terminal. If you have any Unix or XML knowledge, there might be something of interest in here.

Assistant-2:20100125 CAB$ xmlstarlet sel -t -m "//children/clip"\
-v "name" -o "," \
-v "out - in" -o "," -v "in" -o "," -v "out" -o ","\
-v "media/video/track/clipitem/start" -o "," \
-v "media/video/track/clipitem/end" -o ","\
-v "media/video/track/clipitem/file/timecode/frame" -o ","\
-v "media/video/track/clipitem/file/name" -o ","\
-v "media/video/track/clipitem/file/timecode/string" -o ","\
-v "media/video/track/clipitem/file/timecode/reel/name"\
-n 20100123_vfx_received.xml | tee 20100123_vfx_received.csv

52A-2_01_VFX_v1,178,0,178,0,178,,52A-2_01_VFX_v1.mov,,
52A-2_02_VFX_v1,141,0,141,0,141,,52A-2_02_VFX_v1.mov,,
52B-2_01_VFX_v1,152,0,152,0,152,,52B-2_01_VFX_v1.mov,,
53-3A_01_VFX_v4,307,0,307,0,307,,53-3A_01_VFX_v4.mov,,
54-3A_01_VFX_v1,188,0,188,0,188,,54-3A_01_VFX_v1.mov,,
C100_C016_0920LS_03_VFX_v1,102,0,102,0,102,,C100_C016_0920LS_03_VFX_v1.mov,,
C102_C011_0903RU_03_VFX_v1,79,0,79,0,79,,C102_C011_0903RU_03_VFX_v1.mov,,
C102_C011_0903RU_04_VFX_v4,256,0,256,0,256,,C102_C011_0903RU_04_VFX_v4.mov,,
C102_C011_0903RU_05_VFX_v2,200,0,200,0,200,,C102_C011_0903RU_05_VFX_v2.mov,,
C102_C011_0903RU_06_VFX_v2,147,0,147,0,147,,C102_C011_0903RU_06_VFX_v2.mov,,

Assistant-2:20100125 CAB$ cd thumbs/
Assistant-2:thumbs CAB$ tcsh
[Assistant-2:additions/20100125/thumbs] CAB% foreach foo (*.png)
foreach? convert -geometry 330x800 "$foo" "$foo:r.jpg"
foreach? rm "$foo"
foreach? end
[Assistant-2:additions/20100125/thumbs] CAB%

The starting point is a bin of clips in an FCP project. I’ve exported that bin as FCP XML, and have also batch exported the clips inside it as stills (to PNG, the default). The commands above are the meat of the process. Then the comma-separated-value list of clips I generate with the xmlstarlet command gets imported into an openoffice (or Excel) spreadsheet (a step I’ve ommitted here), and is massaged into a csv format for import into a Filemaker Pro database of VFX clips. Finally I import the thumbnails for each clip into the database. Fun stuff, pretty much.

Leave a Reply

Subscribe without commenting

del.icio.us:assistant editor Unix tricks digg:assistant editor Unix tricks spurl:assistant editor Unix tricks wists:assistant editor Unix tricks simpy:assistant editor Unix tricks newsvine:assistant editor Unix tricks blinklist:assistant editor Unix tricks furl:assistant editor Unix tricks reddit:assistant editor Unix tricks fark:assistant editor Unix tricks blogmarks:assistant editor Unix tricks Y!:assistant editor Unix tricks smarking:assistant editor Unix tricks magnolia:assistant editor Unix tricks segnalo:assistant editor Unix tricks gifttagging:assistant editor Unix tricks
5 recent posts you may have missed
  1. How to get Microsoft and eBay to pay for 10-percent of your new Canon Rebel T2i DSLR
    2010-03-01 12:38:35
  2. Where Tortillas come from (@ Poquito Mas)
    2010-02-22 13:58:26
  3. This restaurant scares me
    2010-02-21 20:11:28
  4. American Gothic
    2010-02-21 10:00:18
  5. Is the Volvo C30 this decade's AMC Gremlin?
    2010-02-17 00:52:38

Bad Behavior has blocked 283 access attempts in the last 7 days.