analysis

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 18 Imported by: 0

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(metric plotter.XYer, name string) (*plot.Plot, error)

CreateHistogramPlot creates histogram plot for given VQM values.

func CreateVqmPlot

func CreateVqmPlot(metric plotter.XYer, name string) (*plot.Plot, error)

CreateVqmPlot creates a plot for given VQM values.

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(vqmValues plotter.XYer, 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