Versions in this module Expand all Collapse all v0 v0.2.0 Nov 2, 2026 v0.1.2 Nov 1, 2026 v0.1.1 Nov 1, 2026 v0.1.0 Nov 1, 2026 Changes in this version + const DefaultTemplate + const EncodeThreads + var Heights = []int + func DecryptSegment(data, key, iv []byte) ([]byte, error) + func Encoders() []string + func EncryptRendition(dir, name, keyURI string, key, iv []byte) error + func Even(x float64) int + func Ffmpeg(ctx context.Context, args ...string) error + func FfmpegProgress(ctx context.Context, frames int, report func(float64), args ...string) error + func PeriodicJobs() []*river.PeriodicJob + func Prefix(ref AssetRef) string + func Restart(ctx context.Context, rc *river.Client[pgx.Tx], q core.TenantTx, ref AssetRef) error + func RunEncoder(ctx context.Context, d *core.Deps, hooks Hooks, node string, slots int, ...) + func SegmentAt(playlist []byte, t float64) (segment string, offset float64, iv []byte, err error) + func Start(ctx context.Context, rc *river.Client[pgx.Tx], q core.TenantTx, ref AssetRef) error + func ValidatePackage(dir string, names []string, wantSeconds float64) error + func Workers(w *river.Workers, d *core.Deps, hooks Hooks) + type AssetRef struct + AssetID pgtype.UUID + JobID pgtype.UUID + TenantID pgtype.UUID + type Encoder struct + CRF string + Codec string + Encryption string + Preset string + Profile string + SegmentSeconds int + type Hooks interface + Admit func(ctx context.Context, tx core.TenantTx, ref AssetRef, durationSeconds float64) (code string, err error) + Failed func(ctx context.Context, ref AssetRef, code string) error + Planned func(ctx context.Context, tx core.TenantTx, ref AssetRef, p Planned) error + Publish func(ctx context.Context, ref AssetRef, stage string, ...) error + Started func(ctx context.Context, ref AssetRef) error + Work func(ctx context.Context, ref AssetRef) (Work, error) + type PackageArgs struct + Stage string + func (PackageArgs) InsertOpts() river.InsertOpts + func (PackageArgs) Kind() string + type Plan struct + Audio bool + ChunkFrames int + Chunks int + Deinterlace bool + Encoder *Encoder + FPS string + GOP int + Rungs []Rung + func MakePlan(src Source, preset Preset) Plan + func (p Plan) Lane(lane string) []Rung + func (p Plan) Tasks() []Task + type Planned struct + Duration float64 + Height int + IV []byte + Key []byte + Plan []byte + Probe []byte + Width int + type Preset struct + Heights []int + Quality Quality + func (p *Preset) Clean() bool + type ProbeArgs struct + func (ProbeArgs) InsertOpts() river.InsertOpts + func (ProbeArgs) Kind() string + type Progress struct + AssetID pgtype.UUID + Done int32 + Lane string + Partial float64 + Total int32 + func ProgressOf(ctx context.Context, q core.TenantTx, assets []pgtype.UUID) ([]Progress, error) + type Quality string + const QualityBalanced + const QualityFast + const QualityHigh + func (q Quality) Valid() bool + type Rung struct + Half bool + Height int + Lane string + MaxrateK int + Name string + Width int + type Source struct + Duration float64 + FPSDen int + FPSNum int + HasAudio bool + Height int + Interlaced bool + Raw []byte + Width int + type StoryboardArgs struct + func (StoryboardArgs) InsertOpts() river.InsertOpts + func (StoryboardArgs) Kind() string + type SweepArgs struct + func (SweepArgs) InsertOpts() river.InsertOpts + func (SweepArgs) Kind() string + type Task struct + Chunk int + Lane string + type TaskInfo struct + Attempts int32 + Chunk int32 + Done bool + Error string + Finished time.Time + Lane string + Node string + Progress float32 + Queued time.Time + Started time.Time + State string + func Tasks(ctx context.Context, q core.TenantTx, asset pgtype.UUID) ([]TaskInfo, error) + type Template struct + Description string + Key string + Name string + func TemplateByKey(key string) (Template, bool) + func Templates() []Template + type Work struct + DurationSeconds float64 + IV []byte + Key []byte + Plan []byte + Preset Preset + SourceKey string