Generate a thumbnail from a video frame with text overlay. Extracts the frame at the given timestamp and uses drawtext to render text with a background box. Example: {"url": "https://cdn.example.com/video.mp4", "text": "Episode 1", "timestamp": 5.0, "position": "center"}
Generate a thumbnail from a video frame with text overlay.
Extracts the frame at the given timestamp and uses drawtext to render text with a background box.
Example: {"url": "https://cdn.example.com/video.mp4", "text": "Episode 1", "timestamp": 5.0, "position": "center"}
{
"url": "https://cdn.example.com/video.mp4",
"text": "Episode 1",
"bg_color": "black@0.5",
"position": "center",
"font_size": 48,
"timestamp": 5,
"font_color": "white"
}
{
"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/thumbnailInclude 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",
"text": "Episode 1",
"bg_color": "black@0.5",
"position": "center",
"font_size": 48,
"timestamp": 5,
"font_color": "white"
}All available options for this endpoint. Required parameters are marked accordingly.
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | string | required | Video file URL |
| time_sec | float | 0 | Time in seconds to capture the frame |
| width | int | 1280 | Thumbnail width in pixels |
| height | int | 720 | Thumbnail height in pixels |
| text | string | null | Optional text to overlay on the thumbnail |
| font_size | int | 48 | Font size for overlay text |
| font_color | string | white | Font color for overlay text |
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/thumbnail" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://cdn.example.com/video.mp4","text":"Episode 1","bg_color":"black@0.5","position":"center","font_size":48,"timestamp":5,"font_color":"white"}'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.