vqm

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFfmpegVMAFTemplate = "-hide_banner -i {{.CompressedFile}} -i {{.SourceFile}} " +
	"-lavfi libvmaf=n_subsample=1:log_path={{.ResultFile}}:feature=name=psnr:" +
	"log_fmt=json:model=path={{.ModelPath}}:n_threads={{.NThreads}} -f null -"

Functions

This section is empty.

Types

type AggregateMetric added in v0.4.0

type AggregateMetric struct {
	VMAF    Metric
	PSNR    Metric
	MS_SSIM Metric
}

type FfmpegVMAF added in v0.4.1

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

FfmpegVMAF defines VQM tool and implements Measurer interface.

func NewFfmpegVMAF

func NewFfmpegVMAF(cfg *FfmpegVMAFConfig, compressedFile, sourceFile string) (*FfmpegVMAF, error)

NewFfmpegVMAF will initialize VQM Measurer based on ffmpeg and libvmaf.

func (*FfmpegVMAF) GetMetrics added in v0.4.1

func (f *FfmpegVMAF) GetMetrics() (*AggregateMetric, error)

func (*FfmpegVMAF) Measure added in v0.4.1

func (f *FfmpegVMAF) Measure() error

func (*FfmpegVMAF) UsageStat added in v0.4.2

func (f *FfmpegVMAF) UsageStat() metric.UsageStat

type FfmpegVMAFConfig added in v0.3.0

type FfmpegVMAFConfig struct {
	FfmpegPath         string
	LibvmafModelPath   string
	FfmpegVMAFTemplate string
	ResultFile         string
}

FfmpegVMAFConfig exposes parameters for ffmpegVMAF creation.

type FrameMetric

type FrameMetric struct {
	FrameNum uint
	VMAF     float64
	PSNR     float64
	MS_SSIM  float64
}

FrameMetric contains VQMs for a single frame.

type FrameMetrics

type FrameMetrics []FrameMetric

func (*FrameMetrics) FromFfmpegVMAF

func (fm *FrameMetrics) FromFfmpegVMAF(jsonReader io.Reader) error

FromFfmpegVMAF will Unmarshal libvmaf's JSON into FrameMetrics.

type Metric added in v0.4.0

type Metric struct {
	Mean         float64
	HarmonicMean float64
	Min          float64
	Max          float64
	StDev        float64
	Variance     float64
}

Jump to

Keyboard shortcuts

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