ffmpeg

package
v0.0.0-...-dda34da Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FFmpeg

type FFmpeg struct {
	Cmd     string
	Inputs  []*MediaFile
	Output  string
	Filters []*Filter
	// contains filtered or unexported fields
}

func Default

func Default() *FFmpeg

func (*FFmpeg) AddFilter

func (ff *FFmpeg) AddFilter(alias, content string, fls ...string) (f *Filter)

func (*FFmpeg) AddInput

func (ff *FFmpeg) AddInput(input *MediaFile)

func (*FFmpeg) Do

func (ff *FFmpeg) Do() (err error)

func (*FFmpeg) Exec

func (ff *FFmpeg) Exec(cmd string) error

func (*FFmpeg) SetOutputFile

func (ff *FFmpeg) SetOutputFile(output string)

type Filter

type Filter struct {
	Alias   string   // 别名
	Content string   // 参数
	Inputs  []string // 输入的流
}

滤镜

func (*Filter) S

func (f *Filter) S() string

type MediaFile

type MediaFile struct {
	StartTime string // 开始时间
	Duration  int    // 截取时长
	FileName  string // 文件位置
	// contains filtered or unexported fields
}

媒体文件

func (*MediaFile) A

func (m *MediaFile) A() string

获取音频流

func (*MediaFile) V

func (m *MediaFile) V() string

获取视频流

Jump to

Keyboard shortcuts

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