ffmpeg

package
v0.0.0-...-8462f15 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2014 License: Apache-2.0 Imports: 7 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"`
	Filename    string            `json:"filename"`
	Format_name string            `json:"format_name"`
	Nb_sreams   int               `json:"nb_streams"`
	Size        int64             `json:"size,string"`
	Tags        map[string]string `json:"tags"`
}

type OutputFormat

type OutputFormat int
const (
	FormatWebM OutputFormat = iota
	FormatFLV  OutputFormat = iota + 1
)

type ProbeOutput

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

func (*ProbeOutput) AudioStreams

func (ffo *ProbeOutput) AudioStreams() (astrms []Stream)

func (*ProbeOutput) VideoStreams

func (ffo *ProbeOutput) VideoStreams() (vstrms []Stream)

type Prober

type Prober struct {
	// contains filtered or unexported fields
}

func NewProber

func NewProber(ffprobeExeName string) (*Prober, error)

func (*Prober) ProbeFile

func (p *Prober) ProbeFile(path string) (*ProbeOutput, error)

type Stream

type Stream struct {
	Codec_name string `json:"codec_name"`
	Codec_type string `json:"codec_type"`
	Width      int    `json:"width"`
	Height     int    `json:"height"`
}

type Transcoder

type Transcoder struct {
	// contains filtered or unexported fields
}

func NewTranscoder

func NewTranscoder(ffprobeExeName, ffmpegExeName string) (*Transcoder, error)

func NewTranscoderWithProber

func NewTranscoderWithProber(ffmpegExeName string, prober *Prober) (*Transcoder, error)

func (*Transcoder) TranscodeFile

func (s *Transcoder) TranscodeFile(filename string, format OutputFormat, offset, width, height, bitrate int) (ffStdOut io.Reader, ffStdErr io.Reader, err error)

Jump to

Keyboard shortcuts

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