Versions in this module Expand all Collapse all v1 v1.0.0 Sep 4, 2024 Changes in this version + type ChanResult struct + Err error + OutFile string + type ClipResult struct + Err error + Index int + OutFile string + type ClipVideoTime struct + End int + Start int + Suffix string + type CodecArg struct + Args []string + AudioCodec string + VideoCodec string + type CompressVideo struct + Args []string + Crf string + Src string + type ConvertArgs struct + Dst string + Src string + type ConvertVideo struct + OutExt string + Src string + type CustomClipVideo struct + IsGen bool + IsMerge bool + Src string + VideoTimes []ClipVideoTime + type SFFmpeg struct + Driver string + EnvDir string + SaveDir string + func New(envDir ...string) *SFFmpeg + func (f *SFFmpeg) ArgsMapping() map[string][]string + func (f *SFFmpeg) AverageClipVideos(src string, avg int, isGens ...bool) ([]string, error) + func (f *SFFmpeg) BatchClipVideos(src string, second, totalDuration int, isGens ...bool) (clipUrls []string, err error) + func (f *SFFmpeg) BatchClipVideosBySecond(src string, second int, isGens ...bool) ([]string, error) + func (f *SFFmpeg) BatchCompressVideo(ctx context.Context, maxWorkers int, videos []CompressVideo) (outFiles []string, err error) + func (f *SFFmpeg) BatchConvertVideos(ctx context.Context, maxWorkers int, videos ...*ConvertVideo) (outFiles []string, err error) + func (f *SFFmpeg) ClipVideo(src string, start, end time.Time, suffix string, isGen bool) (outFile string, err error) + func (f *SFFmpeg) ClipVideos(src string, clipVideos []ClipVideoTime, isGens ...bool) (clipUrls []string, err error) + func (f *SFFmpeg) CompressCommandArgs(compressArg CompressVideo, outFile string) []string + func (f *SFFmpeg) CompressVideo(compressVideo CompressVideo) (outFile string, err error) + func (f *SFFmpeg) ConvertCommandArgs(ext string, otherArg ConvertArgs) []string + func (f *SFFmpeg) ConvertVideo(src, outExt string, codecArgs ...*CodecArg) (outFile string, err error) + func (f *SFFmpeg) CustomClipVideos(clipVideos ...*CustomClipVideo) error + func (f *SFFmpeg) Duration(src string) int + func (f *SFFmpeg) EnsureDir(dir string) error + func (f *SFFmpeg) Ext(dstFile string) string + func (f *SFFmpeg) IsFileExists(src string) bool + func (f *SFFmpeg) MergeVideo(files []string) (outFile string, err error) + func (f *SFFmpeg) SetSaveDir(dir string) *SFFmpeg + func (f *SFFmpeg) SrcDir(src string) (string, error)