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"
POST https://eranol.com/api/v1/ffmpeg/video/caption
{
"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
}
{
"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"
}
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 |
| bn | Bengali |
| ur | Urdu |
| fa | Persian |
| sv | Swedish |
| ro | Romanian |
| cs | Czech |
| el | Greek |
| hu | Hungarian |
| da | Danish |
| fi | Finnish |
| no | Norwegian |
| sk | Slovak |
| he | Hebrew |
| bg | Bulgarian |
| hr | Croatian |
| sr | Serbian |
| ta | Tamil |
| te | Telugu |
| ml | Malayalam |
| kn | Kannada |
| gu | Gujarati |
| mr | Marathi |
| pa | Punjabi |
| af | Afrikaans |
| am | Amharic |
| as | Assamese |
| az | Azerbaijani |
| ba | Bashkir |
| be | Belarusian |
| bo | Tibetan |
| br | Breton |
| bs | Bosnian |
| ca | Catalan |
| cy | Welsh |
| et | Estonian |
| eu | Basque |
| fo | Faroese |
| gl | Galician |
| ha | Hausa |
| haw | Hawaiian |
| ht | Haitian Creole |
| hy | Armenian |
| is | Icelandic |
| jw | Javanese |
| ka | Georgian |
| kk | Kazakh |
| km | Khmer |
| la | Latin |
| lb | Luxembourgish |
| ln | Lingala |
| lo | Lao |
| lt | Lithuanian |
| lv | Latvian |
| mg | Malagasy |
| mi | Maori |
| mk | Macedonian |
| mn | Mongolian |
| mt | Maltese |
| my | Burmese |
| ne | Nepali |
| nn | Nynorsk |
| oc | Occitan |
| ps | Pashto |
| sa | Sanskrit |
| sd | Sindhi |
| si | Sinhala |
| sl | Slovenian |
| sn | Shona |
| so | Somali |
| sq | Albanian |
| su | Sundanese |
| sw | Swahili |
| tg | Tajik |
| tk | Turkmen |
| tl | Tagalog |
| tt | Tatar |
| uz | Uzbek |
| yi | Yiddish |
| yo | Yoruba |
Request Body
{
"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
}
Request Body
{
"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
}
Request Body
{
"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
}
| Code | Meaning |
|---|---|
401 | Missing or invalid API key |
402 | Insufficient credits |
422 | Validation error — check your request body |
429 | Rate limit exceeded — slow down requests |
500 | Internal server error — try again or contact support |