vqm

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

func (*FrameMetrics) FromJSON

func (fm *FrameMetrics) FromJSON(r io.Reader) error

func (*FrameMetrics) Get

func (fm *FrameMetrics) Get() []FrameMetric

func (*FrameMetrics) ToJSON

func (fm *FrameMetrics) ToJSON(w io.Writer) error

type Measurer

type Measurer interface {
	// Measure should run actual VQM measuring process
	Measure() error
	// GetResult will retrieve VQM measurement Result
	GetResult() (Result, error)
}

Measurer is an interface that must be implemented by VQM tool which is capable of calculating Vide Quality Metrics.

func NewFfmpegVMAF

func NewFfmpegVMAF(exePath, modelPath, compressedFile, sourceFile, resultFile string) (Measurer, error)

NewFfmpegVMAF will initialize VQM Measurer based on ffmpeg and libvmaf.

type Result

type Result struct {
	SourceFile     string
	CompressedFile string
	ResultFile     string
	Metrics        VideoQualityMetrics
}

Result represents Measurer tool execution result.

type VideoQualityMetrics

type VideoQualityMetrics struct {
	PSNR    float64
	MS_SSIM float64
	VMAF    float64
}

VideoQualityMetrics is a struct of meaningful Video Quality Metrics.

Jump to

Keyboard shortcuts

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