Presets
Presets in FFmate are reusable templates that make it easier to define and run FFmpeg
tasks. With a preset, you can preconfigure FFmpeg
commands, output patterns, priorities, and even pre- or post-processing scripts, so every task runs the same way without extra setup.
FFmate ships with 20 built-in presets covering the most common media tasks, including format conversion, frame rate adjustment, audio extraction, and platform-specific encodes for YouTube, TikTok, Instagram, Facebook, and Twitch. These ready-to-use presets save you from having to figure out the right FFmpeg
command for everyday jobs.
All presets are maintained in an open GitHub repository, where you can suggest changes or contribute new ones through pull requests. You can also create your own custom presets at any time using the API or the web interface
Creating a Preset
To create a preset, send a POST
request to the FFmate API:
curl -X POST http://localhost:3000/api/v1/presets \
-H "Content-Type: application/json" \
-d '{
"name": "Analyze and Transcode MP4",
"description": "Runs an analysis script to determine the best CRF value, which is then used in the transcode command.",
"command": "-y -stats_period 5 -i ${INPUT_FILE} -c:v libx264 -preset medium -crf ${METADATA_crf_value} -c:a aac -b:a 128k ${OUTPUT_FILE}",
"outputFile": "${INPUT_FILE_BASENAME}_analyzed.mp4",
"priority": 5,
"preProcessing": {
"scriptPath": "/opt/ffmate/scripts/analyze_bitrate.sh --input ${INPUT_FILE} --sidecar ${SIDECAR_FILE}",
"sidecarPath": "/var/tmp/${INPUT_FILE_BASENAME}.json",
"importSidecar": true
},
"postProcessing": {
"scriptPath": "/opt/ffmate/scripts/cleanup.sh --file ${OUTPUT_FILE} --status success"
},
"webhooks": [
{
"event": "task.updated",
"url": "https://workflow-engine.example.com/api/ffmate/job-status-update"
}
]
}'
FFmate returns a JSON object that contains the newly created preset including its ID
. A preset.created
event is also fired via Global webhooks and Direct webhooks.
💡 Tip: Prefer a visual approach? You can create new presets directly in the FFmate Web UI no API calls needed.
Presets properties
When you create a preset, you define parameters that are automatically applied to every task that uses it.
name
[optional] - A short, descriptive name to help you quickly identify the preset (e.g., "Convert to MP4 1080p", "Extract Audio as MP3").description
[optional] – A short note about what the preset is for or how it should be used (e.g., "Converts ProRes to H.264 for review copies").FFmpeg command
[optional] – The custom command FFmate will use to runFFmpeg
for this preset. Use this to define exactly how the media should be processed—for example, which codec to use, what resolution to convert to, or which filters to apply.
⚠️ Important details about how command
works:
You don’t need to add
ffmpeg
at the start of the command. FFmate automatically prepends it. By default, FFmate uses theffmpeg
binary in your system’sPATH
. If you want to use a different version, you can override the default with the--ffmpeg <path>
command-line flag.FFmate also implicitly adds the
-stats_period 1
option to every command, which limits FFmpeg’s progress output to one update per second.You can override this by explicitly adding your own
-stats_period x
to the command.- This setting directly affects:
- how often
task.updated
Global webhook and Direct webhook are sent, and - how often the job dashboard refreshes progress updates.
- how often
- This setting directly affects:
The
command
field also supports chaining multipleFFmpeg
commands with&&
. This is useful for advanced workflows such as two-pass encoding. When chaining commands, you must use the${FFMPEG}
wildcard (see FFmpeg Path for more details).You can also use wildcards like
${INPUT_FILE}
and${OUTPUT_FILE}
inside the command string. FFmate will automatically replace them with the actual file paths when the task runs.If a task references a preset, the
command
defined in the preset will always be used—any command provided directly in the task will be ignored.
Not sure which FFmpeg
commands to use?
output file path
[optional] – The path where the transcoded file should be saved. If the specified directory does not exist, FFmate will create it automatically. This can be a full path or a pattern that includes Wildcards like${INPUT_FILE_BASENAME}
to dynamically generate structured filenames (e.g., /exports/${INPUT_FILE_BASENAME}_1080p.mp4). If a task also includes its ownoutputFile
, that will be used instead of this one. In other words, the task's setting always takes priority over the preset.priority
[optional] – Sets the task's priority in the processing queue. Higher numbers mean higher priority — for example, a task with priority100
will be processed before one with10
. If multiple tasks share the same priority, they’ll generally run in the order they were created (FIFO for that priority level). If a task defines its ownpriority
, that will override the preset’s value. If neither is set, a default (usually0
) is used.pre-processing
[optional] – Defines a Pre-Processing Script to run before the task starts. Useful for preparing files, validating input, or setting up the environment. If the task includes its ownpreProcessing
config, FFmate will use that instead of the preset’s.scriptPath
: The full path to the script or executable to run.sidecarPath
: The full path to the JSON file that contains all task data.importSidecar
: Defines if the task will re-import the sidecar JSON after the pre-processing script finishes.
postProcessing
[optional] – Defines a Post-Processing Script to run after the task completes. Useful for cleanup, moving output files, or triggering follow-up actions. If the task includes its ownpostProcessing
config, FFmate will use that instead of the preset’s.scriptPath
: The full path to the script or executable to run.sidecarPath
: The full path to the JSON file that contains all task data.
Webhooks
[optional] : Defined a direct webhook target tied only to this preset. For example, it can notify a project management tool whenever the task's status changes.
How to Use Presets in Tasks
When creating a new task, you can use either an out-of-the-box preset or one of your custom presets by providing its ID instead of writing a custom command. See task properties for details.
Example: Creating a task with a preset via API
curl -X POST http://localhost:3000/api/v1/tasks \
-H "Content-Type: application/json" \
-d '{
"name": "Archive Raw Footage",
"inputFile": "/path/to/raw_footage_01.mxf",
"preset": "id-of-ProRes-HQ-for-Archive-preset",
"metadata": {
"project-id": "project_alpha_123",
"shot_number": "005"
}
}'
Listing Presets
To get a list of all available presets, send a GET
request to the FFmate API
curl -X GET 'http://localhost:3000/api/v1/presets?page=0&perPage=10' \
-H 'accept: application/json'
FFmate returns a JSON array containing all configured presets. The X-Total
response header provides the total number of presets available.
Query Parameters:
page
[optional] – Specifies which page of results to retrieve. Default:0
.perPage
[optional] – Defines how many tasks should be included in each page. Default:50
.
💡 Tip: Want to browse existing presets? The FFmate Web UI lets you view and search through all available presets with ease.
Getting a Single Preset
To retrieve the details of a specific preset, send a GET
request to the FFmate API, including the preset's ID
in the path.
curl -X GET 'http://localhost:3000/api/v1/presets/a1b2c3d4-e5f6-7890-1234-567890abcdef' \
-H 'accept: application/json'
FFmate returns a JSON object with the full details of the specified preset.
💡 Tip: Want a quick way to check the preset details? You can view preset configurations directly in the FFmate Web UI without using the API.
Updating a Preset
You can update an existing preset by sending a PUT
request to the FFmate API, including the preset's ID
in the path. The request body should contain the updated properties for the preset. You can find a list of all available properties in the Presets properties section below.
curl -X PUT http://localhost:3000/api/v1/presets/{presetId} \
-H "Content-Type: application/json" \
-d '{
"name": "MP4 High Quality (Updated)",
"command": "-y -i ${INPUT_FILE} -c:v libx264 -preset slow -crf 18 -c:a aac -b:a 192k ${OUTPUT_FILE}",
"description": "Converts video to MP4 with H.264 video and AAC audio, higher quality setting.",
"outputFile": "${INPUT_FILE_BASENAME}_highquality.mp4",
"priority": 5,
"postProcessing": {
"scriptPath": "/usr/local/bin/notify_completion.sh --file ${OUTPUT_FILE} --status success"
}
}'
FFmate returns the complete JSON object of the updated preset. A preset.updated
event is also fired via Global webhooks and Direct webhooks.
💡 Tip: Need to tweak an existing preset? You can update it directly in the FFmate Web UI.
Deleting a Preset
To delete an existing preset, send a DELETE
request to the FFmate API, replacing {presetId}
with the ID
of the preset you want to remove.
curl -X DELETE 'http://localhost:3000/api/v1/presets/{presetId}' \
-H 'accept: application/json'
FFmate responds with a 204
No Content status. The preset will be removed from the system. A preset.deleted
event is also fired via Global webhooks and Direct webhooks.
💡 Tip: Presets can be safely deleted from the FFmate Web UI, with helpful context to avoid accidental removals.