Adding Setting Actions

Compressor can send an email to one recipient per applied preset setting, giving notice of when a transcode is complete. You can also add one AppleScript script per applied setting. This gives you some post-transcoding options for your output media file, such as creating a script in AppleScript for adding metadata to a QuickTime file, or creating a watched folder and having the transcoding process start automatically whenever new source media files are dropped into the folder.

You apply script actions with the Actions pane in the Inspector.

About the Actions Pane

You can use the Actions pane in the Inspector to set options related to transcode completion notification emails, post-transcoding AppleScript options, and default destinations.

Figure. Actions pane in the Inspector window.

The Actions pane contains the following items.

  • Email Notification to: If you want to be notified when a particular transcoding job has been completed, select this checkbox and enter the appropriate email address in the text field. (You can enter only one email address.) This is useful if you are transcoding an especially large source media file that may take many hours to complete. Rather than continuously checking to see if the transcoding is finished, you just wait until you receive an email.

    Note: To enable this email feature, you must first enter an email address and outgoing mail server in Compressor preferences. (Choose Compressor > Preferences.)

  • Execute AppleScript on output: Select this checkbox to activate a chosen script. Even if you have chosen a script, it will not run unless you have selected this checkbox.
  • Choose button: Click this button to select an existing script that you want to assign to the output file. Adding a script is a useful way of applying post-transcoding actions to your job, such as adding metadata to QuickTime files or adding interactive QuickTime elements.

How to Add Setting Actions

You use the Actions pane in the Inspector window to set post-transcoding options for your output media file, such as sending an email, adding metadata to QuickTime files, or transferring the transcoded file to a streaming web server or to DVD Studio Pro.

To add an email notification to your setting
  1. Open the Settings tab, or open a batch with a job that has a setting applied to it.

  2. Select the setting in the Settings tab that you want to modify.

    This must be a custom setting, because Apple settings are read-only. (Or you can select a setting already applied to a source media file in the Batch window.)

  3. Click the Actions tab in the Inspector.

  4. Select the “Email Notification to” checkbox and enter the relevant email address in the accompanying field.

Note: To enable this email feature, you must first enter an email address and outgoing mail server in Compressor preferences. (Choose Compressor > Preferences.)

To add a script to your setting
  1. Open the Settings tab.

  2. Select the setting in the Settings tab that you want to modify.

    This must be a custom setting, because Apple settings are read-only. (Or you can select a setting already applied to a source media file in the Batch window.)

  3. Click the Actions tab in the Inspector.

    Figure. Actions pane in the Inspector window.
  4. Click the Choose button.

    The File Selection dialog appears.

  5. Navigate to the relevant AppleScript file and click Open.

    Figure. File Selection dialog.

    The path to the AppleScript file appears below the Choose button. Make sure the checkbox is selected; otherwise, the script won’t be applied to the setting.

    Figure. Choose button and path to the AppleScript file.

See About the Actions Pane for more details.

Using AppleScript Droplets

Follow these steps to ensure that your script will successfully process Compressor output media files.

To create an AppleScript Droplet application to process files created by Compressor
  1. In Script Editor, Choose File > Save As.

  2. In the Save Dialog:

    1. Choose Application from the File Format pop-up menu.

    2. Disable the Run Only, Startup Screen, and Stay Open options.

    3. Click Save.

    The script is saved as a script application. Because the script contains an “on open” handler, the script application is saved as an application Droplet, indicated by the arrow in the script application’s icon.

More information about writing scripts to use with Compressor is available on the web.

For information about AppleScript that is geared toward Apple developers, go to http://developer.apple.com/applescript.

For general information about writing scripts using AppleScript, go to http://macscripter.net.