Video Clipping & Live Stream Recording with Tornado API
Sometimes you don't need the entire video. Tornado's advanced options let you extract specific segments, select resolution, and even record live streams.
Resolution Selection
Limit the maximum video resolution to reduce file size and download time:
curl -X POST "https://api.tornadoapi.io/jobs" \
-H "x-api-key: sk_your_api_key" \
-d '{
"url": "https://youtube.com/watch?v=...",
"max_resolution": "720"
}'Available resolutions: best (default), 2160 (4K), 1440 (2K),1080 (Full HD), 720 (HD), 480 (SD), 360 (Low)
Video Clipping
Extract a specific segment using start and end timestamps:
curl -X POST "https://api.tornadoapi.io/jobs" \
-H "x-api-key: sk_your_api_key" \
-d '{
"url": "https://youtube.com/watch?v=...",
"clip_start": "00:01:30",
"clip_end": "00:03:00"
}'Supported formats:
HH:MM:SS— Hours, minutes, seconds (e.g.,01:30:45)- Seconds — Raw seconds (e.g.,
5445)
Examples
// Extract first 60 seconds
{ "clip_start": "0", "clip_end": "60" }
// Extract from 5 minutes to end
{ "clip_start": "00:05:00" }
// Extract 1:30 to 3:00
{ "clip_start": "00:01:30", "clip_end": "00:03:00" }Live Stream Recording
Record ongoing YouTube live streams with configurable duration:
curl -X POST "https://api.tornadoapi.io/jobs" \
-H "x-api-key: sk_your_api_key" \
-d '{
"url": "https://youtube.com/live/abc123",
"live_recording": true,
"max_duration": 3600
}'Live Recording Options
| Parameter | Type | Description |
|---|---|---|
| live_recording | boolean | Enable live stream mode |
| live_from_start | boolean | Record from stream beginning (VOD mode) |
| max_duration | integer | Maximum recording duration in seconds |
| wait_for_video | boolean | Wait for scheduled streams to start |
Record from Start (VOD Mode)
{
"url": "https://youtube.com/live/abc123",
"live_recording": true,
"live_from_start": true,
"max_duration": 7200
}Combining Options
You can combine multiple options in a single request:
{
"url": "https://youtube.com/watch?v=...",
"max_resolution": "1080",
"clip_start": "00:00:30",
"clip_end": "00:02:00",
"format": "mp4",
"webhook_url": "https://myapp.com/webhook"
}Use Case: AI-Powered Short-Form Video Creation
Video clipping is the foundation of AI tools that transform long-form content into short-form clips. Here's how AI teams use Tornado's clipping features in their pipeline:
- Download the full video — Use Tornado to download the complete long-form video (podcast, interview, tutorial)
- AI analysis — Your model analyzes the video to identify the most engaging 30-90 second segments
- Extract clips via API — Use Tornado's
clip_startandclip_endparameters to extract each segment as a separate file - Post-process — Add captions, transitions, and effects to create final short-form content
- Distribute — Publish to TikTok, Instagram Reels, YouTube Shorts
This approach is significantly more efficient than downloading the full video multiple times or using FFmpeg locally. Tornado handles the clipping server-side and delivers each clip directly to your cloud storage.
Batch Clipping Example
If your AI model identifies 5 viral moments in a video, you can submit 5 clipping jobs in parallel:
# Python: Submit multiple clip jobs for AI-detected segments
import requests
API_KEY = "sk_your_api_key"
video_url = "https://youtube.com/watch?v=abc123"
# AI-detected segments (start, end, label)
segments = [
("00:02:15", "00:03:30", "hook-intro"),
("00:15:42", "00:17:00", "key-insight"),
("00:32:10", "00:33:45", "viral-moment"),
("00:48:00", "00:49:20", "call-to-action"),
("01:05:30", "01:07:00", "emotional-peak"),
]
for start, end, label in segments:
response = requests.post(
"https://api.tornadoapi.io/jobs",
headers={"x-api-key": API_KEY},
json={
"url": video_url,
"clip_start": start,
"clip_end": end,
"folder": f"clips/{label}",
"max_resolution": "1080",
"webhook_url": "https://myapp.com/clip-ready"
}
)
print(f"Clip '{label}' job: {response.json()['job_id']}")Why Not FFmpeg Directly?
You might wonder why not just download the full video and use FFmpeg locally for clipping. At scale, this approach has several problems:
- Double download — You download the full video even if you only need 60 seconds of it
- Server resources — FFmpeg processing consumes CPU, memory, and local disk space
- No anti-bot handling — You still need to solve the download problem (403 errors, rate limits)
- Manual cloud upload — After clipping, you need a separate pipeline to upload to S3/Azure/GCS
Tornado handles everything in one step: download, clip, and deliver directly to your cloud storage. No local processing, no infrastructure to manage.
Live Stream Use Cases
Live stream recording opens up additional possibilities:
- Conference recording — Automatically record live-streamed conference talks and keynotes
- News monitoring — Record live news broadcasts for analysis or archival
- Gaming content — Capture live gaming streams for highlight generation
- Event backup — Record scheduled streams as they happen, with webhook notification when complete
Next Steps
- Get started with your first Tornado API download
- Use batch downloads to process entire playlists
- Set up webhooks for async clip delivery notifications
- Build AI training datasets with clipped segments