Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

✨ feat: Add video transition effects (fadein, fadeout)

yyhhyyyyyy7a5b037ad863
diff --git a/app/services/utils/video_effects.py b/app/services/utils/video_effects.py
new file mode 100644
index 00000000..3022cfc0
--- /dev/null
+++ b/app/services/utils/video_effects.py
@@ -0,0 +1,11 @@
+from moviepy import Clip, vfx
+
+
+# FadeIn
+def fadein_transition(clip: Clip, t: float) -> Clip:
+ return clip.with_effects([vfx.FadeIn(t)])
+
+
+# FadeOut
+def fadeout_transition(clip: Clip, t: float) -> Clip:
+ return clip.with_effects([vfx.FadeOut(t)])