ffmpeg

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bits

type Bits int

func (Bits) Format

func (b Bits) Format(decimals int) string

type FFMPEG

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

func Decode

func Decode(path string, args ...string) *FFMPEG

func (*FFMPEG) Build

func (ff *FFMPEG) Build(ctx context.Context) *exec.Cmd

func (*FFMPEG) Decode

func (ff *FFMPEG) Decode(path string, args ...string) *FFMPEG

func (*FFMPEG) Encode

func (ff *FFMPEG) Encode(args ...string) *FFMPEG

func (*FFMPEG) LogLevel

func (ff *FFMPEG) LogLevel(level string) *FFMPEG

func (*FFMPEG) Muxer

func (ff *FFMPEG) Muxer(muxer string, args ...string) *FFMPEG

func (*FFMPEG) NoStats

func (ff *FFMPEG) NoStats() *FFMPEG

func (*FFMPEG) Output

func (ff *FFMPEG) Output(path string) *FFMPEG

func (*FFMPEG) OverWriteTarget

func (ff *FFMPEG) OverWriteTarget() *FFMPEG

func (*FFMPEG) Progress

func (ff *FFMPEG) Progress(cb func(Progress), progressSocketPath string) *FFMPEG

func (*FFMPEG) Run

func (ff *FFMPEG) Run(ctx context.Context, logger *slog.Logger) error

type InvalidMediaError

type InvalidMediaError struct {
	Reason string
}

func (InvalidMediaError) Error

func (e InvalidMediaError) Error() string

type Progress

type Progress struct {
	Frame           uint64
	FPS             float64
	Converted       time.Duration
	DuplicateFrames uint64
	DroppedFrames   uint64
	Speed           float64
}

type VideoStats

type VideoStats struct {
	VideoCodec    string        `json:"video_codec"`
	Duration      time.Duration `json:"duration"`
	BitRate       int           `json:"bit_rate"`
	BitsPerSample int           `json:"bits_per_sample"`
	Height        int           `json:"height"`
	Width         int           `json:"width"`
}

func Probe

func Probe(path string) (VideoStats, error)

func (VideoStats) LogValue

func (s VideoStats) LogValue() slog.Value

func (VideoStats) String

func (s VideoStats) String() string

Jump to

Keyboard shortcuts

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