videos
Video processing and management
videos
Video processing, encoding, streaming, and delivery with support for multiple formats, adaptive bitrate streaming, and thumbnail generation.
Overview
The videos primitive provides end-to-end video management including upload, transcoding, thumbnail generation, and adaptive streaming delivery via CDN.
Quick Example
import { videos } from 'sdk.do'
// Upload video
const video = await videos.upload('./demo.mp4', {
name: 'product-demo',
folder: 'marketing',
})
// Transcode to multiple formats
await video.transcode({
formats: ['mp4', 'webm'],
resolutions: [1080, 720, 480],
adaptiveBitrate: true,
})
// Generate thumbnail
const thumbnail = await video.thumbnail({
time: '00:00:05',
width: 1280,
height: 720,
})
// Get streaming URL
const url = video.streamUrl({ format: 'hls' })Core Capabilities
- Upload & Storage - Store videos with metadata and folders
- Transcoding - Convert to multiple formats and resolutions
- Adaptive Streaming - HLS and DASH for optimal playback
- Thumbnail Generation - Extract frames as images
- CDN Delivery - Fast global video delivery
Access Methods
SDK
TypeScript/JavaScript library for video operations
await videos.upload('./demo.mp4', { name: 'product-demo', folder: 'marketing' })CLI
Command-line tool for video management
do videos upload demo.mp4 --name product-demo --folder marketingAPI
REST/RPC endpoints for video operations
curl -X POST https://api.do/v1/videos/upload -F "[email protected]"MCP
Model Context Protocol for AI-driven video operations
Upload demo.mp4 as "product-demo" in the marketing folderRelated Primitives
speak
Convert text to lifelike speech with neural voices in 50+ languages. Generate audio at 300+ edge locations with <500ms latency and broadcast-quality output.
colo
Deploy directly to Cloudflare's colocation network with <10ms latency worldwide. Access 300+ edge locations, automatic failover, and bare-metal performance at cloud scale.