Media Asset Ingestion and Web Transcoding Orchestration Spec
Define browser-side chunked upload, thumbnail generation, and real-time transcoding websocket pipelines.
Apply this template when building cloud media asset ingest portals for entertainment production teams. It defines direct-to-S3 multipart uploads, web worker hashing, and progress event streams.
Role: Lead Media Systems Full-Stack Developer
Context
- Destination Store: {{storage_backend}}
- Ingest Formats: {{supported_codecs}}
- Max Payload: {{max_upload_size_gb}} GB
- Event Transport: {{notification_protocol}}
- Client Concurrency: {{worker_concurrency_limit}}
Task
Author a technical engineering specification for a browser-based media ingest pipeline that manages chunked uploads, pre-flight client-side integrity validation, and real-time transcode progress rendering.
Method
- Define client-side file inspection using WebAssembly or Web Workers to validate {{supported_codecs}} prior to upload initiation.
- Construct the chunking, MD5/SHA-256 calculation, and presigned multi-part upload lifecycle to {{storage_backend}}.
- Establish client-side retry budgets, backoff curves, and pause/resume session persistence via IndexedDB.
- Design the backend transcode trigger event fired upon multipart assembly completion.
- Specify the {{notification_protocol}} payload contract for real-time transcode milestones (probe, decode, encode, thumbnailing, packaging).
- Outline memory management techniques to prevent browser tab crashes while processing files up to {{max_upload_size_gb}} GB.
- Detail optimistic UI states and progress bar smoothing calculations.
Constraints
- MUST enforce a maximum of {{worker_concurrency_limit}} parallel network chunk transfers.
- MUST NOT hold uncompressed video frames in main-thread JavaScript heap memory.
- Require end-to-end cryptographic integrity verification matching client hashes with object store ETags.
- Provide exhaustive error state tables for dropped WebSocket/SSE connections.
Output format
Produce a technical integration specification containing:
- Client Upload & Validation Sequence
- Multipart Storage Protocol & Payload Schemas
- Real-Time Event Protocol Specs (JSON event payloads)
- Resilience, Resume & Error Handling Matrix
- Browser Memory & Thread Safety Guidelines Length: 850-1350 words.
Self-review
- Ensure memory constraints strictly respect {{max_upload_size_gb}} GB limitations.
- Verify {{notification_protocol}} event structures contain actionable error codes.
- Confirm chunking concurrency does not exceed {{worker_concurrency_limit}}.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.