From 8de8b1196f520382accc980953ae2f58641c49ea Mon Sep 17 00:00:00 2001 From: Jonathan Hadida Date: Sun, 2 Feb 2025 16:45:37 -0800 Subject: [PATCH] Propagate print_cmd to dependent functions and methods --- moviepy/video/VideoClip.py | 5 ++++- moviepy/video/io/ffmpeg_writer.py | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/moviepy/video/VideoClip.py b/moviepy/video/VideoClip.py index 0b22a6d56..5519e7445 100644 --- a/moviepy/video/VideoClip.py +++ b/moviepy/video/VideoClip.py @@ -226,6 +226,7 @@ def write_videofile( ffmpeg_params=None, logger="bar", pixel_format=None, + print_cmd=False, ): """Write the clip to a videofile. @@ -404,6 +405,7 @@ def write_videofile( ffmpeg_params=ffmpeg_params, logger=logger, pixel_format=pixel_format, + print_cmd=print_cmd, ) if remove_temp and make_audio: @@ -1867,7 +1869,8 @@ def __find_text_size( To summarize, the real height of the text is: ``initial padding + (lines - 1) * height + end padding`` or: - ``(ascent + stroke_width) + (lines - 1) * height + (descent + stroke_width)`` + ``(ascent + stroke_width) + (lines - 1) * height + + (descent + stroke_width)`` or: ``real_font_size + (stroke_width * 2) + (lines - 1) * height`` """ diff --git a/moviepy/video/io/ffmpeg_writer.py b/moviepy/video/io/ffmpeg_writer.py index b875783b4..b71d46203 100644 --- a/moviepy/video/io/ffmpeg_writer.py +++ b/moviepy/video/io/ffmpeg_writer.py @@ -259,6 +259,7 @@ def ffmpeg_write_video( ffmpeg_params=None, logger="bar", pixel_format=None, + print_cmd=False, ): """Write the clip to a videofile. See VideoClip.write_videofile for details on the parameters. @@ -288,6 +289,7 @@ def ffmpeg_write_video( threads=threads, ffmpeg_params=ffmpeg_params, pixel_format=pixel_format, + print_cmd=print_cmd, ) as writer: for t, frame in clip.iter_frames( logger=logger, with_times=True, fps=fps, dtype="uint8"