diff --git a/phi/tools/moviepy_video_tools.py b/phi/tools/moviepy_video_tools.py index 82c3bceff..1c420036c 100644 --- a/phi/tools/moviepy_video_tools.py +++ b/phi/tools/moviepy_video_tools.py @@ -247,6 +247,10 @@ def embed_captions( ) -> str: """Embed scrolling captions with word-level highlighting into video""" try: + # If no output path provided, create one based on input video + if output_path is None: + output_path = video_path.rsplit(".", 1)[0] + "_captioned.mp4" + # Load video video = VideoFileClip(video_path)