video

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package video allows the recording of video to a file. FFMPEG must be available on the host computer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FFMPEG

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

func NewFFMPEG

func NewFFMPEG(rnd Renderer, tv Television) *FFMPEG

func (*FFMPEG) Destroy

func (vid *FFMPEG) Destroy()

func (*FFMPEG) Enable

func (vid *FFMPEG) Enable(enable bool, conf Session) error

func (*FFMPEG) IsRecording

func (vid *FFMPEG) IsRecording() bool

func (*FFMPEG) Preprocess

func (vid *FFMPEG) Preprocess(cartName string, width int32, height int32, hz float32, profile Profile) error

func (*FFMPEG) Process

func (vid *FFMPEG) Process(framenum int)

type Profile

type Profile string
const (
	ProfileFast        Profile = "FAST"
	Profile1080        Profile = "1080"
	ProfileYouTube1080 Profile = "YouTube1080"
	ProfileYouTube4k   Profile = "YouTube4k"
)

type Renderer

type Renderer interface {
	ReadPixels(width int32, height int32, pix []uint8)
}

type Session

type Session struct {
	Log       io.Writer
	LastFrame int
	Profile   Profile
}

Session is used to configure the FFMPEG process on the call to Enable()

type Television

type Television interface {
	AddAudioMixer(m television.AudioMixer)
	RemoveAudioMixer(m television.AudioMixer)
	GetFrameInfo() frameinfo.Current
}

Jump to

Keyboard shortcuts

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