Skip to main content

Video Processing (FFmpeg)

Server-side video processing — trim, resize, watermark, convert format, or run a custom FFmpeg command. No local FFmpeg installation required.

Plan limits

Each plan includes a monthly FFmpeg processing quota (measured in video minutes processed). Check your quota with GET /api/ffmpeg/usage. Unused minutes do not roll over.


Check Quota​

GET https://api.indreelforge.com/api/ffmpeg/usage
Authorization: Apikey YOUR_API_KEY

Response​

{
"allowed": true,
"used": 12,
"limit": 60,
"remaining": 48
}

limit: null means unlimited (Business plan). allowed: false means the quota is exhausted.


Trim Video​

Cut a clip between a start time and duration.

POST https://api.indreelforge.com/api/ffmpeg/trim
Authorization: Apikey YOUR_API_KEY
Content-Type: multipart/form-data
FieldTypeRequiredDescription
videofileYesInput video file (max 500 MB)
startstringNoStart offset in seconds (default: "0")
durationstringYesDuration to keep in seconds (e.g. "30")
curl -X POST https://api.indreelforge.com/api/ffmpeg/trim \
-H 'Authorization: Apikey YOUR_API_KEY' \
-F '[email protected]' \
-F 'start=10' \
-F 'duration=30'

Response​

{
"status": "completed",
"job_id": "abc123",
"output": "/api/ffmpeg/download/abc123",
"minutes_used": 1
}

Resize Video​

Scale a video to a target resolution. Useful for converting landscape to vertical (9:16) for TikTok/Reels.

POST https://api.indreelforge.com/api/ffmpeg/resize
Authorization: Apikey YOUR_API_KEY
Content-Type: multipart/form-data
FieldTypeRequiredDescription
videofileYesInput video file (max 500 MB)
widthstringNoOutput width in pixels (default: "1080")
heightstringNoOutput height in pixels (default: "1920")
curl -X POST https://api.indreelforge.com/api/ffmpeg/resize \
-H 'Authorization: Apikey YOUR_API_KEY' \
-F '[email protected]' \
-F 'width=1080' \
-F 'height=1920'

Response​

{
"status": "completed",
"job_id": "abc123",
"output": "/api/ffmpeg/download/abc123",
"minutes_used": 2
}

Add Watermark​

Overlay text onto a video.

POST https://api.indreelforge.com/api/ffmpeg/watermark
Authorization: Apikey YOUR_API_KEY
Content-Type: multipart/form-data
FieldTypeRequiredDescription
videofileYesInput video file (max 500 MB)
textstringNoWatermark text (default: "IndReelForge", max 200 chars)
positionstringNotop-left, top-right, bottom-left, bottom-right, center (default: "bottom-right")
fontSizestringNoFont size 8–128 (default: "24")
curl -X POST https://api.indreelforge.com/api/ffmpeg/watermark \
-H 'Authorization: Apikey YOUR_API_KEY' \
-F '[email protected]' \
-F 'text=@mybrand' \
-F 'position=bottom-right' \
-F 'fontSize=32'

Response​

{
"status": "completed",
"job_id": "abc123",
"output": "/api/ffmpeg/download/abc123",
"minutes_used": 2
}

Convert Format​

Convert a video to a different container format.

POST https://api.indreelforge.com/api/ffmpeg/convert
Authorization: Apikey YOUR_API_KEY
Content-Type: multipart/form-data
FieldTypeRequiredDescription
videofileYesInput video file (max 500 MB)
formatstringNoOutput format: mp4, webm, mov, avi, gif (default: "mp4")
curl -X POST https://api.indreelforge.com/api/ffmpeg/convert \
-H 'Authorization: Apikey YOUR_API_KEY' \
-F '[email protected]' \
-F 'format=mp4'

Response​

{
"status": "completed",
"job_id": "abc123",
"output": "/api/ffmpeg/download/abc123",
"minutes_used": 1
}

Custom FFmpeg Command​

Run any FFmpeg command with your own files or URLs. Uses placeholder syntax for input/output paths.

POST https://api.indreelforge.com/api/ffmpeg/jobs/upload
Authorization: Apikey YOUR_API_KEY
Content-Type: multipart/form-data
FieldTypeRequiredDescription
file / file1 / file2fileYes*Upload up to 3 input files
filesstring[]Yes*Or pass an array of public URLs (JSON body)
full_commandstringYesFFmpeg command using {input}, {input1}, {output} placeholders
output_extensionstringYesOutput file extension, e.g. mp4, mp3, gif

*Either files or URLs required.

Placeholders:

  • {input} / {input0} → first file
  • {input1} → second file
  • {input2} → third file
  • {output} → output file path
# File upload
curl -X POST https://api.indreelforge.com/api/ffmpeg/jobs/upload \
-H 'Authorization: Apikey YOUR_API_KEY' \
-F '[email protected]' \
-F 'full_command=ffmpeg -i {input} -vf fps=10,scale=320:-1 -y {output}' \
-F 'output_extension=gif'

# URL-based (JSON body)
curl -X POST https://api.indreelforge.com/api/ffmpeg/jobs/upload \
-H 'Authorization: Apikey YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"files": ["https://example.com/video.mp4"],
"full_command": "ffmpeg -i {input} -an -y {output}",
"output_extension": "mp4"
}'

Response​

{
"success": true,
"job_id": "abc123",
"status": "FINISHED",
"output_url": "/api/ffmpeg/download/abc123",
"minutes_used": 3
}
Security

Shell operators (;, |, &, $, `) are blocked in full_command. Commands must start with ffmpeg.


Get Job Status​

GET https://api.indreelforge.com/api/ffmpeg/jobs/:job_id
Authorization: Apikey YOUR_API_KEY

Response​

{
"job_id": "abc123",
"status": "FINISHED",
"operation": "custom",
"progress": 100,
"error_message": null,
"output_url": "/api/ffmpeg/download/abc123",
"minutes_used": 3,
"created_at": "2024-01-15T10:00:00.000Z",
"completed_at": "2024-01-15T10:00:45.000Z"
}

Status values: PENDING, PROCESSING, FINISHED, ERROR


List Jobs​

GET https://api.indreelforge.com/api/ffmpeg/jobs
Authorization: Apikey YOUR_API_KEY

Returns up to 50 most recent jobs.


Download Output​

GET https://api.indreelforge.com/api/ffmpeg/download/:job_id
Authorization: Apikey YOUR_API_KEY

Returns the processed file as a binary download. The file is only available while it exists on the server — download it promptly after the job completes.


Check Consumption (alias)​

GET https://api.indreelforge.com/api/ffmpeg/consumption
Authorization: Apikey YOUR_API_KEY
{
"used_minutes": 12,
"total_minutes": 60,
"remaining_minutes": 48
}

total_minutes: null = unlimited.


How Minutes Are Counted​

  • Minutes are counted based on output video duration, rounded up to the nearest minute (minimum 1 minute per job).
  • Minutes are reserved atomically before each job starts — so your quota cannot be exceeded even with concurrent requests.
  • If a job fails, reserved minutes are refunded automatically.
  • Monthly quota resets on a 30-day rolling window from your first job of the month.
  • Rate limit: 10 FFmpeg jobs per minute per API key.