media

package
v0.0.0-...-ed7e1dd Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAndTag

func ConvertAndTag(in Probe, tags t.Tags) (string, error)

func Fade

func Fade(in Probe, out string, up, down float64) error

func Trim

func Trim(in Probe, out string, start, stop float64) error

func TrimWithFade

func TrimWithFade(in Probe, out string, start, stop, up, down float64) error

func Watch

func Watch(path string)

Types

type FPrint

type FPrint struct {
	Duration    float64
	Fingerprint string
}

func Fingerprint

func Fingerprint(path string) (FPrint, error)

type Format

type Format struct {
	Path           string  `json:"filename"`
	Streams        int     `json:"nb_streams"`
	FormatName     string  `json:"format_name"`
	FormatLongName string  `json:"format_long_name"`
	StartTime      float64 `json:"start_time,string"`
	Duration       float64 `json:",string"`
	Size           int     `json:",string"`
	BitRate        int     `json:"bit_rate,string"`
	Score          int     `json:"probe_score"`
	Tags           tags.Tags
}

type IdError

type IdError struct {
	Code    int
	Message string
}

type IdResult

type IdResult struct {
	Id         uuid.UUID
	Score      float64
	Recordings []brainz.Recording
}

type IdResults

type IdResults struct {
	Status  string
	Results []IdResult
	Error   IdError
}

func LookupFingerprint

func LookupFingerprint(print FPrint) (IdResults, error)

type Probe

type Probe struct {
	Format  Format
	Streams []Stream
}

func ProbeFile

func ProbeFile(path string) Probe

func (Probe) FullTags

func (pr Probe) FullTags() tags.Tags

func (Probe) GetAudioCount

func (p Probe) GetAudioCount() int

func (Probe) GetAudioStreams

func (p Probe) GetAudioStreams() []*Stream

func (Probe) GetFirstAcceptableAudio

func (p Probe) GetFirstAcceptableAudio() *Stream

func (Probe) GetFirstAudio

func (p Probe) GetFirstAudio() *Stream

func (Probe) GetFirstPreferredAudio

func (p Probe) GetFirstPreferredAudio() *Stream

func (Probe) ShortPath

func (pr Probe) ShortPath() string

func (Probe) Title

func (pr Probe) Title() string

func (Probe) WantedAudioStream

func (pr Probe) WantedAudioStream() *Stream

type Stream

type Stream struct {
	Index         int
	CodecName     string `json:"codec_name"`
	CodecLongName string `json:"codec_long_name"`
	Profile       string
	CodecType     string `json:"codec_type"`
	CodecTag      string `json:"codec_tag_string"`
	Width         int
	Height        int
	StartTime     float64 `json:"start_time,string"`
	Duration      float64 `json:",string"`
	DurationTs    int     `json:"duration_ts"`
	Tags          tags.Tags
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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