
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 -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)โ 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 -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/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