Q: Archiving in H264 while keeping folders/file creation date
*Hi, I just wanted to share with you a script that helps to convert the content of the FCP "capture scratch" folder into H264, to move the converted files into a Device, put the h264 files in the correct client folder.*
*Into this client folder, it creates folders with the original production name, while it keeps the original creation file date.*
*So it keeps the original folder hierarchy and date for my archives, because to browse with the final cut server client is great, but sometimes you just want navigate in your file system to work with your videos.*
*STEP 1* : Original Assets Cataloging (production scan)
I have a Scheduled Production scan of my "capture scratch",
(Capture scratch is on our SAN, so all Edit suites are capturing in the same "capture scratch" folder)
*STEP 2*: Detect to which client the asset belongs to (thanks to the location name) and set the proper [Owner ]metadata asset
NB: for that I ask all editors to put the name of the client at the beginning of the name of their FCP projects. ex CBS_snow in paris.fcp
I have Subscriptions that filters created assets location to see if the location "begins with" the client name, then give a "response" that set the correct [Owner] metadata, and also change the "statut" to "WAITINGFORENCODE" (you have to create it into Lookup/Status)
So I have as many Subscriptions/Reponse as actual Clients
*STEP 3 :* I have a subscription that filters Modified Assets that have a status of "WAITINGFORENCODE"
then gives 3 responses.
+Response 1:+ Set Asset Metadate Status to "ENCODING" ( yeah, Status are made for collaborating tags.. but here we are...)
+Response 2:+ Copy in H264 (that's where Matrox is great!) into a "transcode folder"
+Response 3+ (the tough one): Copy the transcoded asset to the right archive location and keep original creation date, create an asset and put it in the same production as the original, and set the original Asset Metatadata Status as "ENCODED"
Run Script
Command Path: //path to the script.
In the command parameters you'll need to enter: [File name] [Location] [Owner] [Asset ID]
So here is the Script. It's a LOT inspired from Andy Sykes http://fcsvoodoo.blogspot.com/2009/07/add-newly-created-asset-to-originating.htm l
A big thank to him for publishing it.
#!/bin/bash
FILENAME=$1
PLACE=$2
CLIENT=$3
IDFILE=$4
FILENAME_ESCAPED=$(echo -n "$FILENAME" | \
perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg');
LOCATION_ESCAPED=$(echo -n "$PLACE" | \
perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg');
# Set the location to the fcsvr_client binary
PATH_TO_BINARIES="/Library/Application Support/Final Cut Server/Final Cut Server.bundle/Contents/MacOS/fcsvr_client"
# Set the location of the Archives NAS Client Folder
PATH_TO_TARGET="//Volumes/NASARCHIVES/""$CLIENT""/Footages"
# Set the location of the Transcoding folder
PATH_TO_TRANSCODE="//Volumes/EditSAN/Transcode"
# Set the location of the Original File folder
PATH_TO_ORIGINAL="//Volumes/EditSAN/Capture Scratch/"
# Make a folder and move the file in it
mkdir "$PATH_TO_TARGET""$PLACE"
mv "$PATH_TO_TRANSCODE"/"$FILENAME" "$PATH_TO_TARGET""$PLACE"/
#Set Copied File and Folder Date from original
ORIGDATE=$(GetFileInfo -d "$PATH_TO_ORIGINAL""$PLACE"/"$FILENAME")
ORIGDATEFOLDER=$(GetFileInfo -d "$PATH_TO_ORIGINAL""$PLACE")
echo $ORIGDATE
echo $ORIGDATEFOLDER
Setfile -d "$ORIGDATE" "$PATH_TO_TARGET""$PLACE"/"$FILENAME"
Setfile -d "$ORIGDATEFOLDER" "$PATH_TO_TARGET""$PLACE"
# Determine original Production "address" by searching for the "location" (since this is the same as the Production name)
PROJECTNAME=$("$PATH_TO_BINARIES" search --crit "$PLACE" /project | grep -i -o -e "/project/[0-9]*")
echo $PROJECTNAME
# Create asset and associate it with the project
OUTPUT=$(sudo "$PATH_TO_BINARIES" createasset pa_asset_actua --projaddr $PROJECTNAME /dev/11/"$CLIENT""/Footages""$LOCATION_ESCAPED"/"$FILENAME_ESCAPED" CUST_ASSET_STATUS="INRAID6")
echo $OUTPUT
# Change Original metada asset status
SETMETA=$(sudo "$PATH_TO_BINARIES" setmd /asset/$IDFILE CUST_ASSET_STATUS="TRANSCODED")
echo $SETMETA
________________
Weekness of the script is when you're converting non .MOV files (or different extension in the H264 copy than the original), I could not figure out how Andy Skypes managed with the extensions in his script, so I just pass it.
Now it's working like a charm after I had a lot of Issues due to the escape characters, but thanks the the perl command ,it's good now. But you will still need to ask editors to avoid / and & and () in file names...
Well, I just make it work yesterday, so now I breath cause I couldn't figure out if investing if FCS would be more a sufferance than a relieve because lot of people saying that you have to totally rethink the way you work with assets, and forget about your folder hierarchy...but this, I couldn't hear It, especially when I saw the mess that was about to happen with thousands of P2 clips.
My conclusion would be: Metadatata is great, but folder hierarchy can save you if you loose your DB or want to migrate ...
au revoir.
*Into this client folder, it creates folders with the original production name, while it keeps the original creation file date.*
*So it keeps the original folder hierarchy and date for my archives, because to browse with the final cut server client is great, but sometimes you just want navigate in your file system to work with your videos.*
*STEP 1* : Original Assets Cataloging (production scan)
I have a Scheduled Production scan of my "capture scratch",
(Capture scratch is on our SAN, so all Edit suites are capturing in the same "capture scratch" folder)
*STEP 2*: Detect to which client the asset belongs to (thanks to the location name) and set the proper [Owner ]metadata asset
NB: for that I ask all editors to put the name of the client at the beginning of the name of their FCP projects. ex CBS_snow in paris.fcp
I have Subscriptions that filters created assets location to see if the location "begins with" the client name, then give a "response" that set the correct [Owner] metadata, and also change the "statut" to "WAITINGFORENCODE" (you have to create it into Lookup/Status)
So I have as many Subscriptions/Reponse as actual Clients
*STEP 3 :* I have a subscription that filters Modified Assets that have a status of "WAITINGFORENCODE"
then gives 3 responses.
+Response 1:+ Set Asset Metadate Status to "ENCODING" ( yeah, Status are made for collaborating tags.. but here we are...)
+Response 2:+ Copy in H264 (that's where Matrox is great!) into a "transcode folder"
+Response 3+ (the tough one): Copy the transcoded asset to the right archive location and keep original creation date, create an asset and put it in the same production as the original, and set the original Asset Metatadata Status as "ENCODED"
Run Script
Command Path: //path to the script.
In the command parameters you'll need to enter: [File name] [Location] [Owner] [Asset ID]
So here is the Script. It's a LOT inspired from Andy Sykes http://fcsvoodoo.blogspot.com/2009/07/add-newly-created-asset-to-originating.htm l
A big thank to him for publishing it.
#!/bin/bash
FILENAME=$1
PLACE=$2
CLIENT=$3
IDFILE=$4
FILENAME_ESCAPED=$(echo -n "$FILENAME" | \
perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg');
LOCATION_ESCAPED=$(echo -n "$PLACE" | \
perl -pe's/([^-_.~A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg');
# Set the location to the fcsvr_client binary
PATH_TO_BINARIES="/Library/Application Support/Final Cut Server/Final Cut Server.bundle/Contents/MacOS/fcsvr_client"
# Set the location of the Archives NAS Client Folder
PATH_TO_TARGET="//Volumes/NASARCHIVES/""$CLIENT""/Footages"
# Set the location of the Transcoding folder
PATH_TO_TRANSCODE="//Volumes/EditSAN/Transcode"
# Set the location of the Original File folder
PATH_TO_ORIGINAL="//Volumes/EditSAN/Capture Scratch/"
# Make a folder and move the file in it
mkdir "$PATH_TO_TARGET""$PLACE"
mv "$PATH_TO_TRANSCODE"/"$FILENAME" "$PATH_TO_TARGET""$PLACE"/
#Set Copied File and Folder Date from original
ORIGDATE=$(GetFileInfo -d "$PATH_TO_ORIGINAL""$PLACE"/"$FILENAME")
ORIGDATEFOLDER=$(GetFileInfo -d "$PATH_TO_ORIGINAL""$PLACE")
echo $ORIGDATE
echo $ORIGDATEFOLDER
Setfile -d "$ORIGDATE" "$PATH_TO_TARGET""$PLACE"/"$FILENAME"
Setfile -d "$ORIGDATEFOLDER" "$PATH_TO_TARGET""$PLACE"
# Determine original Production "address" by searching for the "location" (since this is the same as the Production name)
PROJECTNAME=$("$PATH_TO_BINARIES" search --crit "$PLACE" /project | grep -i -o -e "/project/[0-9]*")
echo $PROJECTNAME
# Create asset and associate it with the project
OUTPUT=$(sudo "$PATH_TO_BINARIES" createasset pa_asset_actua --projaddr $PROJECTNAME /dev/11/"$CLIENT""/Footages""$LOCATION_ESCAPED"/"$FILENAME_ESCAPED" CUST_ASSET_STATUS="INRAID6")
echo $OUTPUT
# Change Original metada asset status
SETMETA=$(sudo "$PATH_TO_BINARIES" setmd /asset/$IDFILE CUST_ASSET_STATUS="TRANSCODED")
echo $SETMETA
________________
Weekness of the script is when you're converting non .MOV files (or different extension in the H264 copy than the original), I could not figure out how Andy Skypes managed with the extensions in his script, so I just pass it.
Now it's working like a charm after I had a lot of Issues due to the escape characters, but thanks the the perl command ,it's good now. But you will still need to ask editors to avoid / and & and () in file names...
Well, I just make it work yesterday, so now I breath cause I couldn't figure out if investing if FCS would be more a sufferance than a relieve because lot of people saying that you have to totally rethink the way you work with assets, and forget about your folder hierarchy...but this, I couldn't hear It, especially when I saw the mess that was about to happen with thousands of P2 clips.
My conclusion would be: Metadatata is great, but folder hierarchy can save you if you loose your DB or want to migrate ...
au revoir.
Mac OS X (10.5.8), Final cut server
Posted on Jan 22, 2011 3:33 AM