Skip to content

Commit

Permalink
Propagate print_cmd to dependent functions and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Hadida committed Feb 3, 2025
1 parent 1f0ba98 commit 8de8b11
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion moviepy/video/VideoClip.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ def write_videofile(
ffmpeg_params=None,
logger="bar",
pixel_format=None,
print_cmd=False,
):
"""Write the clip to a videofile.
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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``
"""
Expand Down
2 changes: 2 additions & 0 deletions moviepy/video/io/ffmpeg_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 8de8b11

Please sign in to comment.