ffprobe

package
v0.0.0-...-9a8baf0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2018 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Fferr when scanner return error
	Fferr = iota
	//Ffdone when process exited without err
	Ffdone
	//FframeUpdate is frame, encoding speed update line
	FframeUpdate
	//Ffother anything else
	Ffother
)

Variables

View Source
var Ffoutchan chan Ffoutmsg

Ffoutchan output lines from ffmpeg process

Functions

func GetLoggers

func GetLoggers() (*log.Logger, *log.Logger)

GetLoggers returns info and error logger

func GetVersion

func GetVersion() string

GetVersion returns ffmpeg version

func WriteUIOpts

func WriteUIOpts() error

WriteUIOpts saves ui selection options

Types

type Avtype

type Avtype int

Avtype is audio video type for streams

const (
	// Video type
	Video Avtype = iota
	// Audio type
	Audio
)

type Devices

type Devices struct {
	Audios []string
	Videos []string
}

Devices has information about ffmpeg multimedia devices

func GetFfmpegDevices

func GetFfmpegDevices(p ProberCommon) Devices

GetFfmpegDevices returns audio and video devices available

type Ffoutmsg

type Ffoutmsg struct {
	Typ Ffouttype
	Msg string
}

Ffoutmsg ffmpeg output line

type Ffouttype

type Ffouttype int

Ffouttype is line output type

type Options

type Options struct {
	UIInputs  []UIInput
	Framerate float64
	VidPath   string
}

Options for ffmpeg, saved/restored on encode start from WriteUIOpts()

type Prober

type Prober interface {
	// contains filtered or unexported methods
}

Prober has logic that changes based on platform

type ProberCommon

type ProberCommon struct {
	Devices
	// contains filtered or unexported fields
}

ProberCommon has all options; common and platform prober

func NewProber

func NewProber() ProberCommon

NewProber returns prober for correct platform

func (ProberCommon) GetPresets

func (pc ProberCommon) GetPresets(typ Avtype) (ps []string)

GetPresets returns available presets

func (*ProberCommon) KillEncode

func (p *ProberCommon) KillEncode()

KillEncode stop ffmpeg process

func (*ProberCommon) RmTmpFiles

func (p *ProberCommon) RmTmpFiles()

RmTmpFiles removes intermediate stage avfiles

func (ProberCommon) SetInputs

func (pc ProberCommon) SetInputs(uiips []UIInput, resumeCount int)

SetInputs to set configure input streams

func (*ProberCommon) StartEncode

func (p *ProberCommon) StartEncode()

StartEncode starts ffmpeg process with configured options

func (*ProberCommon) StartMux

func (p *ProberCommon) StartMux()

StartMux concats all resume split streams to single stream, and then avstreams to final container

type UIInput

type UIInput struct {
	Devidx    int
	Presetidx int
	Type      Avtype
}

UIInput has config from ui for each input stream

func GetInputs

func GetInputs() []UIInput

GetInputs gets

Jump to

Keyboard shortcuts

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