annotate

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: Apache-2.0 Imports: 29 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FFmpegPath = func() (string, error) {
	if p := os.Getenv("TB_FFMPEG"); p != "" {
		return p, nil
	}
	return exec.LookPath("ffmpeg")
}

Functions

func Burn

func Burn(ctx context.Context, path string, d Drawing) error

func Changes

func Changes(ctx context.Context, path string) ([]time.Duration, error)

func FindMark added in v0.6.2

func FindMark(changes []time.Duration, held time.Duration) (time.Duration, bool)

func FirstFrame added in v0.6.3

func FirstFrame(path string) (time.Time, error)

func Graph

func Graph(w, h, band int, caps []Caption, touches []Touch) string

func MarkChanges added in v0.6.2

func MarkChanges(ctx context.Context, path string) ([]time.Duration, error)

func SRT

func SRT(caps []Caption) string

Types

type Caption

type Caption struct {
	Start, End time.Duration
	Text       string
}

type Drawing added in v0.6.4

type Drawing struct {
	Caps    []Caption
	Touches []Touch
	Events  []Event
}

type Event added in v0.6.4

type Event struct {
	At   time.Duration
	Text string
}

type Sync

type Sync struct {
	Shift   time.Duration
	Matched int
	Touches int
	OK      bool
}

func Offset

func Offset(touches, changes []time.Duration) Sync

type Touch

type Touch struct {
	At    time.Duration
	Kind  string
	Pts   [][2]float64
	Shown time.Duration
}

Jump to

Keyboard shortcuts

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