Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
osaajani committed Jan 10, 2025
1 parent 240ef3b commit bee6c14
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion moviepy/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def deprecated_func(*args, **kwargs):
"mp3": {"type": "audio", "codec": ["libmp3lame"]},
"wav": {"type": "audio", "codec": ["pcm_s16le", "pcm_s24le", "pcm_s32le"]},
"m4a": {"type": "audio", "codec": ["libfdk_aac"]},
"flac":{"type": "audio", "codec": ["flac"]}
"flac": {"type": "audio", "codec": ["flac"]},
}

for ext in ["jpg", "jpeg", "png", "bmp", "tiff"]:
Expand Down
10 changes: 7 additions & 3 deletions moviepy/video/io/ffmpeg_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ def __init__(
if audiofile is not None:
cmd.extend(["-i", audiofile, "-acodec", "copy"])

if (codec == "h264_nvenc") :
if codec == "h264_nvenc":
cmd.extend(["-c:v", codec])
else :
else:
cmd.extend(["-vcodec", codec])

cmd.extend(["-preset", preset])
Expand All @@ -141,7 +141,11 @@ def __init__(
if codec == "libvpx" and with_mask:
cmd.extend(["-pix_fmt", "yuva420p"])
cmd.extend(["-auto-alt-ref", "0"])
elif (codec == "libx264" or codec == "h264_nvenc") and (size[0] % 2 == 0) and (size[1] % 2 == 0):
elif (
(codec == "libx264" or codec == "h264_nvenc")
and (size[0] % 2 == 0)
and (size[1] % 2 == 0)
):
cmd.extend(["-pix_fmt", "yuva420p"])

cmd.extend([ffmpeg_escape_filename(filename)])
Expand Down

0 comments on commit bee6c14

Please sign in to comment.