I'm using the Apple compressor app from the command line to generate movies from sequences of images. This works fine, but the relevant command line command just exits before the job is done (while the compressor app carries out the task in the background). Hence one is left wondering when the job is finished. Using top I can check whether Apple compressor is still active, but I was hoping there is an option that let's me know when the job is done (ideally via osascript).

  1. Create an Automator workflow that sends a notification.
  2. Set the Automator workflow as the action to use on completion.

Run Automator Workflow

The Automator Workflow job action applies an Automator workflow to an output file after transcoding.

  • Workflow: Click the Choose button to set the Automator workflow that the job action triggers.


  • Thanks, but the point is/was that it is unclear when the process completed. That being said, I figured it out using bash (answer below) – 220284 Jan 12 at 10:58

Here's a bash script that does the job. As an input it takes a directory containing the file/s to be handled by compressor. It writes the result to a predefined directory and opens the resulting file with QuickTime.

input_dir=$(basename $1)
/Applications/Compressor.app/Contents/MacOS/Compressor -jobpath $1 -settingpath path_to_settings -locationpath path_to_output/$dir.mov
process_id=$(pgrep compressord) 
((while kill -0 $process_id; do sleep 1; done)  && ((pkill QuickTime || true) && open path_to_output/$dir.mov)) </dev/null &> /dev/null &

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .