encoder

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const MasterPlaylist = "master.m3u8"

Variables

This section is empty.

Functions

func NewPool

func NewPool(encoder Encoder, parallel int) pool

NewPool will create a pool of encoders that you can throw work at.

func SetLogger

func SetLogger(l *zap.SugaredLogger)

Types

type Configuration

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

func Configure

func Configure() *Configuration

Configure will attempt to lookup paths to ffmpeg and ffprobe. Call FfmpegPath and FfprobePath if you need to set it manually.

func (*Configuration) FfmpegPath

func (c *Configuration) FfmpegPath(p string) *Configuration

func (*Configuration) FfprobePath

func (c *Configuration) FfprobePath(p string) *Configuration

func (*Configuration) Ladder

func (c *Configuration) Ladder(l ladder.Ladder) *Configuration

Ladder configures encoding ladder.

func (*Configuration) Log

Log configures encoder logging. Default configuration is a no-op logger.

func (*Configuration) SpritegenPath

func (c *Configuration) SpritegenPath(p string) *Configuration

type Encoder

type Encoder interface {
	Encode(in, out string) (*Result, error)
	GetMetadata(input string) (*ladder.Metadata, error)
}

func NewEncoder

func NewEncoder(cfg *Configuration) (Encoder, error)

type Result

type Result struct {
	Input, Output string
	OrigMeta      *ladder.Metadata
	Ladder        ladder.Ladder
	Progress      <-chan ffmpegt.Progress
}

type SpriteGenerator

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

func NewSpriteGenerator

func NewSpriteGenerator(cmdPath string, log logging.KVLogger) (*SpriteGenerator, error)

func (SpriteGenerator) Generate

func (g SpriteGenerator) Generate(input, output string) error

Jump to

Keyboard shortcuts

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