utils

package
v0.0.0-...-61808cf Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bits

func Bits[T float64 | int64](n T, decimals int) string

func Bytes

func Bytes[T float64 | int64](n T, decimals int) string

func CleanUUID

func CleanUUID(id string) string

func Concat

func Concat(dcPackage *dcp.DCP, cpl dcp.CompositionPlaylist, settings ConcatSettings, cb func(desc, videoFile, audioFile, subtitleFile string)) (err error)

func SelectCPL

func SelectCPL(dcPackage *dcp.DCP, pklUUID string) (cpl dcp.CompositionPlaylist, err error)

func TrimUUID

func TrimUUID(id string) string

Types

type ASSConverter

type ASSConverter struct {
	Title  string
	Width  int
	Height int

	Styles map[string]ASSStyle
	Events []ASSEvent
}

func (*ASSConverter) AddSubtitles

func (ass *ASSConverter) AddSubtitles(events []dcp.SubtitleEvent, offset time.Duration) error

func (*ASSConverter) String

func (ass *ASSConverter) String() string

type ASSEvent

type ASSEvent struct {
	Layer                     int
	Start, End                time.Duration
	Style                     string
	Name                      string
	MarginL, MarginR, MarginV int
	Effect                    string
	Text                      string
}

func (ASSEvent) String

func (e ASSEvent) String() string

type ASSStyle

type ASSStyle struct {
	Name            string
	Fontname        string
	Fontsize        float64
	PrimaryColour   color.RGBA
	SecondaryColour color.RGBA
	OutlineColour   color.RGBA
	BackColour      color.RGBA
	Bold            bool
	Italic          bool
	Underline       bool
	StrikeOut       bool
	ScaleX          float64
	ScaleY          float64
	Spacing         int
	Angle           float64
	BorderStyle     int
	Outline         float64
	Shadow          float64
	Alignment       int
	MarginL         int
	MarginR         int
	MarginV         int
	Encoding        int
}

func (ASSStyle) String

func (e ASSStyle) String() string

type ConcatSettings

type ConcatSettings struct {
	DropReelUUIDs []string
	Subtitles     bool

	Width, Height int
}

Jump to

Keyboard shortcuts

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