![](https://help.apple.com/assets/64F8DA5B4E13D3659507F9F5/64F8DA5D4E13D3659507F9FB/en_US/b922e7e85d19c91dbb51ab1cf18e05e4.png)
Compressor command code examples
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 Compressor 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 -presetpath ~/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)” preset at ~/Library/Application\ Support/Compressor/Presets (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 -presetpath ~/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/Presets (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 Compressor 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
Download this guide: PDF