feat(transcode): optimize + on-the-fly quality + HLS streaming (§6.6)
POST /tracks/{id}/optimize enqueues a transcode; GET /stream/{id}?quality=
serves a cached Opus rendition (miss → master + background warm); GET
/stream/{id}/hls/{playlist.m3u8,segment} serves the worker-generated HLS
rendition (AAC-in-TS), with ?token= propagated onto segment URLs for players
that can't set headers. Hexagonal: Transcoder port, FfmpegTranscoder adapter,
TranscodeService + cache-path helpers, transcode_track worker (idempotent),
schemas + deps wiring. ffmpeg already in the image.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
"""Transcode/optimize response schemas (§6.6)."""
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class OptimizeEnqueuedOut(BaseModel):
|
||||
"""Acknowledgement that a transcode job was queued (it runs in the worker)."""
|
||||
|
||||
status: str
|
||||
job_id: str
|
||||
quality: str
|
||||
Reference in New Issue
Block a user