Versions in this module Expand all Collapse all v1 v1.1.0 Jun 22, 2023 Changes in this version + var ErrInvalidInput = fmt.Errorf("input path is not valid") + var ErrInvalidOutput = fmt.Errorf("output path is not valid") type Encoder + func (e *Encoder) GetVideoContext(ctx context.Context, input, title string) (string, io.ReadCloser, error) + func (e *Encoder) SaveVideoContext(ctx context.Context, input, output, title string) (string, string, error) v1.0.1 Nov 1, 2020 v1.0.0 Feb 10, 2019 Changes in this version + var DefaultCaptureSize = int64(2500000) + var DefaultCaptureTime = 15 + var DefaultEncodeCRF = 21 + var DefaultFFmpegPath = "/usr/local/bin/ffmpeg" + var DefaultFrameHeight = 720 + var DefaultFrameRate = 5 + var DefaultFrameWidth = 1280 + var DefaultLevel = "3.0" + var DefaultProfile = "main" + var ErrorInvalidInput = errors.New("input path is not valid") + var ErrorInvalidOutput = errors.New("output path is not valid") + var MaximumCaptureSize = int64(104857600) + var MaximumCaptureTime = 1200 + var MaximumEncodeCRF = 30 + var MaximumFrameRate = 60 + var MaximumFrameSize = 5000 + var MinimumEncodeCRF = 16 + var MinimumFrameRate = 1 + var MinimumFrameSize = 100 + type Config struct + Audio bool + CRF int + Copy bool + FFMPEG string + Height int + Level string + Prof string + Rate int + Size int64 + Time int + Width int + type Encoder struct + func Get(config *Config) *Encoder + func (e *Encoder) Config() Config + func (e *Encoder) GetVideo(input, title string) (string, io.ReadCloser, error) + func (e *Encoder) SaveVideo(input, output, title string) (string, string, error) + func (e *Encoder) SetAudio(audio string) bool + func (e *Encoder) SetCRF(crf string) int + func (e *Encoder) SetHeight(height string) int + func (e *Encoder) SetLevel(level string) string + func (e *Encoder) SetProfile(profile string) string + func (e *Encoder) SetRate(rate string) int + func (e *Encoder) SetSize(size string) int64 + func (e *Encoder) SetTime(seconds string) int + func (e *Encoder) SetWidth(width string) int