Documentation
¶
Overview ¶
Package processing provides video processing orchestration.
Package processing provides video processing orchestration.
Index ¶
- func CheckChunkedDependencies() error
- func FormatAudioDescription(channels []uint32) string
- func FormatAudioDescriptionConfig(channels []uint32, streams []media.AudioStreamInfo) string
- func GenerateAudioResultsDescription(channels []uint32, streams []media.AudioStreamInfo) string
- func GetAudioStreamInfo(inputPath string) []media.AudioStreamInfo
- func GetOutputDimensions(originalWidth, originalHeight uint32, cropFilter string) (uint32, uint32)
- type CropResult
- type EncodeResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckChunkedDependencies ¶
func CheckChunkedDependencies() error
CheckChunkedDependencies verifies that required tools are available.
func FormatAudioDescription ¶
FormatAudioDescription formats a basic audio description.
func FormatAudioDescriptionConfig ¶
func FormatAudioDescriptionConfig(channels []uint32, streams []media.AudioStreamInfo) string
FormatAudioDescriptionConfig formats audio description for config display.
func GenerateAudioResultsDescription ¶
func GenerateAudioResultsDescription(channels []uint32, streams []media.AudioStreamInfo) string
GenerateAudioResultsDescription generates audio description for results.
func GetAudioStreamInfo ¶
func GetAudioStreamInfo(inputPath string) []media.AudioStreamInfo
GetAudioStreamInfo returns detailed audio stream information.
Types ¶
type CropResult ¶
type CropResult struct {
CropFilter string // The crop filter string (e.g., "crop=1920:800:0:140")
Required bool // Whether cropping is required
MultipleRatios bool // Whether multiple aspect ratios were detected
Message string // Human-readable message about the crop result
}
CropResult contains the result of crop detection.
func DetectCrop ¶
func DetectCrop(inputPath string, inf *video.Info, disableCrop bool) CropResult
DetectCrop detects black bars using decoded luma samples. It samples the middle 70% of the video, ignores all-black frames, and uses the minimum crop seen across valid samples so mixed-aspect content is not over-cropped.
func ProcessChunked ¶
func ProcessChunked( ctx context.Context, cfg *config.Config, inputPath, outputPath string, videoProps *media.VideoProperties, vidInf *video.Info, audioStreams []media.AudioStreamInfo, qualitySetting float32, rep reporter.Reporter, perfc *perf.Collector, ) (CropResult, error)
ProcessChunked runs the chunked encoding pipeline for a single file. Returns the crop result so the caller can use it for validation.
type EncodeResult ¶
type EncodeResult struct {
Filename string
Duration time.Duration
InputSize uint64
OutputSize uint64
InputVideoSize uint64
OutputVideoSize uint64
VideoDurationSecs float64
EncodingSpeed float32
ValidationPassed bool
ValidationSteps []validation.ValidationStep
}
EncodeResult contains the result of a single file encode.