ffmpeg

package
v0.0.0-...-7e99c83 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioFormat

type AudioFormat string
const (
	S16LeAudioFormat AudioFormat = "s16le"
)

func (AudioFormat) String

func (f AudioFormat) String() string

type Channel

type Channel int
const (
	MonoChannel Channel = iota + 1
	StereoChannel
)

func (Channel) Int

func (c Channel) Int() int

func (Channel) String

func (c Channel) String() string

type Config

type Config struct {
	Alias       string      `required:"true"`
	AudioFormat AudioFormat `required:"true" split_words:"true"`
	FrameRate   int         `required:"true" split_words:"true"`
	Channels    Channel     `required:"true"`
	BufferSize  int         `required:"true" split_words:"true"`
}

type Ffmpeg

type Ffmpeg interface {
	PlayerFromFile(filepath string) Player
	PlayerFromInput(r io.Reader) Player
	GetChannels() Channel
	GetFrameRate() int
}

func NewFfmpeg

func NewFfmpeg(cfg Config) Ffmpeg

type Player

type Player interface {
	SetInput(reader io.Reader)
	GetOutput() (io.ReadCloser, error)
	Start() error
	Cancel() error
	Wait() error
}

Jump to

Keyboard shortcuts

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