Reading Timecode from a QT file?

Find out why the . goes before the /

Moderator: Paul Tuersley

bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

Hey lloyd,

I'm going to have to dig into this one.. OSX treats paths differently depending on whether it's a user folder, mounted volume, etc. and it looks like I missed one.

Thanks for the feedback, I'll post back here once I work it out.

Thanks again,

Dale
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

Hi Llloyd,

Is this one...
Lloyd-G5:~ lloyd$ timecodereader /Untitled/Capture%20Scratch/cam%20test/city-hall

from After Effects?
When I drop a file from an external drive I get /Volumes/ as my first path and get \ file as an escape for spaces instead of %20

like so...

/Volumes/pocketDrive/Green3\ Alpha.mov

I still need to change a few things, but I want to make sure I'm chasing the right thing.

Best,

Dale
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: June 17th, 2004, 9:27 am
Location: New York City, NY
Contact:

nope, AE gives me:

/Untitled/Capture%20Scratch/cam%20test/city-hall

Image


but the terminal gives me what you are getting (which is weird because i could swear yesterday i was getting the above syntax from the terminal):

Image

I am running OS X 10.4.4
bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

Lloyd,

It's that discrepancy I need to account for. Accounting for all the path combinations and screen munging has been challenging in several of these AE/FCP/QT projects.

One workaround, if you need to use this on a working project immediately before I can wrangle paths is to do something like...

(untested)
var pathString = String(thisItem.mainSource.file);
var drive = YourDriveName;
if(pathString.indexOf(drive) != -1){
var mungedPath = "/Volumes" + pathString;
var timecode = system.callSystem("~/bin/timecodereader " + mungedPath );
}else{
var timecode = system.callSystem("~/bin/timecodereader " + String(thisItem.mainSource.file));
}

I did notice your drive name was "Untitled", that might make the above a little less likely to work consistently since it's possible to have an "Untitled" path or file...

All of this is just a workaround until I can get some better path building strings between OS X paths and AE Paths.

Best,

Dale


btw. the "Bus Error" was just bad error handling, I've fixed that part but until I get the correct path handling it just replies "invalid quicktime" instead of crashing.
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
bradshaw1965
Posts: 98
Joined: March 14th, 2006, 2:16 pm
Location: Atlanta, GA
Contact:

Hi All,

I've update timecodereader.zip at:

http://www.creative-workflow-hacks.com/ ... reader.zip

I'm basically checking all mount points and adding /Volumes when appropriate, unfortunately the response is a bit slower if you have disk images or a lot of volumes mounted. If anybody knows anything faster send it my way.

Also. I'm using metadata checks for com.apple.quicktime-movie to check whether the file is a quicktime file. This only works on volumes that are indexed, so it might not work on mounted server volumes. I can add alternative QT detection if anybody finds it useful or necessary.

If anybody can test this new version I'd appreciate it.

Thanks. Dale
Dale Bradshaw
Technology Director | Primal Screen
creative-workflow-hacks.com
Atlanta, GA
Post Reply