ffprobe

package
v0.0.0-...-e62810a Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format struct {
	Duration float64 `json:"duration,string"`
	BitRate  int     `json:"bit_rate,string"`
	Tags     Tags    `json:"tags"`
}

type ProbeResult

type ProbeResult struct {
	Format  Format   `json:"format"`
	Streams []Stream `json:"streams"`
}

func Probe

func Probe(path string) (*ProbeResult, error)

func (ProbeResult) TagValue

func (res ProbeResult) TagValue(name string) string

TagValue searches the given key name in all possible tags in the format and all streams.

func (ProbeResult) TagValueInt

func (res ProbeResult) TagValueInt(name string, orInt int) int

type Stream

type Stream struct {
	CodecName     string `json:"codec_name"`
	SampleRate    int    `json:"sample_rate,string"`
	Channels      int    `json:"channels"`
	ChannelLayout string `json:"channel_layout"`
	Tags          Tags   `json:"tags"`
}

type Tags

type Tags map[string]string

func (*Tags) UnmarshalJSON

func (tags *Tags) UnmarshalJSON(v []byte) error

Jump to

Keyboard shortcuts

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