Sample Scripts
Archive previews of RAW files on Mac OS X
You'll need to create the containing folder and make the script executable for root (chmod 755).
Configure the Preview Generation page of the archive plan to call the script – as shown in the screenshot.
You call the script with:
/your/path/mkthumb_RAW.sh -resolution 512 -rotation 0
Enter the file extensions you want to process using the script.
Note that the rotation and resolution are set as parameters to the script.
Rotation:
The given rotation of 0 will be correct for “landscape” oriented photographs only. The RAW files the customer inputs will have different orientations recorded in an EXIF field depending on how the camera was held when each photograph was taken. To have the previews also rotated correctly would require a more complex script that reads the required EXIF value from the image and performs a rotation accordingly on the JPEG we generate.
This page provides information on how to do this, this is outside of the scope of what we can do for you at the moment.
http://stbison.posterous.com/mac-os-xsips-mac-dev-center-shell-scripting-p
Author: JPY Support
Archive previews of image files on Mac OS X or Linux using ImageMagick:
Script for download
The script requires an installed Imagemagic. It can be used similar to the above example. See the script itself for calling syntax and supported formats.
Archive previews of movie files on Mac OS X or Linux using ImageMagick:
Script for download
The script requires an installed ffmpeg video convertor. It can be used similar to the above example. See the script itself for calling syntax and supported formats.
Import metadata into metadata fields of P4 Archive
Starting with version 4.2 you can specify a script for metadata to be imported into the metadata fields of the archive index. That means searching will be extended to cover the metadata imported. For each Archive Plan one or more scripts can be used, each specifying which attributes to import according to expression or extension.
1. The target fields have to be created first in P4 Archive. To do so, go to:
“Advanced Options/Manage Indexes/Default-Archive”
Edit fields for internal name as well as Application name according to your needs.
The ”+” Button will add the field to the list.
The example script needs the fields specified in the last line of the script.
2. In the Archive Plan go to:
“Metadata Import”
in the popup menu on the top left
3. Choose:
“New”
Specify your expression in the Enter field (e.g. *.jpg to import metadata of all JPEG files)
4. Enter path to your script (e.g. /Users/admin/myscript.sh). If you copy the example script please pay attention to invisible characters that might compromise functionality.
5. Enter timeout value (at least 30 seconds) and press “Apply”.
6. Archive at least one file (that has the specified metadata) and got to Restore/Restore from Archive
Doubleclick on the file to open media view with metadata fields.
Additional information can be entered and stored in the index by choosing “update”
Autor: JPY Support
Transcoding previews in archive index
Starting with version 4.2 you can specify a script for metadata to be imported into the metadata fields of the archive index. That means searching will be extended to cover the metadata imported. For each Archive Plan one or more scripts can be used, each specifying which attributes to import according to expression or extension.
When archiving e.g. HD video changing resolution and codec of the preview file can create a smaller archive index.
This example uses qt_tools to demonstrate the process. Of course other tools like Compressor or Episode can also be used.
The result of this example is generation of H.264 and AAC ISO MPEG-4 files (.mp4, mp4a). In the scripts the length of the preview is set to 120sec but can be changed there. The preview files will temporarily be stored at /PresSTORE_Proxies/output P4 picks them up from there and deletes them afterwords.
1. Install qt-tools http://omino.com/sw/qt_tools/
2. Put PresSTORE_Proxies.zip in root directory (/) and un-zip
3. Put the files in /usr/local/bin (if there is no bin directory create one: mkdir bin)
4. In P4 Archive got to Archive-Plan/Preview Generation enter scripts as follows:
– For Audio files (.AIF etc): /usr/local/bin/PresSTORE_Proxies/scripts/audio.sh
– For Video files ( .mov): /usr/local/bin/PresSTORE_Proxies/scripts/video.sh
Set timeout value to at least 120 sec or above the time needed to transcode one asset.
Author: Ron Pfister, Halimedia
Script for download
This script uses the CLI of PresSTORE to output the list of volumes to standard CSV format.
Author: Sven Koester, Archiware
Script for download
Extend Final Cut Server functionality and connect to P4 Archive
Transmogrifier is a Python framework and Command Line program created to provide programatic access to Apple's Final Cut Server digital asset management system.
It provides a number of facilities for interacting with Final Cut Server. Read more.
Author: 318





