Final Cut Server devices are locations where files are stored. Locations are then set using that device as a relative path within Final Cut Server. For example, if you have a device called MySAN it might end up being /dev/3.
When you import an asset into Final Cut Server, the asset is given an asset ID. For example, you might upload a movie called Rudy.mov that might have an asset with ID number 318 (asset numbers are assigned from Final Cut Server when the asset is imported. But once the asset is imported the location path in the database is then stored relative to the device. So for example, Rudy.mov might be located at /dev/3/dogmovies/Rudy.mov even if the actual file system path is /Volumes/MySAN/dogmovies/Rudy.mov
You can find an assets path pretty easily using the Final Cut Server client. You can also use the fcsvr_client command to retrieve it programatically. To continue with the example, let’s find the path to the file using the
fcsvr_client list_parent_links /asset/318
The output would look similar to:
Proxy(3): /dev/3/dogmovies/Rudy.mov
But if you need the actual file system path then you have a little more work to do. It’s easy enough to then convert /dev/3 to a URI if you set it as a constant. However, this doesn’t allow for future proofing the code. Therefore there is a feature that we put into FCS Transmogrifier ( http://transmogrifier.sourceforge.net ) to look up a file system path based on a deviceID: –getDevicePath. To look up the deviceID of 3 (where that Rudy.mov clip is stored from earlier in the example):
transmogrifier –getDevicePath –deviceID=3
Then you can assemble the device path with the folder name. Or, to make it easier if you’re just looking to get the path to the file, using Transmogrifier you can get that by using the –getAssetPath option:
transmogrifier –getAssetPath –assetID=318
You can also get the assetID based on a files path, (which can be helpful if you’re going to be archiving the file) using the –getAssetID option:
transmogrifier –getAssetID –assetPath=”/Volumes/MySAN/dogmovies/Rudy.mov”
Overall, trading asset paths back and forth based on IDs allows you to call assets from other solutions provided you know the ID.