Documentation
¶
Overview ¶
Package encode writes content-addressed On Air master clips off request paths.
Index ¶
- Constants
- func Encode(ctx context.Context, ffmpegPath string, frames func(int) *image.RGBA, ...) error
- func Hash(rendererVersion string, doc, tokens, bindings, assetDigests, profile any) string
- func MixFilter(base string, sounds []SoundInput, firstInput int, duration float64) string
- func PCM(a scene.Audio, seconds int) ([]int16, error)
- func WithOptions(ctx context.Context, ffmpegPath string, frames func(int) *image.RGBA, ...) error
- func WithWorkers(ctx context.Context, ffmpegPath string, frames func(int) *image.RGBA, ...) error
- func WriteWAV(w io.Writer, a scene.Audio, seconds int) error
- type Options
- type SoundInput
- type VideoInput
Constants ¶
View Source
const Profile = "1080p30-h264-high-l4.0-yuv420p-g120-aac48k-stereo-v1"
Variables ¶
This section is empty.
Functions ¶
func Encode ¶
func Encode(ctx context.Context, ffmpegPath string, frames func(int) *image.RGBA, n, fps int, audio, out string) error
Encode uses half the available processors for frames. Audio is an optional path.
func MixFilter ¶
func MixFilter(base string, sounds []SoundInput, firstInput int, duration float64) string
MixFilter builds a bounded, timestamp-reset mix alongside the generated bed. Sound input indexes begin at firstInput; base names the existing audio stream.
func PCM ¶
PCM returns deterministic stereo 48 kHz signed PCM. Static masters use the same band-limited hiss as the live Signal engine; tone and bed remain periodic.
func WithOptions ¶
Types ¶
type Options ¶
type Options struct {
Workers, Width, Height int
Sounds []SoundInput
Background *VideoInput
// MaxSeconds is 28 for look moments; plugin segments may opt into 600.
MaxSeconds int
MaxRate, BufferSize string
Audio *scene.Audio
AudioVolume *float64
}
Options allows Signal loops to honor a negotiated session ceiling and size.
type SoundInput ¶
type SoundInput struct {
Path string
At, Start float64
End *float64
Volume, FadeIn, FadeOut float64
}
SoundInput is a prepared asset path plus its authored timeline envelope.
type VideoInput ¶
Click to show internal directories.
Click to hide internal directories.