Documentation
¶
Index ¶
Constants ¶
View Source
const ( NameNotProvidedError = "name not provided for ffmpeg options" NotAllowedCodec = "codec is not in the allowed list" NotAllowedPreset = "video preset is not in the allowed list" NotAllowedTune = "vide tune is not in the allowed list" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cfg ¶
type Cfg struct {
FfmpegBin string
FfmpegOpts FfmpegOpts
InputFile string
OutputFile string
}
type FfmpegOpts ¶
type FfmpegOpts struct {
Threads int `attr:"-threads"`
VideoCodec string `attr:"-c:v"`
QualityCRF *int `attr:"-crf"`
QualityPreset string `attr:"-preset"`
QualityTune string `attr:"-tune"`
VideoScale int
VideoDuration time.Duration `attr:"-t"`
VideoStart time.Duration `attr:"-ss"`
Name string
// contains filtered or unexported fields
}
func NewFromInterface ¶
func NewFromInterface(in interface{}) (*FfmpegOpts, error)
NewFromInterface takes an interface, generated from a yaml loader, to generate an ffmpegOpts struct file
func (*FfmpegOpts) Args ¶
func (opts *FfmpegOpts) Args() ([]string, error)
func (*FfmpegOpts) VideoExt ¶
func (opts *FfmpegOpts) VideoExt() string
type Transcoder ¶
type Transcoder struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg *Cfg) (*Transcoder, error)
New() generates a single instance of a transcoding unit to be run once with a given configuration
func (*Transcoder) GetCmd ¶
func (tc *Transcoder) GetCmd() ([]string, error)
func (*Transcoder) GetOutputFile ¶
func (tc *Transcoder) GetOutputFile() string
func (*Transcoder) Run ¶
func (tc *Transcoder) Run() (string, error)
Click to show internal directories.
Click to hide internal directories.