app

package
v16.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AVstream

type AVstream struct {
	Input          AVstreamIO
	Output         AVstreamIO
	Aqueue         uint64 // gauge
	Queue          uint64 // gauge
	Dup            uint64 // counter
	Drop           uint64 // counter
	Enc            uint64 // counter
	Looping        bool
	LoopingRuntime uint64 // sec
	Duplicating    bool
	GOP            string
}

type AVstreamIO

type AVstreamIO struct {
	State  string
	Packet uint64 // counter
	Time   uint64 // sec
	Size   uint64 // bytes
}

type Config

type Config struct {
	ID             string     `json:"id"`
	Reference      string     `json:"reference"`
	FFVersion      string     `json:"ffversion"`
	Input          []ConfigIO `json:"input"`
	Output         []ConfigIO `json:"output"`
	Options        []string   `json:"options"`
	Reconnect      bool       `json:"reconnect"`
	ReconnectDelay uint64     `json:"reconnect_delay_seconds"` // seconds
	Autostart      bool       `json:"autostart"`
	StaleTimeout   uint64     `json:"stale_timeout_seconds"` // seconds
	LimitCPU       float64    `json:"limit_cpu_usage"`       // percent
	LimitMemory    uint64     `json:"limit_memory_bytes"`    // bytes
	LimitWaitFor   uint64     `json:"limit_waitfor_seconds"` // seconds
}

func (*Config) Clone

func (config *Config) Clone() *Config

func (*Config) CreateCommand

func (config *Config) CreateCommand() []string

CreateCommand created the FFmpeg command from this config.

type ConfigIO

type ConfigIO struct {
	ID      string            `json:"id"`
	Address string            `json:"address"`
	Options []string          `json:"options"`
	Cleanup []ConfigIOCleanup `json:"cleanup"`
}

func (ConfigIO) Clone

func (io ConfigIO) Clone() ConfigIO

type ConfigIOCleanup

type ConfigIOCleanup struct {
	Pattern       string `json:"pattern"`
	MaxFiles      uint   `json:"max_files"`
	MaxFileAge    uint   `json:"max_file_age_seconds"`
	PurgeOnDelete bool   `json:"purge_on_delete"`
}

type Log

type Log struct {
	LogHistoryEntry
	History []LogHistoryEntry
}

type LogEntry

type LogEntry struct {
	Timestamp time.Time
	Data      string
}

type LogHistoryEntry

type LogHistoryEntry struct {
	CreatedAt time.Time
	Prelude   []string
	Log       []LogEntry
}

type Probe

type Probe struct {
	Streams []ProbeIO
	Log     []string
}

type ProbeIO

type ProbeIO struct {
	Address string

	// General
	Index    uint64
	Stream   uint64
	Language string
	Format   string
	Type     string
	Codec    string
	Coder    string
	Bitrate  float64 // kbit/s
	Duration float64

	// Video
	Pixfmt string
	Width  uint64
	Height uint64
	FPS    float64

	// Audio
	Sampling uint64
	Layout   string
	Channels uint64
}

type Process

type Process struct {
	ID        string  `json:"id"`
	Reference string  `json:"reference"`
	Config    *Config `json:"config"`
	CreatedAt int64   `json:"created_at"`
	UpdatedAt int64   `json:"updated_at"`
	Order     string  `json:"order"`
}

func (*Process) Clone

func (process *Process) Clone() *Process

type ProcessStates

type ProcessStates struct {
	Finished  uint64
	Starting  uint64
	Running   uint64
	Finishing uint64
	Failed    uint64
	Killed    uint64
}

func (*ProcessStates) Marshal

func (p *ProcessStates) Marshal(s process.States)

type Progress

type Progress struct {
	Input     []ProgressIO
	Output    []ProgressIO
	Frame     uint64  // counter
	Packet    uint64  // counter
	FPS       float64 // rate, frames per second
	PPS       float64 // rate, packets per second
	Quantizer float64 // gauge
	Size      uint64  // bytes
	Time      float64 // seconds with fractions
	Bitrate   float64 // bit/s
	Speed     float64 // gauge
	Drop      uint64  // counter
	Dup       uint64  // counter
}

type ProgressIO

type ProgressIO struct {
	ID      string
	Address string

	// General
	Index     uint64
	Stream    uint64
	Format    string
	Type      string
	Codec     string
	Coder     string
	Frame     uint64 // counter
	Keyframe  uint64 // counter
	Framerate struct {
		Min     float64
		Max     float64
		Average float64
	}
	FPS       float64 // rate, frames per second
	Packet    uint64  // counter
	PPS       float64 // rate, packets per second
	Size      uint64  // bytes
	Bitrate   float64 // bit/s
	Extradata uint64  // bytes

	// Video
	Pixfmt    string
	Quantizer float64
	Width     uint64
	Height    uint64

	// Audio
	Sampling uint64
	Layout   string
	Channels uint64

	// avstream
	AVstream *AVstream
}

type State

type State struct {
	Order     string        // Current order, e.g. "start", "stop"
	State     string        // Current state, e.g. "running"
	States    ProcessStates // Cumulated process states
	Time      int64         // Unix timestamp of last status change
	Duration  float64       // Runtime in seconds since last status change
	Reconnect float64       // Seconds until next reconnect, negative if not reconnecting
	LastLog   string        // Last recorded line from the process
	Progress  Progress      // Progress data of the process
	Memory    uint64        // Current memory consumption in bytes
	CPU       float64       // Current CPU consumption in percent
	Command   []string      // ffmpeg command line parameters
}

Jump to

Keyboard shortcuts

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