Formerly KrillinAI, VideoTranslation and Dubbing Tool for 120+ Languages. Open-source AI workspace for creators, powered by Codex. Video downloader, video translation, create videos, images, audios, and edits with Agents in one place. For your Social Media like YouTube, TikTok, Instagram, etc.
TypeScript agent-skillscodex-clideskop-appdubbingimage-generationlocalizationskillsttsvideo-editingvideo-generationvideo-transcriptionvideo-translation
update: update the error handle
catwithtudou9d7dc1d9ae20
diff --git a/internal/service/srt_embed.go b/internal/service/srt_embed.goindex a5148cab..d2d6504f 100644--- a/internal/service/srt_embed.go+++ b/internal/service/srt_embed.go@@ -5,7 +5,6 @@ import ("bytes""context""fmt"- "go.uber.org/zap""krillin-ai/internal/storage""krillin-ai/internal/types""krillin-ai/log"@@ -18,6 +17,8 @@ import ("strconv""strings""time"++ "go.uber.org/zap")func (s Service) embedSubtitles(ctx context.Context, stepParam *types.SubtitleTaskStepParam) error {@@ -25,6 +26,11 @@ func (s Service) embedSubtitles(ctx context.Context, stepParam *types.SubtitleTaif stepParam.EmbedSubtitleVideoType == "horizontal" || stepParam.EmbedSubtitleVideoType == "vertical" || stepParam.EmbedSubtitleVideoType == "all" {var width, height intwidth, height, err = getResolution(stepParam.InputVideoPath)+ if err != nil {+ log.GetLogger().Error("embedSubtitles getResolution error", zap.Any("step param", stepParam), zap.Error(err))+ return fmt.Errorf("embedSubtitles getResolution error: %w", err)+ }+// 横屏可以合成竖屏的,但竖屏暂时不支持合成横屏的if stepParam.EmbedSubtitleVideoType == "horizontal" || stepParam.EmbedSubtitleVideoType == "all" {if width < height {