Example: Compressor commands

The following are examples of code used for submitting common Compressor commands.

Important: If you’re using an image sequence as a source file, you must use a URL for the path in -jobpath.

Submit a job

The following command submits a job.

Important: The command below must be executed on one line.

/Applications/Compressor.app/Contents/MacOS/Compressor -batchname "My First Batch" -jobpath ~/Movies/ MySource.mov -settingpath ~/Library/Application Support/Compressor/Settings/Apple Devices HD (Custom).cmprstng -locationpath ~/Movies/MyOutput.m4v

What this command does:

  • Identifies where Compressor is located

  • Assigns the batch name “My First Batch” (The quotation marks are used because of the spaces.)

  • Finds the file “MySource.mov” for the job at ~/Movies

  • Uses the “Apple Devices HD (Custom)” setting at ~/Library/Application Support/Compressor/Settings (The “” character is used to retain the space in “Application Support.”)

  • Writes the output file, “MyOutput.m4v,” to the ~/Movies folder

Submit a batch to a group of shared computers

The following command submits a batch to a group of computers already configured for sharing in Compressor.

Important: The command below must be executed on one line.

/Applications/Compressor.app/Contents/MacOS/Compressor -computergroup "Superfast Computers" -batchname "My First Batch" -jobpath ~/Movies/ MySource.mov -settingpath ~/Library/Application Support/Compressor/Settings/Apple Devices HD (Custom).cmprstng -locationpath ~/Movies/MyOutput.m4v

What this command does:

  • Identifies where Compressor is located

  • Sends the job to the group of shared computers named “Superfast Computers”

  • Assigns the batch name, “My First Batch”

  • Finds the file “MySource.mov” for the job at ~/Movies

  • Uses the “Apple Devices HD (Custom)” setting at ~/Library/Application Support/Compressor/Settings (The “” character is used in this case to retain the space in “Application Support.”)

  • Writes the output file, named “MyOutput.m4v,” to the ~/Movies folder

Configure a shared computer

The following command configures a computer to allow other computers to process batches on it.

Important: The command below must be executed on one line.

/Applications/Compressor.app/Contents/MacOS/Compressor -sharing on -instances 1 -networkInterface en0 -portRange 30000 1000

What this command does:

  • Identifies where Compressor is located

  • Turns on sharing

  • Enables one extra Compressor instance

  • Sets processing to occur on a specific network interface

  • Sets network communication to a predefined port range