cmd

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathFromTemplate

func PathFromTemplate(template string, args ...any) string

Types

type ArtworkCmd

type ArtworkCmd struct {
	BaseCmd
	File string `arg:"" name:"file" type:"existingfile" help:"File to extract metadata from."`
	Out  string `flag:"" name:"out" help:"Output template for artwork files." default:"{name}_{key}{ext}"`
}

func (*ArtworkCmd) Run

func (c *ArtworkCmd) Run(ctx server.Cmd) error

type AudioChannelsCmd

type AudioChannelsCmd struct {
	BaseCmd
	schema.ListAudioChannelLayoutRequest
}

func (*AudioChannelsCmd) Run

func (c *AudioChannelsCmd) Run(ctx server.Cmd) error

type AudioSegmentCmd

type AudioSegmentCmd struct {
	BaseCmd
	File             string        `arg:"" name:"file" type:"existingfile" help:"File to segment."`
	Out              string        `flag:"" name:"out" help:"Output directory for encoded segment M4A files." default:"." type:"path"`
	Duration         time.Duration `flag:"" name:"duration" help:"Target segment duration (e.g. 30s). Use 0s to disable fixed-size splits."`
	Silence          bool          `flag:"" name:"silence" help:"Enable silence-based segmentation." negatable:"" default:"true"`
	SilenceDuration  time.Duration `` /* 150-byte string literal not displayed */
	SilenceThreshold float64       `` /* 157-byte string literal not displayed */
}

func (*AudioSegmentCmd) Run

func (c *AudioSegmentCmd) Run(ctx server.Cmd) error

type BaseCmd

type BaseCmd struct {
	ChromaprintKey string `name:"chromaprint-key" env:"CHROMAPRINT_KEY" help:"AcoustID API key for chromaprint lookups"`
}

func (*BaseCmd) IsJSONOutput

func (runner *BaseCmd) IsJSONOutput(ctx server.Cmd) (bool, int)

func (*BaseCmd) WithManager

func (runner *BaseCmd) WithManager(ctx server.Cmd, fn func(*manager.Media) error) error

type CapabilitiesCLICommands

type CapabilitiesCLICommands struct {
	AudioChannels AudioChannelsCmd `cmd:"" name:"audio-channels" help:"List audio channel layouts." group:"CAPABILITIES"`
	Codecs        CodecCmd         `cmd:"" name:"codecs" help:"List codecs." group:"CAPABILITIES"`
	Filters       FiltersCmd       `cmd:"" name:"filters" help:"List filters." group:"CAPABILITIES"`
	Formats       FormatsCmd       `cmd:"" name:"formats" help:"List formats and devices." group:"CAPABILITIES"`
	PixelFormats  PixelFormatsCmd  `cmd:"" name:"pixel-formats" help:"List pixel formats." group:"CAPABILITIES"`
	SampleFormats SampleFormatsCmd `cmd:"" name:"sample-formats" help:"List sample formats." group:"CAPABILITIES"`
}

type CodecCmd

type CodecCmd struct {
	BaseCmd
	schema.ListCodecRequest
}

func (*CodecCmd) Run

func (c *CodecCmd) Run(ctx server.Cmd) error

type EncodingCLICommands

type EncodingCLICommands struct {
	AudioSegment AudioSegmentCmd `cmd:"" name:"audio-segment" help:"Segment audio and log segments." group:"ENCODING"`
}

type FiltersCmd

type FiltersCmd struct {
	BaseCmd
	schema.ListFilterRequest
}

func (*FiltersCmd) Run

func (c *FiltersCmd) Run(ctx server.Cmd) error

type FormatsCmd

type FormatsCmd struct {
	BaseCmd
	schema.ListFormatRequest
}

func (*FormatsCmd) Run

func (c *FormatsCmd) Run(ctx server.Cmd) error

type MetadataCLICommands

type MetadataCLICommands struct {
	Metadata MetadataCmd `cmd:"" name:"metadata" help:"Extract metadata." group:"METADATA"`
	Artwork  ArtworkCmd  `cmd:"" name:"artwork" help:"Extract artwork." group:"METADATA"`
	Probe    ProbeCmd    `cmd:"" name:"probe" help:"Probe media file." group:"METADATA"`
	MetadataChromaprintCLICommands
}

type MetadataChromaprintCLICommands

type MetadataChromaprintCLICommands struct{}

MetadataChromaprintCLICommands is empty unless built with -tags chromaprint.

type MetadataCmd

type MetadataCmd struct {
	BaseCmd
	File      string `arg:"" name:"file" type:"existingfile" help:"File to extract metadata from."`
	Namespace string `flag:"" name:"namespace" help:"Namespace to extract." default:""`
	XMP       bool   `flag:"" name:"xmp" help:"Output metadata in XMP format." negatable:""`
}

func (*MetadataCmd) Run

func (c *MetadataCmd) Run(ctx server.Cmd) error

type PixelFormatsCmd

type PixelFormatsCmd struct {
	BaseCmd
	schema.ListPixelFormatRequest
}

func (*PixelFormatsCmd) Run

func (c *PixelFormatsCmd) Run(ctx server.Cmd) error

type ProbeCmd

type ProbeCmd struct {
	BaseCmd
	File string `arg:"" name:"file" type:"existingfile" help:"File to probe."`
	schema.ProbeRequest
}

func (*ProbeCmd) Run

func (c *ProbeCmd) Run(ctx server.Cmd) error

type SampleFormatsCmd

type SampleFormatsCmd struct {
	BaseCmd
	schema.ListSampleFormatRequest
}

func (*SampleFormatsCmd) Run

func (c *SampleFormatsCmd) Run(ctx server.Cmd) error

Jump to

Keyboard shortcuts

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