Documentation
¶
Index ¶
- Variables
- func CreateBitratePlot(frameStats []FrameStat) (*plot.Plot, error)
- func CreateCDFPlot(values []float64, name string) (*plot.Plot, error)
- func CreateFrameSizePlot(frameStats []FrameStat) (*plot.Plot, error)
- func CreateHistogramPlot(metric plotter.XYer, name string) (*plot.Plot, error)
- func CreateVqmPlot(metric plotter.XYer, name string) (*plot.Plot, error)
- func MultiPlotBitrate(videoFile, plotFile, ffprobePath string) error
- func MultiPlotVqm(vqmValues plotter.XYer, metric, title, outFile string) (err error)
- type FrameStat
- type FrameStats
Constants ¶
This section is empty.
Variables ¶
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 ¶
CreateBitratePlot creates a bitrate plot from given FrameStat slice.
func CreateCDFPlot ¶
CreateCDFPlot creates Cumulative Distribution Function plot for given VQM values.
func CreateHistogramPlot ¶
CreateHistogramPlot creates histogram plot for given VQM values.
func CreateVqmPlot ¶
CreateVqmPlot creates a plot for given VQM values.
func MultiPlotBitrate ¶
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.
Types ¶
type FrameStats ¶ added in v0.4.2
type FrameStats []FrameStat
FrameStats is an alias to implement convenient methods on underlying slice type.
func GetFrameStats ¶
func GetFrameStats(videoFile, ffprobePath string) (FrameStats, error)
GetFrameStats gets per-frame stats using ffprobe.
func (FrameStats) ToBitrate ¶ added in v0.4.2
func (ff FrameStats) ToBitrate() ([]float64, error)
ToBitrate calculates 1s bitrate buckets from given FrameStats.