analyzer

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BitrateModeMetadata           = "metadata"
	BitrateModeSample             = "sample"
	BitrateModeMetadataThenSample = "metadata_then_sample"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FFprobePath       string
	FFmpegPath        string
	ProbeTimeout      time.Duration
	AnalyzeDurationUS int64
	ProbeSizeBytes    int64
	BitrateMode       string
	SampleSeconds     int
}

Config controls ffprobe/ffmpeg stream analysis behavior.

type FFmpegAnalyzer

type FFmpegAnalyzer struct {
	// contains filtered or unexported fields
}

FFmpegAnalyzer probes stream metadata using ffprobe and optional ffmpeg sampling.

func NewFFmpegAnalyzer

func NewFFmpegAnalyzer(cfg Config) (*FFmpegAnalyzer, error)

NewFFmpegAnalyzer builds an analyzer with validated defaults.

func (*FFmpegAnalyzer) Analyze

func (a *FFmpegAnalyzer) Analyze(ctx context.Context, streamURL string) (Metrics, error)

Analyze probes one stream URL and returns quality metrics.

type Metrics

type Metrics struct {
	Width      int
	Height     int
	FPS        float64
	VideoCodec string
	AudioCodec string
	BitrateBPS int64
	VariantBPS int64
}

Metrics captures one source probe result.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL