Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownsampleFrame ¶
func DownsampleFrame(frame *image.RGBA, config PreviewConfig) [][]color.RGBA
DownsampleFrame takes a full-resolution RGB frame and downsamples it to preview size Each terminal cell represents a rectangular region of the source image Averages all pixels in each region for smooth, high-quality downsampling
func RenderPreview ¶
RenderPreview converts an RGB preview grid to a string representation using ANSI 24-bit true color escape codes for beautiful colored rendering
Types ¶
type AnalysisComplete ¶
type AnalysisComplete struct {
PeakMagnitude float64
RMSLevel float64
DynamicRange float64
Duration time.Duration
OptimalScale float64
AnalysisTime time.Duration
}
AnalysisComplete signals completion of Pass 1 with audio profile data
type AnalysisProgress ¶
type AnalysisProgress struct {
Frame int
TotalFrames int
CurrentRMS float64
CurrentPeak float64
BarHeights []float64
Duration time.Duration
}
AnalysisProgress represents progress updates from Pass 1 audio analysis
type AudioProfile ¶
type AudioProfile struct {
Duration time.Duration
PeakLevel float64 // in dB
RMSLevel float64 // in dB
DynamicRange float64 // in dB
OptimalScale float64
AnalysisTime time.Duration
}
AudioProfile holds the audio analysis results for display
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model implements the unified Bubbletea model for both passes
func (*Model) CompletionSummary ¶
CompletionSummary returns the final completion summary for printing after alt screen exits. Returns empty string if encoding is not complete.
type PreviewConfig ¶
type PreviewConfig struct {
Width int // Width in terminal cells
Height int // Height in terminal cells
}
PreviewConfig holds configuration for the video preview
func DefaultPreviewConfig ¶
func DefaultPreviewConfig() PreviewConfig
DefaultPreviewConfig returns a sensible default preview size Using 72x20 1.8:1 (slightly wider than 16:9 but very close)
type RenderComplete ¶
type RenderComplete struct {
OutputFile string
Duration time.Duration
FileSize int64
TotalFrames int
VisTime time.Duration // Visualisation: FFT + binning + drawing
EncodeTime time.Duration // Video encoding time
AudioTime time.Duration // Audio reading + encoding time
FinalizeTime time.Duration // Encoder finalization (flush + close)
TotalTime time.Duration
ThumbnailTime time.Duration
SamplesProcessed int64
EncoderName string // Video encoder used (e.g., "h264_nvenc", "libx264")
}
RenderComplete signals completion of Pass 2