video

package
v0.0.0-...-a8c716a Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWatermarkToVideo

func AddWatermarkToVideo(ctx context.Context, WatermarkPNGName, videoTitle, videoRawFileName string, videoId, actorId int64) error

AddWatermarkToVideo 添加水印逻辑

func ExtractVideoCover

func ExtractVideoCover(ctx context.Context, rawFileName, coverFileName string) error

ExtractVideoCover 提取视频封面

func GenerateAudioName

func GenerateAudioName(videoFileName string) string

GenerateAudioName 生成音频链接,此链接仅用于内部使用,不暴露给用户

func GenerateCoverName

func GenerateCoverName(actorId int64, title string, videoId int64) string

GenerateCoverName 生成视频封面名称

func GenerateFinalVideoName

func GenerateFinalVideoName(actorId int64, title string, videoId int64) string

GenerateFinalVideoName 最终暴露给用户的视频名称

func GenerateNameWatermark

func GenerateNameWatermark(actorId int64, Name string) string

GenerateNameWatermark 生成用户名水印图片

func GenerateRawVideoName

func GenerateRawVideoName(actorId int64, title string, videoId int64) string

GenerateRawVideoName 生成初始视频名称,此链接仅用于内部使用,暴露给用户的视频名称

func TextWatermark

func TextWatermark(ctx context.Context, fontFile, text string,
	fontSize, imgW, imgH, textX, textY int, DPI float64, actorId int64) (string, error)

TextWatermark 获取视频水印,fontFile为字体文件,水印的字体格式 [视频左上方] 短视频格式 fontSize: 40,imgW: 800,imgH: 60,textX: 10,textY: 50,DPI: 72

Types

This section is empty.

Jump to

Keyboard shortcuts

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