Video editing with Python
Merge branch 'master' into fix-gpu-h264_nvenc
Pierre-Lin Bonnemaison240ef3b8a411
diff --cc moviepy/video/io/ffmpeg_writer.pyindex 5bd05fa6,1fe28401..7709b5f9--- a/moviepy/video/io/ffmpeg_writer.py+++ b/moviepy/video/io/ffmpeg_writer.py@@@ -136,10 -132,14 +137,14 @@@ class FFMPEG_VideoWriterif threads is not None:cmd.extend(["-threads", str(threads)])- if (codec == "libx264" or codec == "h264_nvenc") and (size[0] % 2 == 0) and (size[1] % 2 == 0):- cmd.extend(["-pix_fmt", "yuv420p"])+ # Disable auto alt ref for transparent webm and set pix format yo yuva420p+ if codec == "libvpx" and with_mask:+ cmd.extend(["-pix_fmt", "yuva420p"])+ cmd.extend(["-auto-alt-ref", "0"])- elif (codec == "libx264") 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([filename])+ cmd.extend([ffmpeg_escape_filename(filename)])popen_params = cross_platform_popen_params({"stdout": sp.DEVNULL, "stderr": logfile, "stdin": sp.PIPE}