Documentation ¶
Index ¶
- type ChanResult
- type ClipResult
- type ClipVideoTime
- type CodecArg
- type CompressVideo
- type ConvertArgs
- type ConvertVideo
- type CustomClipVideo
- type 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)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClipResult ¶
ClipResult 剪辑结果
type ClipVideoTime ¶
ClipVideoTime 剪辑视频时间属性
type CodecArg ¶
type CodecArg struct { VideoCodec string // 视频编码 AudioCodec string // 音频编码 Args []string // 其他命令参数 }
CodecArg 音视频编码
type CompressVideo ¶
CompressVideo 压缩视频
type ConvertArgs ¶
ConvertArgs 转换视频命令参数
type ConvertVideo ¶
ConvertVideo 转换视频
type CustomClipVideo ¶
type CustomClipVideo struct { Src string // 原视频路径 VideoTimes []ClipVideoTime // 剪辑视频时间格式 IsMerge bool // 是否合并:false否,true合并 IsGen bool // 是否重新生成文件:false直接返回原地址,true生成新的 }
CustomClipVideo 自定义视频剪辑
type SFFmpeg ¶
func (*SFFmpeg) ArgsMapping ¶
ArgsMapping 命令参数映射列表
func (*SFFmpeg) AverageClipVideos ¶
AverageClipVideos 按视频个数平均剪辑视频
func (*SFFmpeg) BatchClipVideos ¶
func (f *SFFmpeg) BatchClipVideos(src string, second, totalDuration int, isGens ...bool) (clipUrls []string, err error)
BatchClipVideos 批量剪辑视频
func (*SFFmpeg) BatchClipVideosBySecond ¶
BatchClipVideosBySecond 按间隔秒数批量剪辑视频
func (*SFFmpeg) BatchCompressVideo ¶
func (f *SFFmpeg) BatchCompressVideo(ctx context.Context, maxWorkers int, videos []CompressVideo) (outFiles []string, err error)
BatchCompressVideo 批量压缩视频
func (*SFFmpeg) BatchConvertVideos ¶
func (f *SFFmpeg) BatchConvertVideos(ctx context.Context, maxWorkers int, videos ...*ConvertVideo) (outFiles []string, err error)
BatchConvertVideos 批量转换视频
func (*SFFmpeg) ClipVideo ¶
func (f *SFFmpeg) ClipVideo(src string, start, end time.Time, suffix string, isGen bool) (outFile string, err error)
ClipVideo 剪辑视频
func (*SFFmpeg) ClipVideos ¶
func (f *SFFmpeg) ClipVideos(src string, clipVideos []ClipVideoTime, isGens ...bool) (clipUrls []string, err error)
ClipVideos 批量剪辑视频
func (*SFFmpeg) CompressCommandArgs ¶
func (f *SFFmpeg) CompressCommandArgs(compressArg CompressVideo, outFile string) []string
CompressCommandArgs 压缩命令参数
func (*SFFmpeg) CompressVideo ¶
func (f *SFFmpeg) CompressVideo(compressVideo CompressVideo) (outFile string, err error)
CompressVideo 压缩视频
func (*SFFmpeg) ConvertCommandArgs ¶
func (f *SFFmpeg) ConvertCommandArgs(ext string, otherArg ConvertArgs) []string
ConvertCommandArgs 转换视频命令大全
func (*SFFmpeg) ConvertVideo ¶
func (f *SFFmpeg) ConvertVideo(src, outExt string, codecArgs ...*CodecArg) (outFile string, err error)
ConvertVideo 转换视频格式
func (*SFFmpeg) CustomClipVideos ¶
func (f *SFFmpeg) CustomClipVideos(clipVideos ...*CustomClipVideo) error
CustomClipVideos 自定义剪辑视频列表
func (*SFFmpeg) IsFileExists ¶
IsFileExists 检查文件是否存在
func (*SFFmpeg) MergeVideo ¶
MergeVideo 合成视频
Click to show internal directories.
Click to hide internal directories.