Generate captions from a video's audio using Vosk speech recognition and burn them onto the video with custom styling. Returns both the captioned video file and an SRT subtitle file. The pipeline: download → extract audio → transcribe → generate subtitles → burn onto video. positions : "bottom", "top", "center"
Generate captions from a video's audio using Vosk speech recognition and burn them onto the video with custom styling.
Returns both the captioned video file and an SRT subtitle file.
The pipeline: download → extract audio → transcribe → generate subtitles → burn onto video.
positions : "bottom", "top", "center"
{
"url": "https://cdn.example.com/video.mp4",
"language": "en",
"position": "bottom",
"font_size": 24,
"font_color": "white",
"padding_top": 30,
"outline_color": "black",
"outline_width": 2,
"padding_bottom": 30,
"max_words_per_line": 7,
"max_segment_duration": 3
}
{
"url": "https://cdn.example.com/video.mp4",
"position": "bottom",
"font_size": 24,
"font_color": "white",
"padding_top": 30,
"outline_color": "black",
"outline_width": 2,
"padding_bottom": 30,
"max_words_per_line": 7,
"max_segment_duration": 3
}
{
"url": "https://cdn.example.com/video.mp4",
"language": "es",
"position": "top",
"font_size": 28,
"font_color": "yellow",
"padding_top": 40,
"outline_color": "black",
"outline_width": 2,
"padding_bottom": 30,
"max_words_per_line": 6,
"max_segment_duration": 3
}
{
"job_id": "f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
"status": "pending",
"message": "Job created. Poll status_url for progress.",
"job_type": "caption",
"result_url": "https://eranol.com/api/v1/ffmpeg/result/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
"status_url": "https://eranol.com/api/v1/ffmpeg/status/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34"
}
Send your requests to the following URL using the specified HTTP method.
POST https://eranol.com/api/v1/ffmpeg/video/captionInclude the following headers with every request. Your API key is required for authentication.
Send the following JSON payload in the request body. Adjust the values to match your use case.
{
"url": "https://cdn.example.com/video.mp4",
"language": "en",
"position": "bottom",
"font_size": 24,
"font_color": "white",
"padding_top": 30,
"outline_color": "black",
"outline_width": 2,
"padding_bottom": 30,
"max_words_per_line": 7,
"max_segment_duration": 3
}All available options for this endpoint. Required parameters are marked accordingly.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | required | Video file URL |
| language | string | null | BCP-47 language code (e.g. en, es, zh). Omit to auto-detect |
| font_color | string | white | Subtitle color — name (white, yellow, red, etc.) or hex (#FFFF00) |
| font_size | int | 24 | Font size in pixels (8–500) |
| outline_color | string | black | Text outline color for readability |
| outline_width | int | 2 | Outline thickness in pixels (0–10, 0 disables) |
| position | string | bottom | Subtitle position: bottom, top, or center |
| padding_bottom | int | 30 | Pixel offset from bottom edge |
| padding_top | int | 30 | Pixel offset from top edge |
| max_words_per_line | int | 7 | Max words per subtitle segment (1–20) |
| max_segment_duration | float | 3.0 | Max seconds per subtitle segment (0.5–10.0) |
Pass any code below as the language parameter. Omit it entirely to let the API auto-detect the language.
| Code | Language |
|---|---|
| en | English |
| zh | Chinese |
| es | Spanish |
| hi | Hindi |
| ar | Arabic |
| fr | French |
| pt | Portuguese |
| ru | Russian |
| de | German |
| ja | Japanese |
| ko | Korean |
| it | Italian |
| tr | Turkish |
| pl | Polish |
| nl | Dutch |
| vi | Vietnamese |
| id | Indonesian |
| th | Thai |
| ms | Malay |
| uk | Ukrainian |
Showing 20 most spoken — use filters or search to see all 99
Use the following cURL command to make a request to this API endpoint. Replace YOUR_API_KEY with your actual API key from the dashboard.
curl -X POST "https://eranol.com/api/v1/ffmpeg/video/caption" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://cdn.example.com/video.mp4","language":"en","position":"bottom","font_size":24,"font_color":"white","padding_top":30,"outline_color":"black","outline_width":2,"padding_bottom":30,"max_words_per_line":7,"max_segment_duration":3}'Below is an example of a successful JSON response from this endpoint.
{
"job_id": "f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
"status": "pending",
"message": "Job created. Poll status_url for progress.",
"job_type": "caption",
"result_url": "https://eranol.com/api/v1/ffmpeg/result/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34",
"status_url": "https://eranol.com/api/v1/ffmpeg/status/f595b9ad-1e15-4452-b7c2-8f8ff09c0a34"
}A successful request will return one of the following HTTP status codes.