encoder

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 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 added in v0.14.0

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 added in v0.14.0

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

func Configure added in v0.14.0

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 added in v0.14.0

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

func (*Configuration) FfprobePath added in v0.14.0

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

func (*Configuration) Ladder added in v0.15.0

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

Ladder configures encoding ladder.

func (*Configuration) Log added in v0.14.0

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

func (*Configuration) SpritegenPath added in v0.15.1

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 added in v0.14.0

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

type SpriteGenerator added in v0.15.1

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

func NewSpriteGenerator added in v0.15.1

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

func (SpriteGenerator) Generate added in v0.15.1

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