cottom/media-finisher
A small CPU model that runs ffmpeg finishing jobs: trim, reframe a video along a crop path, burn subtitles with libass, and join clips. Returns one H.264/AAC MP4.
Run cottom/media-finisher with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| op |
None
|
Operation
|
|
| src |
string
|
|
https URL of the input video
|
| srcs |
string
|
|
concat: JSON array of https URLs
|
| start |
number
|
0
|
trim/render: start, seconds
|
| end |
number
|
0
|
trim/render: end, seconds (0 = to the end)
|
| crop |
string
|
|
reframe/render: JSON {width,height,y,keyframes:[{t,x,cut}]}
|
| width |
integer
|
0
Max: 1920 |
output width (0 = keep)
|
| height |
integer
|
0
Max: 1920 |
output height (0 = keep)
|
| subtitles |
string
|
|
captions/render: ASS or SRT document
|
| style |
string
|
|
SRT only: libass force_style, e.g. FontName=DejaVu Sans,FontSize=14,Alignment=2
|
{
"type": "object",
"title": "Input",
"required": [
"op"
],
"properties": {
"op": {
"enum": [
"trim",
"reframe",
"captions",
"render",
"concat"
],
"type": "string",
"title": "op",
"description": "Operation",
"x-order": 0
},
"end": {
"type": "number",
"title": "End",
"default": 0,
"minimum": 0,
"x-order": 4,
"description": "trim/render: end, seconds (0 = to the end)"
},
"src": {
"type": "string",
"title": "Src",
"default": "",
"x-order": 1,
"description": "https URL of the input video"
},
"crop": {
"type": "string",
"title": "Crop",
"default": "",
"x-order": 5,
"description": "reframe/render: JSON {width,height,y,keyframes:[{t,x,cut}]}"
},
"srcs": {
"type": "string",
"title": "Srcs",
"default": "",
"x-order": 2,
"description": "concat: JSON array of https URLs"
},
"start": {
"type": "number",
"title": "Start",
"default": 0,
"minimum": 0,
"x-order": 3,
"description": "trim/render: start, seconds"
},
"style": {
"type": "string",
"title": "Style",
"default": "",
"x-order": 9,
"description": "SRT only: libass force_style, e.g. FontName=DejaVu Sans,FontSize=14,Alignment=2"
},
"width": {
"type": "integer",
"title": "Width",
"default": 0,
"maximum": 1920,
"minimum": 0,
"x-order": 6,
"description": "output width (0 = keep)"
},
"height": {
"type": "integer",
"title": "Height",
"default": 0,
"maximum": 1920,
"minimum": 0,
"x-order": 7,
"description": "output height (0 = keep)"
},
"subtitles": {
"type": "string",
"title": "Subtitles",
"default": "",
"x-order": 8,
"description": "captions/render: ASS or SRT document"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "string",
"title": "Output",
"format": "uri"
}