catalog-transcoding-encoding-profiles #7

Merged
arne merged 9 commits from catalog-transcoding-encoding-profiles into main 2026-06-26 12:28:37 +02:00
Owner
No description provided.
Record three deferrals from the synchronous in-request transcode choice
(mirroring ADR-0006's phasing format): the DB-backed job queue + worker,
the encode-status state machine, and back-catalog reprocessing on
profile-version bump. All remain required before real publication.
Wire the scaffolded EncodingProfile + Rendition to lydlab's ffmpeg stack.
Reuse internal/audio as-is, extract a profile-driven Transcode from the
lab pipeline, seed the four starting profiles at startup, and add a 4th
'Renditioner' section to the episode page for sync transcode-on-demand.
References ADR-0005's phasing note.
Add the fields missing from the EncodingProfile appendix table (ID,
SampleRate, Channels, MetadataTemplate, CreatedAt) so the spec matches
the Go type and DB schema. Clarify Bitrate is bps (ffmpeg wants kbps),
pin spotify-v1's VorbisQ to 2 (~96 kbps), and separate profile target
LUFS (input) from rendition measured LUFS (output) to avoid the
example-measured-values being mistaken for seed inputs.
Extend EncodeSpec with SampleRate and Channels (emitted as -ar/-ac when
non-zero) so catalog.EncodingProfile fields are honored. Extract encodeArgs
as a pure function and golden-file test it per ADR-0005. Move isLossless from
web.go to audio.IsLossless for reuse by both lab and catalog master upload.
Add the catalog-side analog of the lab's encodeAndMeasure: ProfileToSpec
converts a catalog.EncodingProfile + master loudness into an audio.EncodeSpec
(pure function, golden-file tested), and Transcode runs the encode → measure →
probe → stat cycle, returning the fields for a catalog.Rendition. No .play.wav
or spectrograms — catalog renditions are delivery files, not A/B artifacts.
Expose CodecExt for filename construction. Add a 1s test WAV fixture (fix
.gitignore testdata negation to match nested dirs).
Add SeedProfiles (idempotent via FindProfileByNameVersion → create-if-missing)
with the ADR-0005 starting set: apple-podcast-v1, spotify-v1, pwa-opus-v1,
pwa-mp3-v1. Wire into main.go after catsql.Open. Profiles are reviewed in git
per ADR-0005, not hand-edited in production.
handleEpisodeTranscode runs each encoding profile against the episode's
master via pipeline.Transcode, creating catalog.Rendition rows. Synchronous
(ADR-0005 phasing stopgap). Existing renditions are skipped (idempotency via
FindRendition). Rendition files go to data/catalog/renditions/<id>/<profile>.<ext>.
Extend episodeView with renditions joined to their profiles for display.
4th section on the episode page: lists existing renditions per profile
(file size, duration, measured LUFS/true-peak) in a table matching the
masters table styling, with empty states for no-renditions-yet and
no-master-yet. A 'Transkoder per profil' button (gated on a master
existing) POSTs to the transcode handler.
arne approved these changes 2026-06-26 12:28:36 +02:00
arne merged commit 114d7206c5 into main 2026-06-26 12:28:37 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tjue/kokosbananas!7
No description provided.