Automation
Captura supports two types of automation: a custom URL scheme, and AppleScript.
URL Scheme
Captura responds to captura: urls, and uses the action= query parameter to
specify actions. Invalid query parameters will be ignored.
Important! In order to prevent abuse, this type of automation is disabled by default. You need to omanually enable it in Preferences before it works and it can't be changed via automation.
Configure the App
action=configure, this is useful to quickly change between presets, or t
oeasily onboard people to a shared backend.
fps=Integer: Sets the FPS of the recording, it should be between 4 and 10.outputs=gif|mp4|all: Which outputs get generated locally, should begif,mp4, orall.backend=URL: Updates the backend URL that will be used.backend_output=gif|mp4: Which output should be sent to the backend, should begiformp4.keep_local_files=true|false: Whether to keep local files after a successful backend upload.
For example: captura:?action=configure&fps=4&outputs=gif&backend=https://coolbackend.example
will set the fps to 4, the local outputs to gif, and backend to
https://coolbackends.example. All other settings are left as they were.
Starting a Recording
action=record, this is useful if you want to trigger a recording with
specific settings. All of the setting overrides here only affect the current
recording session and won't affect subsequent recordings.
x=Integer: Sets the starting horizontal position of the recording frame from the left of the screen. Defaults to the center of the screen.y=Integer: Sets the starting vertical position of the recording frame from the bottom of the screen. Defaults to the center of the screen.width=Integer: Sets the width of the recording frame. Defaults to 400height=Integer: Sets the height of the recording frame. Defaults to 400prevent_resize=true|false: Prevents the recording frame from being resized. Defaults to false.prevent_move=true|false: Prevents the recording frame from being moved. Defaults to false.fps=Integer: Sets the FPS of the current recording.outputs=gif|mp4|all: Which outputs get generated locally for the current recording.backend=URL: Updates the backend URL that will be used for the current recording.backend_output=gif|mp4: Which output should be sent to the backend for the current recording.keep_local_files=true|false: Whether to keep local files after a successful backend upload.auto_start=true|false: Whether the recording session should start automatically or not. It takes 3 seconds to start.max_length=Integer: The max length for the recording in seconds, default and max is 300.
For example: captura:?action=record&fps=10&outputs=mp4&backend=https://bugreports.example&x=100&y=400&prevent_resize=true
will start a recording session that posts to a custom backend, using a 400x400
rectangle that can't be resized.
AppleScript
Configuring the App
The command configure will let you update the configuration with AppleScript.
For example, this command will set the fps to 8
tell application "Captura"
configure {fps:8}
end tell
For a full reference of the accepted values, see the section above on URL parameters.
Starting a Recording
The command start_recording will let you trigger a recording with AppleScript.
For example, this command will auto start a 1 second recording with a rectangle
of width 800, and starting at x 100
tell application "Captura"
start_recording {width:800, x:100, auto_start:true, max_length:1}
end tell
For a full reference of the accepted values, see the section above on URL parameters.