Quantum

Downloading from Aspera Server

The CatDV Worker can be used to download  media from an Aspera Server  site.

In order to  do this Aspera Connect needs to be installed to provide the command interface to interact with the Aspera Server,  this can be downloaded from the Aspera Website here .

In this workflow we shall use the worker to download media from an Aspera Server.

Set a Server Query to watch for Aspera download instructions

On the trigger tab of a new worker action, set a Server Query to look for a user field being updated. In this example we are looking for a user field called “Aspera_Download” being changed to “DOWNLOAD”. This user field has been previously created as a Grouping field with “DOWNLOAD” as a value and assigned to  a single media asset to act as a trigger for the download event.

Aspera download eg

Frequency of downloads can be set by specifying the check interval on the parameters tab of the watch action (in this case once an hour)

Aspera-Down_schedule_parameterspng

Tell the worker to publish the original media to the Aspera Server site

Use execute command 2 on the Conversions tab to call our Aspera Upload Batch file  command line:

c:batsCatdv_asperaDOWN.bat

Where c:batsCatdv_asperaDOWN.bat is the path to our Aspera Upload batch script ( or shell script on a Mac )

Please see the bottom section of this document for a full version of the script

Aspera Down_conversions

Example Aspera Download Script

The following script is supplied to illustrate how it is possible to automate the download. The script is free to use and modify but are provided for use at your own risk. Please consult a systems administrator if you are in any doubt about shell / batch scripts. Knowledge of scripting will be needed to adapt these scripts to suit a specific environment or business needs.

This tutorial is focused on Windows   environments but the ASCP command syntax is standard across platforms so the scripts can  be repurposed as shell scripts for OSX.

There are comments in each script to help indicate what each section does and suggestions on where modifications can be made.

Windows Batch script

copy and paste  the  text between the ####### sections into a text file and save it as Catdv_asperaDOWN.bat in a folder called c:bats

alternatively download the file here and rename the extension to .bat   Catdv_asperaDOWN.txt

##################################################################################

REM Example CatDV Aspera server Download Script

REM Usage Call Catdv_asperaDown.bat in the Execute Command 1 Section of the Conversions TAB

REM Triggered By a a server query on user field Aspera_Download = DOWNLOAD

REM at least one file needs to have user field status Aspera_Download = DOWNLOAD in order to trigger the Aspera download watch action this can then be scheduled to control frequency bandwidtyh use etc

REM use Publish section to update user field Aspera_Download = downloaded

REM syntax Path to batch file Variable_1 ( source file path )

REM Eg c:\bats\Catdv_asperaDOWN.bat

REM set the aspera password alternatively this could be supplied as a variable from a user field in catdv

set ASPERA_SCP_PASS=demoaspera

REM call ascp path to the executable -QT disables encryption and -l 100m sets max transfer rate to 100Mbps -P preservers file time stamp 33001 is the aspera control port [email protected]:/Upload is the account to log in to and the upload directory

REM E:\CATDV_sample_media\Aspera_download is the download directory

"C:\Program Files (x86)\Aspera\Aspera Connect\bin\ascp.exe" -QT -l 100m -P 33001 --mode=recv [email protected]:/Upload/sbstest/ E:\CATDV_sample_media\Aspera_download\

REM set the download directory up to be a watch folder to allow the files to be ingested into catdv

REM Scope for further development - supply the aspera login name and PWD from within catdv as user fields so usage would become

REM syntax Path to batch file Variable_1 ( Destination file path ) Variable_2 ( aspera username U16 ) Variable_3 ( aspera PWD U17 ) Variable_3 ( aspera PWD U18 )

REM Eg c:\bats\Catdv_asperaUP.bat c:\aspera_downloads $U16 $U17

REM substituting %3 for demoaspera in the set ASPERA_SCP_PASS string above and %2 for [email protected] to set the aspera user and :/%4 to set the upload path

REM there are also many other options governing the behaviour of the Aspera transfer that could be managed through modification of the batch command syntax either directly or by supplying user fields as variables through the worker

REM syntax help for ascp http://download.asperasoft.com/download/docs/ascp/3.0/html/index.html

##############################################################################