analysis

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 18 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 ColorPalette = []color.RGBA{

	{R: 230, G: 57, B: 70, A: 255},

	{R: 143, G: 35, B: 43, A: 255},

	{R: 84, G: 184, B: 50, A: 255},

	{R: 50, G: 110, B: 30, A: 255},

	{R: 63, G: 55, B: 201, A: 255},

	{R: 51, G: 45, B: 163, A: 255},

	{R: 86, G: 11, B: 173, A: 255},

	{R: 62, G: 8, B: 125, A: 255},

	{R: 31, G: 180, B: 206, A: 255},

	{R: 11, G: 123, B: 143, A: 255},

	{R: 255, G: 174, B: 0, A: 255},

	{R: 173, G: 118, B: 0, A: 255},
}

A custom color palette: color1 as base color and color2 as a darker variant.

Functions

func CreateBitratePlot

func CreateBitratePlot(frameStats []FrameStat) (*plot.Plot, error)

CreateBitratePlot creates a bitrate plot from given FrameStat slice.

func CreateCDFPlot

func CreateCDFPlot(values []float64, name string) (*plot.Plot, error)

CreateCDFPlot creates Cumulative Distribution Function plot for given VQM values.

func CreateFrameSizePlot

func CreateFrameSizePlot(frameStats []FrameStat) (*plot.Plot, error)

func CreateHistogramPlot

func CreateHistogramPlot(values []float64, name string) (*plot.Plot, error)

CreateHistogramPlot creates histogram plot for given VQM values.

func CreateVqmPlot

func CreateVqmPlot(values []float64, name string) (*plot.Plot, error)

CreateVqmPlot creates a plot for given VQM values.

Since values are specified as a 1D slice - it is assumed that index into slice is a frame number.

func MultiPlotBitrate

func MultiPlotBitrate(videoFile, plotFile, ffprobePath string) error

MultiPlotBitrate will create and save to file bitrate multi plot.

Resulting plot will include the bitrate plot aggregated into 1 second buckets and frame size plot all in one canvas.

func MultiPlotVqm

func MultiPlotVqm(values []float64, metric, title, outFile string) (err error)

MultiPlotVqm will create VQM metric multi plot and save it to a file.

Resulting plot will include the provided VQM metric plot, it's histogram plot and CDF plot all in one canvas.

Types

type FrameStat

type FrameStat struct {
	KeyFrame     bool
	DurationTime float64
	PtsTime      float64
	Size         uint64
}

FrameStat is struct with per-frame meta-data.

func GetFrameStats

func GetFrameStats(videoFile, ffprobePath string) ([]FrameStat, error)

GetFrameStats gets per-frame stats using ffprobe.

func (*FrameStat) UnmarshalJSON

func (f *FrameStat) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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