docs/guides/use-cases/media-processing.mdx
import UseCasesCards from "/snippets/use-cases-cards.mdx";
Build media processing pipelines that handle large files and long-running operations. Process videos, images, audio, and documents with automatic retries, progress tracking, and no timeout limits.
Process multi-hour videos without timeouts: Transcode videos, extract frames, or run CPU-intensive operations for hours. No execution time limits.
Stream progress to users in real-time: Show processing status updating live in your UI. Users see exactly where encoding is and how long remains.
Parallel processing with resource control: Process hundreds of files simultaneously with configurable concurrency limits. Control resource usage without overwhelming infrastructure.
graph TB
A[processVideo] --> B[downloadFromStorage]
B --> C[batchTriggerAndWait]
C --> D[transcodeToHD]
C --> E[transcodeToSD]
C --> F[extractThumbnail]
D --> G[uploadToStorage]
E --> G
F --> G
graph TB
A[processVideoUpload] --> B[analyzeMetadata]
B --> C{Source
Resolution?}
C -->|4K Source| D[transcode4K]
C -->|HD Source| E[transcodeHD]
C -->|SD Source| F[transcodeSD]
D --> G[coordinatePostProcessing]
E --> G
F --> G
G --> H[batchTriggerAndWait]
H --> I[extractThumbnails]
H --> J[generatePreview]
H --> K[detectChapters]
I --> L[uploadToStorage]
J --> L
K --> L
L --> M[notifyComplete]
graph TB
A[processImageUpload] --> B[analyzeContent]
B --> C{Content
Type?}
C -->|Product| D[removeBackground]
C -->|Portrait| E[detectFaces]
C -->|Landscape| F[analyzeScene]
D --> G[upscaleWithAI]
E --> G
F --> G
G --> H[batchTriggerAndWait]
H --> I[generateWebP]
H --> J[generateThumbnails]
H --> K[generateSocialCrops]
I --> L[uploadToStorage]
J --> L
K --> L
graph TB
A[processAudioUpload] --> B[cleanAudio]
B --> C[coordinateProcessing]
C --> D[batchTriggerAndWait]
D --> E[transcribeWithDeepgram]
D --> F[enhanceAudio]
D --> G[detectChapters]
E --> H[generateShowNotes]
F --> H
G --> H
H --> I[publishToPlatforms]
graph TB
A[processDocumentUpload] --> B[detectFileType]
B -->|PDF| C[extractText]
B -->|Word/Excel| D[convertToPDF]
B -->|Image| E[runOCR]
C --> F[classifyDocument]
D --> F
E --> F
F -->|Invoice| G[extractLineItems]
F -->|Contract| H[extractClauses]
F -->|Receipt| I[extractExpenses]
G --> J{Needs
Review?}
H --> J
I --> J
J -->|Yes| K[wait.forToken approval]
J -->|No| L[processAndIntegrate]
K --> L