ffprobe

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MPL-2.0 Imports: 10 Imported by: 15

Documentation

Overview

Package ffprobe wraps and interprets ffmpeg's ffprobe for Go.

Index

Constants

This section is empty.

Variables

View Source
var ExeNotFound = errors.New("ffprobe and avprobe not found in $PATH")

Functions

func AnyAsFloat64 added in v1.1.0

func AnyAsFloat64(a any) (float64, error)

Converts possible values in Info.

func AnyAsInt64 added in v1.1.0

func AnyAsInt64(a any) (int64, error)

Converts possible values in Info.

Types

type Cmd

type Cmd struct {
	Cmd  *exec.Cmd
	Done chan struct{}

	Info *Info
	Err  error
	// contains filtered or unexported fields
}

func Start

func Start(path string) (ret *Cmd, err error)

type Info

type Info struct {
	Format  map[string]interface{}
	Streams []map[string]interface{}
}

func Run

func Run(path string) (info *Info, err error)

Runs ffprobe or avprobe or similar on the given file path.

func (*Info) Bitrate

func (info *Info) Bitrate() (bitrate uint, err error)

returns res attributes for the raw stream

func (*Info) Duration

func (info *Info) Duration() (duration time.Duration, err error)

Jump to

Keyboard shortcuts

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