avtools

package module
v0.1.47 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MIT Imports: 10 Imported by: 1

README

FFmpeg Tools

A convenience tool for running common ffmpeg commands.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPlainText

func IsPlainText(mtype string) error

func ParseDuration

func ParseDuration(d string) time.Duration

func ParseNumber

func ParseNumber[N Number](num N, dig int) string

func ParseStamp

func ParseStamp(t string) time.Duration

func ParseStampDuration

func ParseStampDuration[N Number](t, b N) time.Duration

func ParseTimeAndBase

func ParseTimeAndBase(t, b string) time.Duration

func StringToFloat

func StringToFloat(t string) float64

Types

type Chapter

type Chapter struct {
	StartTime  Time
	EndTime    Time
	StartStamp dur.Timestamp
	EndStamp   dur.Timestamp
	ChapTitle  string
	Tags       map[string]string
}

func NewChapter

func NewChapter(chap ChapterMeta) *Chapter

func NewChapters

func NewChapters(chaps []ChapterMeta) []*Chapter

func (Chapter) End

func (ch Chapter) End() dur.Timestamp

func (*Chapter) SS

func (ch *Chapter) SS(ss string) *Chapter

func (Chapter) Start

func (ch Chapter) Start() dur.Timestamp

func (Chapter) Timebase

func (ch Chapter) Timebase() string

func (Chapter) Title

func (ch Chapter) Title() string

func (*Chapter) To

func (ch *Chapter) To(to string) *Chapter

type ChapterMeta

type ChapterMeta interface {
	Start() time.Duration
	End() time.Duration
	Title() string
}

type Media

type Media struct {
	fidi.File
	Filename string

	Tagz map[string]string

	Chaps []*Chapter

	Streamz  []Stream
	Input    fidi.File
	Output   fidi.File
	Ini      fidi.File
	Cue      fidi.File
	Cover    fidi.File
	HasCover bool
	// contains filtered or unexported fields
}

func NewMedia

func NewMedia() *Media

func (Media) Chapters

func (m Media) Chapters() []*Chapter

func (Media) GetTag

func (m Media) GetTag(key string) string

func (*Media) SetChapters

func (m *Media) SetChapters(chaps []*Chapter)

func (*Media) SetMeta

func (m *Media) SetMeta(meta Meta) *Media

func (Media) Streams

func (m Media) Streams() []map[string]string

func (Media) Tags

func (m Media) Tags() map[string]string

type Meta

type Meta interface {
	Chapters() []*Chapter
	Tags() map[string]string
	Streams() []map[string]string
}

type Metaz

type Metaz interface {
	Chapters() []ChapterMeta
	Tags() map[string]string
	Streams() []map[string]string
	Source() fidi.File
}

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

type Stream

type Stream struct {
	CodecType string
	CodecName string
	Index     string
	IsCover   bool
}

type Time

type Time struct {
	Dur time.Duration
	// contains filtered or unexported fields
}

func ParseString

func ParseString(t string) Time

func Timestamp

func Timestamp(d time.Duration) Time

func (Time) HHMMSS

func (c Time) HHMMSS() string

func (Time) MMSS

func (c Time) MMSS() string

func (Time) MS

func (c Time) MS() string

func (Time) Min

func (ch Time) Min() int

func (Time) String

func (c Time) String() string

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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