cmd

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCommands added in v1.9.2

type ClientCommands struct {
	MetadataCommands
	EncoderCommands
}

type EncodeCmd added in v1.9.3

type EncodeCmd struct {
	Path   string `arg:"" name:"path" type:"existingfile" help:"Path to the media file to encode."`
	Format string `name:"format" required:"" help:"Output container format, e.g. \"mp4\", \"mkv\", \"webm\"."`
	Stream bool   `name:"stream" help:"Stream progress events until the encode finishes, instead of returning immediately."`

	AudioCodec         string `name:"audio-codec" help:"Audio codec to encode with, e.g. \"aac\". If unset, no audio stream is produced."`
	AudioBitrate       uint64 `name:"audio-bitrate" help:"Audio bitrate in bits per second."`
	AudioSampleRate    uint64 `name:"audio-sample-rate" help:"Audio sample rate in Hz."`
	AudioSampleFormat  string `name:"audio-sample-format" help:"Audio sample format, e.g. \"fltp\"."`
	AudioChannelLayout string `name:"audio-channel-layout" help:"Audio channel layout, e.g. \"stereo\"."`

	VideoCodec       string  `name:"video-codec" help:"Video codec to encode with, e.g. \"libx264\". If unset, no video stream is produced."`
	VideoBitrate     uint64  `name:"video-bitrate" help:"Video bitrate in bits per second."`
	VideoWidth       uint64  `name:"video-width" help:"Frame width in pixels."`
	VideoHeight      uint64  `name:"video-height" help:"Frame height in pixels."`
	VideoPixelFormat string  `name:"video-pixel-format" help:"Video pixel format, e.g. \"yuv420p\"."`
	VideoFrameRate   float64 `name:"video-frame-rate" help:"Frames per second."`

	SubtitleCodec string `name:"subtitle-codec" help:"Subtitle codec to encode with, e.g. \"mov_text\". If unset, no subtitle stream is produced."`
}

func (*EncodeCmd) Run added in v1.9.3

func (cmd *EncodeCmd) Run(ctx server.Cmd) error

type EncoderCommands added in v1.9.3

type EncoderCommands struct {
	Encode EncodeCmd `cmd:"" name:"encode" help:"Encode a media file into a new format." group:"ENCODER"`
}

type MetadataCmd

type MetadataCmd struct {
	Path string `arg:"" name:"path" type:"existingfile" help:"Path to the media file to extract metadata from."`
}

func (*MetadataCmd) Run

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

type MetadataCommands added in v1.9.2

type MetadataCommands struct {
	ProbeMedia  ProbeMediaCmd  `cmd:"" name:"probe-media" help:"Probe a media file and return its container format, streams, and metadata." group:"METADATA"`
	ProbeSource ProbeSourceCmd `` /* 128-byte string literal not displayed */
	Metadata    MetadataCmd    `cmd:"" name:"metadata" help:"Extract container-level metadata from a media file." group:"METADATA"`
}

type ProbeMediaCmd added in v1.9.2

type ProbeMediaCmd struct {
	Path   string   `arg:"" name:"path" type:"existingfile" help:"Path to the media file to probe."`
	Format string   `name:"format" help:"Input format name (e.g. mpegts)."`
	Opts   []string `name:"opts" help:"Input format options."`
}

func (*ProbeMediaCmd) Run added in v1.9.2

func (cmd *ProbeMediaCmd) Run(ctx server.Cmd) error

type ProbeSourceCmd added in v1.9.2

type ProbeSourceCmd struct {
	Url    string   `arg:"" name:"url" help:"URL to probe, e.g. \"https://example.com/sample.mp3\" or \"device://avfoundation/0:0\"."`
	Format string   `name:"format" help:"Input format name (e.g. mpegts)."`
	Opts   []string `name:"opts" help:"Input format options."`
}

func (*ProbeSourceCmd) Run added in v1.9.2

func (cmd *ProbeSourceCmd) Run(ctx server.Cmd) error

Jump to

Keyboard shortcuts

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