From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id wNqUEcyg1GNBywAAbAwnHQ (envelope-from ) for ; Sat, 28 Jan 2023 05:13:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id aEGvEMyg1GMKXwEAG6o9tA (envelope-from ) for ; Sat, 28 Jan 2023 05:13:00 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6C2E22C3A4 for ; Sat, 28 Jan 2023 05:12:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLcZl-00022V-PU; Fri, 27 Jan 2023 23:12:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLcZk-00022I-K7 for guix-devel@gnu.org; Fri, 27 Jan 2023 23:12:24 -0500 Received: from mx2.dismail.de ([159.69.191.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLcZf-0006kP-FQ for guix-devel@gnu.org; Fri, 27 Jan 2023 23:12:24 -0500 Received: from mx2.dismail.de (localhost [127.0.0.1]) by mx2.dismail.de (OpenSMTPD) with ESMTP id 7cec629c for ; Sat, 28 Jan 2023 05:12:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h= mime-version:date:content-type:content-transfer-encoding:from :message-id:subject:to; s=20190914; bh=dK+8AMm1LWdBEBF5wM3dMC9o2 62sbGxNf6kGHcJUDl8=; b=tULEUVdBVpx6YUUiBFIGs9/zgGbLcknqmYVF5zFXg wAOmd+gpzxNIYHtdvYaGeSjoObd2Ur778anck59yHu38OITCf9rnVfeMdvlq7Tjc kiGxkABjiC/G7Ku8rmwJvYZ/Qb4phpg/0cZCHsEuixg8qaRpbKt7Of1g1Ag4MWrn ei0dByNnQObjmiEXQLKAEpYOUZASGZbKUINiiHIF/ebDY5nbTrXEdACiA626v5Zw LUgQFOISba9PwznmW3opGO0EyMx3L3atwR8VVM3vhaIlTXCYbXzcXZtRhDAowDx1 kEfTMGyL/x8UGOL7fthLBZ468ICsdWe+Ch54lwhKSF5Pw== Received: from smtp1.dismail.de ( [10.240.26.11]) by mx2.dismail.de (OpenSMTPD) with ESMTP id d8f1fcf9 for ; Sat, 28 Jan 2023 05:12:13 +0100 (CET) Received: from smtp1.dismail.de (localhost [127.0.0.1]) by smtp1.dismail.de (OpenSMTPD) with ESMTP id 8c56cd91 for ; Sat, 28 Jan 2023 05:12:13 +0100 (CET) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 176fe2cd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Sat, 28 Jan 2023 05:12:12 +0100 (CET) MIME-Version: 1.0 Date: Sat, 28 Jan 2023 04:12:11 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: RainLoop/1.16.0a From: "jgart" Message-ID: Subject: debug moviepy with jgart To: guix-devel@gnu.org Received-SPF: pass client-ip=159.69.191.136; envelope-from=jgart@dismail.de; helo=mx2.dismail.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FILL_THIS_FORM=0.001, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674879180; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=OYRAAam6ELBR0Ku94mAQ5IAJa42KkhQD2xz7KtcjhPo=; b=VJl2bJ+Q4i6adpesABE5nYsdAKTAptXsGboVsgRDm4UWQKLyk3sF2tAY3M/6v4bHfbMU2H JpJbr/gDboOsKkql5+y5fj3xRlIEBvQuPdAKQBp+YH8gN7MElMHDIg3CaFemE7scpkl2zM 2uE+arzh6w5MEfKiRRV5xr6lfE5OV0Nm+iSpzT7BI7ofCFyiYMQn2Ksey9jv6tZx8Ah/Kd MjpzLvMtoAETSg0yKpiqBVQukHxZ+IVjNaLjDQVUlmb3Xbw0eyh0Umh9gPkIlKK2hER1LS Cdf8ic6eguzGBU4Ehe9twzcOUfo5QsNgamjAGu/i+exOfdjknDTN3PTwiALQHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=tULEUVdB; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674879180; a=rsa-sha256; cv=none; b=SNIxRlAGH64R6RsAdnHVz0IL6gZJ50o1uIRmtCxFT6sQaYi7gu71JhI+8WEqHNr21iZtL7 bMMbK3MeoP+nJX95Per9a/2jU8zAtFgPmAerHBTyVCNGXIkmo/F1pFV1I/EffXgum0nsrd gvFPaOe9O9QWH5KBjugJOMVeo5gYusxI7QbM1R9TEJnuvoxqUmtxmWQ3rqcOb8HXSX9JeM mf2LDjabCTZG6NiZmAXIWhSQ7jXGw2w/OoJlerQiAaCOQXBE05KILE+8/gaufnXFT/BiRE 15oLlQTYf7A2w234SvRSBPPKwvWMfI2WvWb5RnNQlgYH24RqByZ6lOhiUdbogw== X-Spam-Score: -6.04 X-Migadu-Spam-Score: -6.04 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=dismail.de header.s=20190914 header.b=tULEUVdB; dmarc=pass (policy=reject) header.from=dismail.de; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6C2E22C3A4 X-Migadu-Scanner: scn1.migadu.com X-TUID: gHAEF2iL3y9P Hi, I'm trying to get the tests to pass for a Guix package that I am writing = for moviepy. Any thoughts on how to resolve the below failures? I need to make some dir writeable? ``` starting phase `check' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D test session starts =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D platform linux -- Python 3.9.9, pytest-6.2.5, py-1.10.0, pluggy-0.13.1 --= /gnu/store/slsh0qjv5j68xda2bb6h8gsxwyi1j25a-python-wrapper-3.9.9/bin/pyt= hon cachedir: .pytest_cache hypothesis profile 'default' -> database=3DDirectoryBasedExampleDatabase(= '/tmp/guix-build-python-moviepy-1.0.3.drv-0/source/.hypothesis/examples') rootdir: /tmp/guix-build-python-moviepy-1.0.3.drv-0/source plugins: hypothesis-6.0.2, cov-3.0.0 collecting ... collected 110 items tests/test_AudioClips.py::test_audio_coreader PASSED = [ 0%] tests/test_AudioClips.py::test_audioclip PASSED = [ 1%] tests/test_AudioClips.py::test_audioclip_concat PASSED = [ 2%] tests/test_AudioClips.py::test_audioclip_with_file_concat PASSED = [ 3%] tests/test_AudioClips.py::test_audiofileclip_concat PASSED = [ 4%] tests/test_ImageSequenceClip.py::test_1 FAILED = [ 5%] tests/test_ImageSequenceClip.py::test_2 PASSED = [ 6%] tests/test_PR.py::test_PR_306 PASSED = [ 7%] tests/test_PR.py::test_PR_339 FAILED = [ 8%] tests/test_PR.py::test_PR_373 PASSED = [ 9%] tests/test_PR.py::test_PR_424 PASSED = [ 10%] tests/test_PR.py::test_PR_458 FAILED = [ 10%] tests/test_PR.py::test_PR_515 PASSED = [ 11%] tests/test_PR.py::test_PR_528 FAILED = [ 12%] tests/test_PR.py::test_PR_529 FAILED = [ 13%] tests/test_PR.py::test_PR_610 PASSED = [ 14%] tests/test_TextClip.py::test_fontlist PASSED = [ 15%] tests/test_TextClip.py::test_duration FAILED = [ 16%] tests/test_TextClip.py::test_if_textclip_crashes_in_caption_mode FAILED = [ 17%] tests/test_TextClip.py::test_if_textclip_crashes_in_label_mode FAILED = [ 18%] tests/test_VideoClip.py::test_check_codec PASSED = [ 19%] tests/test_VideoClip.py::test_save_frame PASSED = [ 20%] tests/test_VideoClip.py::test_write_image_sequence FAILED = [ 20%] tests/test_VideoClip.py::test_write_gif_imageio PASSED = [ 21%] tests/test_VideoClip.py::test_write_gif_ffmpeg PASSED = [ 22%] tests/test_VideoClip.py::test_write_gif_ffmpeg_tmpfiles PASSED = [ 23%] tests/test_VideoClip.py::test_write_gif_ImageMagick PASSED = [ 24%] tests/test_VideoClip.py::test_write_gif_ImageMagick_tmpfiles PASSED = [ 25%] tests/test_VideoClip.py::test_subfx FAILED = [ 26%] tests/test_VideoClip.py::test_oncolor FAILED = [ 27%] tests/test_VideoClip.py::test_setaudio FAILED = [ 28%] tests/test_VideoClip.py::test_setaudio_with_audiofile FAILED = [ 29%] tests/test_VideoClip.py::test_setopacity FAILED = [ 30%] tests/test_VideoClip.py::test_toimageclip FAILED = [ 30%] tests/test_VideoClip.py::test_withoutaudio PASSED = [ 31%] tests/test_VideoFileClip.py::test_setup FAILED = [ 32%] tests/test_VideoFileClip.py::test_ffmpeg_resizing PASSED = [ 33%] tests/test_VideoFileClip.py::test_shallow_copy PASSED = [ 34%] tests/test_Videos.py::test_afterimage FAILED = [ 35%] tests/test_compositing.py::test_clips_array PASSED = [ 36%] tests/test_compositing.py::test_clips_array_duration FAILED = [ 37%] tests/test_examples.py::test_matplotlib SKIPPED (no mpl) = [ 38%] tests/test_ffmpeg_reader.py::test_ffmpeg_parse_infos PASSED = [ 39%] tests/test_ffmpeg_reader.py::test_ffmpeg_parse_infos_for_i926 PASSED = [ 40%] tests/test_fx.py::test_blackwhite FAILED = [ 40%] tests/test_fx.py::test_colorx FAILED = [ 41%] tests/test_fx.py::test_crop FAILED = [ 42%] tests/test_fx.py::test_fadein FAILED = [ 43%] tests/test_fx.py::test_fadeout FAILED = [ 44%] tests/test_fx.py::test_invert_colors FAILED = [ 45%] tests/test_fx.py::test_loop PASSED = [ 46%] tests/test_fx.py::test_lum_contrast FAILED = [ 47%] tests/test_fx.py::test_make_loopable FAILED = [ 48%] tests/test_fx.py::test_margin FAILED = [ 49%] tests/test_fx.py::test_mask_and PASSED = [ 50%] tests/test_fx.py::test_mask_color PASSED = [ 50%] tests/test_fx.py::test_mask_or PASSED = [ 51%] tests/test_fx.py::test_mirror_x FAILED = [ 52%] tests/test_fx.py::test_mirror_y FAILED = [ 53%] tests/test_fx.py::test_painting PASSED = [ 54%] tests/test_fx.py::test_resize FAILED = [ 55%] tests/test_fx.py::test_rotate FAILED = [ 56%] tests/test_fx.py::test_scroll PASSED = [ 57%] tests/test_fx.py::test_speedx FAILED = [ 58%] tests/test_fx.py::test_supersample PASSED = [ 59%] tests/test_fx.py::test_time_mirror FAILED = [ 60%] tests/test_fx.py::test_time_symmetrize FAILED = [ 60%] tests/test_fx.py::test_normalize PASSED = [ 61%] tests/test_issues.py::test_issue_145 PASSED = [ 62%] tests/test_issues.py::test_issue_190 PASSED = [ 63%] tests/test_issues.py::test_issue_285 PASSED = [ 64%] tests/test_issues.py::test_issue_334 FAILED = [ 65%] tests/test_issues.py::test_issue_354 PASSED = [ 66%] tests/test_issues.py::test_issue_359 PASSED = [ 67%] tests/test_issues.py::test_issue_407 PASSED = [ 68%] tests/test_issues.py::test_issue_416 PASSED = [ 69%] tests/test_issues.py::test_issue_417 PASSED = [ 70%] tests/test_issues.py::test_issue_467 PASSED = [ 70%] tests/test_issues.py::test_issue_470 FAILED = [ 71%] tests/test_issues.py::test_issue_246 PASSED = [ 72%] tests/test_issues.py::test_issue_547 FAILED = [ 73%] tests/test_issues.py::test_issue_636 PASSED = [ 74%] tests/test_issues.py::test_issue_655 PASSED = [ 75%] tests/test_misc.py::test_cuts1 PASSED = [ 76%] tests/test_misc.py::test_subtitles FAILED = [ 77%] tests/test_misc.py::test_file_to_subtitles PASSED = [ 78%] tests/test_resourcerelease.py::test_release_of_file_via_close FAILED = [ 79%] tests/test_resourcereleasedemo.py::test_failure_to_release_file FAILED = [ 80%] tests/test_tools.py::test_find_extensions[libx264-mp4] PASSED = [ 80%] tests/test_tools.py::test_find_extensions[libmpeg4-mp4] PASSED = [ 81%] tests/test_tools.py::test_find_extensions[libtheora-ogv] PASSED = [ 82%] tests/test_tools.py::test_find_extensions[libvpx-webm] PASSED=20=20=20 = [ 83%] tests/test_tools.py::test_find_extensions_not_found PASSED = [ 84%] tests/test_tools.py::test_cvsecs[15.4-15.4] PASSED = [ 85%] tests/test_tools.py::test_cvsecs[given1-81.5] PASSED = [ 86%] tests/test_tools.py::test_cvsecs[given2-3662] PASSED = [ 87%] tests/test_tools.py::test_cvsecs[given3-3662] PASSED = [ 88%] tests/test_tools.py::test_cvsecs[01:01:33.5-3693.5] PASSED = [ 89%] tests/test_tools.py::test_cvsecs[01:01:33.045-3693.045] PASSED = [ 90%] tests/test_tools.py::test_cvsecs[01:01:33,5-3693.5] PASSED = [ 90%] tests/test_tools.py::test_cvsecs[1:33-93.0] PASSED = [ 91%] tests/test_tools.py::test_cvsecs[33.4-33.4] PASSED = [ 92%] tests/test_tools.py::test_cvsecs[None-None] PASSED = [ 93%] tests/test_tools.py::test_is_string[hello straight string-True] PASSED = [ 94%] tests/test_tools.py::test_is_string[hello raw string-True] PASSED = [ 95%] tests/test_tools.py::test_is_string[42-False] PASSED = [ 96%] tests/test_tools.py::test_is_string[True-False] PASSED = [ 97%] tests/test_tools.py::test_is_string[hello bytes-False] PASSED = [ 98%] tests/test_tools.py::test_sys_write_flush FAILED = [ 99%] tests/test_videotools.py::test_credits FAILED = [100%] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILURES =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D ____________________________________ test_1 _____________________________= _______ def test_1(): images=3D[] durations=3D[] =20=20=20=20 =20 for i in range(5): durations.append(i) images.append("media/python_logo.png") durations.append(i) images.append("media/python_logo_upside_down.png") =20=20=20=20 =20 with ImageSequenceClip(images, durations=3Ddurations) as clip: assert clip.duration =3D=3D sum(durations) > clip.write_videofile(os.path.join(TMP_DIR, "ImageSequenceClip= 1.mp4"), fps=3D30) tests/test_ImageSequenceClip.py:25:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/ImageSequenceCli= p1.mp4' size =3D (260, 77), fps =3D None, codec =3D 'libx264', audiofile =3D None preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/Image= SequenceClip1.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/ImageS= equenceClip1.mp4 _________________________________ test_PR_339 ___________________________= _______ self =3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpripxn2wv.txt' filename =3D None, size =3D ('640', '480'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D 25, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'caption', kerning = =3D None align =3D 'center', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpq8n3akh7.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpripxn2wv.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: > subprocess_call(cmd, logger=3DNone) moviepy/video/VideoClip.py:1137:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 cmd=20=3D ['convert', '-background', 'transparent', '-fill', 'white', '-f= ont', ...] logger =3D errorprint =3D True def subprocess_call(cmd, logger=3D'bar', errorprint=3DTrue): """ Executes the given subprocess command. =20=20=20=20 =20 Set logger to None or a custom Proglog logger to avoid printing= s. """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Running:\n>>> "+ " ".join(cmd)') =20=20=20=20 =20 popen_params =3D {"stdout": DEVNULL, "stderr": sp.PIPE, "stdin": DEVNULL} =20=20=20=20 =20 if os.name =3D=3D "nt": popen_params["creationflags"] =3D 0x08000000 =20=20=20=20 =20 proc =3D sp.Popen(cmd, **popen_params) =20=20=20=20 =20 out, err =3D proc.communicate() # proc.wait() proc.stderr.close() =20=20=20=20 =20 if proc.returncode: if errorprint: logger(message=3D'Moviepy - Command returned an error') > raise IOError(err.decode('utf8')) E OSError: Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmpq8n3akh7.png' @ error/convert.c/ConvertImageCommand/32= 29. moviepy/tools.py:54: OSError During handling of the above exception, another exception occurred: def test_PR_339(): # In caption mode. > TextClip(txt=3D'foo', color=3D'white', font=3DFONT, size=3D(640, = 480), method=3D'caption', align=3D'center', fontsize=3D25).clo= se() tests/test_PR.py:29:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 self=20=3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpripxn2wv.txt' filename =3D None, size =3D ('640', '480'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D 25, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'caption', kerning = =3D None align =3D 'center', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpq8n3akh7.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpripxn2wv.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: subprocess_call(cmd, logger=3DNone) except (IOError, OSError) as err: error =3D ("MoviePy Error: creation of %s failed because of t= he " "following error:\n\n%s.\n\n." % (filename, str(err)= ) + ("This error can be due to the fact that ImageMagi= ck " "is not installed on your computer, or (for Windo= ws " "users) that you didn't specify the path to the " "ImageMagick binary in file conf.py, or that the = path " "you specified is incorrect")) > raise IOError(error) E OSError: MoviePy Error: creation of None failed because of th= e following error: E=20=20=20=20=20=20=20=20=20=20=20 E=20 Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmpq8n3akh7.png' @ error/convert.c/ConvertImageCommand/32= 29. E . E=20=20=20=20=20=20=20=20=20=20=20 E=20 .This error can be due to the fact that ImageMagick is not = installed on your computer, or (for Windows users) that you didn't specif= y the path to the ImageMagick binary in file conf.py, or that the path yo= u specified is incorrect moviepy/video/VideoClip.py:1146: OSError _________________________________ test_PR_458 ___________________________= _______ def test_PR_458(): clip =3D ColorClip([1000, 600], color=3D(60, 60, 60), duration=3D= 2) > clip.write_videofile(os.path.join(TMP_DIR, "test.mp4"), logger=3DNone, fps=3D30) tests/test_PR.py:83:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/test.mp4' size =3D (1000, 600), fps =3D None, codec =3D 'libx264', audiofile =3D No= ne preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test.= mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test.m= p4 _________________________________ test_PR_528 ___________________________= _______ def test_PR_528(): with ImageClip("media/vacation_2017.jpg") as clip: new_clip =3D scroll(clip, w=3D1000, x_speed=3D50) new_clip =3D new_clip.set_duration(1) new_clip.fps =3D 24 > new_clip.write_videofile(os.path.join(TMP_DIR, "pano.mp4")) tests/test_PR.py:100:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/pano.mp4' size =3D (1000, 1440), fps =3D None, codec =3D 'libx264', audiofile =3D N= one preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/pano.= mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/pano.m= p4 _________________________________ test_PR_529 ___________________________= _______ def test_PR_529(): with VideoFileClip("media/fire2.mp4") as video_clip: > assert video_clip.rotation =3D=3D 180 E assert 0 =3D=3D 180 E +0 E -180 tests/test_PR.py:105: AssertionError ________________________________ test_duration __________________________= _______ self =3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmph8fz26j0.txt' filename =3D None, size =3D ('1280', '720'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D None, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'label', kerning = =3D None align =3D 'center', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpjw_2n7ak.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmph8fz26j0.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: > subprocess_call(cmd, logger=3DNone) moviepy/video/VideoClip.py:1137:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 cmd=20=3D ['convert', '-background', 'transparent', '-fill', 'white', '-f= ont', ...] logger =3D errorprint =3D True def subprocess_call(cmd, logger=3D'bar', errorprint=3DTrue): """ Executes the given subprocess command. =20=20=20=20 =20 Set logger to None or a custom Proglog logger to avoid printing= s. """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Running:\n>>> "+ " ".join(cmd)') =20=20=20=20 =20 popen_params =3D {"stdout": DEVNULL, "stderr": sp.PIPE, "stdin": DEVNULL} =20=20=20=20 =20 if os.name =3D=3D "nt": popen_params["creationflags"] =3D 0x08000000 =20=20=20=20 =20 proc =3D sp.Popen(cmd, **popen_params) =20=20=20=20 =20 out, err =3D proc.communicate() # proc.wait() proc.stderr.close() =20=20=20=20 if proc.returncode: if errorprint: logger(message=3D'Moviepy - Command returned an error') > raise IOError(err.decode('utf8')) E OSError: Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmpjw_2n7ak.png' @ error/convert.c/ConvertImageCommand/32= 29. moviepy/tools.py:54: OSError During handling of the above exception, another exception occurred: def test_duration(): > clip =3D TextClip('hello world', size=3D(1280,720), color=3D'whit= e', font=3DFONT) tests/test_TextClip.py:17:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 self=20=3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmph8fz26j0.txt' filename =3D None, size =3D ('1280', '720'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D None, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'label', kerning = =3D None align =3D 'center', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpjw_2n7ak.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmph8fz26j0.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: subprocess_call(cmd, logger=3DNone) except (IOError, OSError) as err: error =3D ("MoviePy Error: creation of %s failed because of t= he " "following error:\n\n%s.\n\n." % (filename, str(err)= ) + ("This error can be due to the fact that ImageMagi= ck " "is not installed on your computer, or (for Windo= ws " "users) that you didn't specify the path to the " "ImageMagick binary in file conf.py, or that the = path " "you specified is incorrect")) > raise IOError(error) E OSError: MoviePy Error: creation of None failed because of th= e following error: E=20=20=20=20=20=20=20=20=20=20=20 E=20 Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmpjw_2n7ak.png' @ error/convert.c/ConvertImageCommand/32= 29. E . E=20=20=20=20=20=20=20=20=20=20=20 E=20 .This error can be due to the fact that ImageMagick is not = installed on your computer, or (for Windows users) that you didn't specif= y the path to the ImageMagick binary in file conf.py, or that the path yo= u specified is incorrect moviepy/video/VideoClip.py:1146: OSError ___________________ test_if_textclip_crashes_in_caption_mode ____________= _______ self =3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpc6fdb_w4.txt' filename =3D None, size =3D ('640', '480'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D 25, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'caption', kerning = =3D None align =3D 'center', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmp0grf_n_r.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpc6fdb_w4.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: > subprocess_call(cmd, logger=3DNone) moviepy/video/VideoClip.py:1137:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 cmd=20=3D ['convert', '-background', 'transparent', '-fill', 'white', '-f= ont', ...] logger =3D errorprint =3D True def subprocess_call(cmd, logger=3D'bar', errorprint=3DTrue): """ Executes the given subprocess command. =20=20=20=20 =20=20=20=20=20=20=20 Set logger to None or a custom Proglog logger to av= oid printings. """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Running:\n>>> "+ " ".join(cmd)') =20=20=20=20 =20 popen_params =3D {"stdout": DEVNULL, "stderr": sp.PIPE, "stdin": DEVNULL} =20=20=20=20 =20 if os.name =3D=3D "nt": popen_params["creationflags"] =3D 0x08000000 =20=20=20=20 =20 proc =3D sp.Popen(cmd, **popen_params) =20=20=20=20 =20 out, err =3D proc.communicate() # proc.wait() proc.stderr.close() =20=20=20=20 =20 if proc.returncode: if errorprint: logger(message=3D'Moviepy - Command returned an error') > raise IOError(err.decode('utf8')) E OSError: Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmp0grf_n_r.png' @ error/convert.c/ConvertImageCommand/32= 29. moviepy/tools.py:54: OSError During handling of the above exception, another exception occurred: def test_if_textclip_crashes_in_caption_mode(): > TextClip(txt=3D'foo', color=3D'white', size=3D(640, 480), method= =3D'caption', align=3D'center', fontsize=3D25, font=3DFONT).close() tests/test_TextClip.py:30:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 self=20=3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpc6fdb_w4.txt' filename =3D None, size =3D ('640', '480'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D 25, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'caption', kerning = =3D None align =3D 'center', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmp0grf_n_r.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpc6fdb_w4.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: subprocess_call(cmd, logger=3DNone) except (IOError, OSError) as err: error =3D ("MoviePy Error: creation of %s failed because of t= he " "following error:\n\n%s.\n\n." % (filename, str(err)= ) + ("This error can be due to the fact that ImageMagi= ck " "is not installed on your computer, or (for Windo= ws " "users) that you didn't specify the path to the " "ImageMagick binary in file conf.py, or that the = path " "you specified is incorrect")) > raise IOError(error) E OSError: MoviePy Error: creation of None failed because of th= e following error: E=20=20=20=20=20=20=20=20=20=20=20 E=20 Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmp0grf_n_r.png' @ error/convert.c/ConvertImageCommand/32= 29. E . E=20=20=20=20=20=20=20=20=20=20=20 E=20 .This error can be due to the fact that ImageMagick is not = installed on your computer, or (for Windows users) that you didn't specif= y the path to the ImageMagick binary in file conf.py, or that the path yo= u specified is incorrect moviepy/video/VideoClip.py:1146: OSError ____________________ test_if_textclip_crashes_in_label_mode _____________= _______ self =3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmp3x1bwzic.txt' filename =3D None, size =3D None, color =3D 'black', bg_color =3D 'transp= arent' fontsize =3D None, font =3D 'Liberation-Mono', stroke_color =3D None, str= oke_width =3D 1 method =3D 'label', kerning =3D None, align =3D 'center', interline =3D N= one tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpx7deezx3.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmp3x1bwzic.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: > subprocess_call(cmd, logger=3DNone) moviepy/video/VideoClip.py:1137:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 cmd=20=3D ['convert', '-background', 'transparent', '-fill', 'black', '-f= ont', ...] logger =3D errorprint =3D True def subprocess_call(cmd, logger=3D'bar', errorprint=3DTrue): """ Executes the given subprocess command. =20=20=20=20 =20 Set logger to None or a custom Proglog logger to avoid printing= s. """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Running:\n>>> "+ " ".join(cmd)') =20=20=20=20 =20 popen_params =3D {"stdout": DEVNULL, "stderr": sp.PIPE, "stdin": DEVNULL} =20=20=20=20 =20 if os.name =3D=3D "nt": popen_params["creationflags"] =3D 0x08000000 =20=20=20=20 =20 proc =3D sp.Popen(cmd, **popen_params) =20=20=20=20 =20 out, err =3D proc.communicate() # proc.wait() proc.stderr.close() =20=20=20=20 =20 if proc.returncode: if errorprint: logger(message=3D'Moviepy - Command returned an error') > raise IOError(err.decode('utf8')) E OSError: Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmpx7deezx3.png' @ error/convert.c/ConvertImageCommand/32= 29. moviepy/tools.py:54: OSError During handling of the above exception, another exception occurred: def test_if_textclip_crashes_in_label_mode(): > TextClip(txt=3D'foo', method=3D'label', font=3DFONT).close() tests/test_TextClip.py:35:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 self=20=3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmp3x1bwzic.txt' filename =3D None, size =3D None, color =3D 'black', bg_color =3D 'transp= arent' fontsize =3D None, font =3D 'Liberation-Mono', stroke_color =3D None, str= oke_width =3D 1 method =3D 'label', kerning =3D None, align =3D 'center', interline =3D N= one tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpx7deezx3.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmp3x1bwzic.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: subprocess_call(cmd, logger=3DNone) except (IOError, OSError) as err: error =3D ("MoviePy Error: creation of %s failed because of t= he " "following error:\n\n%s.\n\n." % (filename, str(err)= ) + ("This error can be due to the fact that ImageMagi= ck " "is not installed on your computer, or (for Windo= ws " "users) that you didn't specify the path to the " "ImageMagick binary in file conf.py, or that the = path " "you specified is incorrect")) > raise IOError(error) E OSError: MoviePy Error: creation of None failed because of th= e following error: E=20=20=20=20=20=20=20=20=20=20=20 E=20 Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmpx7deezx3.png' @ error/convert.c/ConvertImageCommand/32= 29. E . E=20=20=20=20=20=20=20=20=20=20=20 E=20 .This error can be due to the fact that ImageMagick is not = installed on your computer, or (for Windows users) that you didn't specif= y the path to the ImageMagick binary in file conf.py, or that the path yo= u specified is incorrect moviepy/video/VideoClip.py:1146: OSError __________________________ test_write_image_sequence ____________________= _______ def test_write_image_sequence(): clip =3D VideoFileClip("media/big_buck_bunny_432_433.webm").subcl= ip(0.2, 0.5) > locations =3D clip.write_images_sequence( os.path.join(TMP_DIR, "frame%02d.png")) tests/test_VideoClip.py:38:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D nameformat =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/frame%02d.png' fps =3D None, verbose =3D True, withmask =3D True logger =3D @requires_duration @use_clip_fps_by_default @convert_masks_to_RGB def write_images_sequence(self, nameformat, fps=3DNone, verbose=3DTru= e, withmask=3DTrue, logger=3D'bar'): """ Writes the videoclip to a sequence of image files. =20=20=20=20 =20 Parameters ----------- =20=20=20=20 =20 nameformat A filename specifying the numerotation format and extension of the pictures. For instance "frame%03d.png" for filenames indexed with 3 digits and PNG format. Also possible: "some_folder/frame%04d.jpeg", etc. =20=20=20=20 =20 fps Number of frames per second to consider when writing the clip. If not specified, the clip's ``fps`` attribute will be used if it has one. =20=20=20=20 =20 withmask will save the clip's mask (if any) as an alpha canal (PNGs only= ). =20=20=20=20 =20 verbose Boolean indicating whether to print information. =20=20=20=20 =20 logger Either 'bar' (progress bar) or None or any Proglog logger. =20=20=20=20 =20=20=20=20 =20 Returns -------- =20=20=20=20 =20 names_list A list of all the files generated. =20=20=20=20 =20 Notes ------ =20=20=20=20 =20 The resulting image sequence can be read using e.g. the class ``ImageSequenceClip``. =20=20=20=20 =20 """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Writing frames %s.' % nameformat) =20=20=20=20 >=20 tt =3D np.arange(0, self.duration, 1.0 / fps) E TypeError: unsupported operand type(s) for /: 'float' and 'NoneTy= pe' moviepy/video/VideoClip.py:361: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Writing frames /tmp/guix-build-python-moviepy-1.0.3.drv-0/frame= %02d.png. __________________________________ test_subfx ___________________________= _______ def test_subfx(): clip =3D VideoFileClip("media/big_buck_bunny_0_30.webm").subclip(= 0, 1) transform =3D lambda c: speedx(c, 0.5) new_clip =3D clip.subfx(transform, 0.5, 0.8) location =3D os.path.join(TMP_DIR, "subfx.mp4") > new_clip.write_videofile(location) tests/test_VideoClip.py:91:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/subfx.mp4' size =3D (1280, 720), fps =3D None, codec =3D 'libx264' audiofile =3D 'subfxTEMP_MPY_wvf_snd.mp3', preset =3D 'medium', bitrate = =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/subfx= .mp4. MoviePy - Writing audio in subfxTEMP_MPY_wvf_snd.mp3 MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/subfx.= mp4 ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 _________________________________=20test_oncolor ________________________= _________ def test_oncolor(): # It doesn't need to be a ColorClip clip =3D ColorClip(size=3D(100, 60), color=3D(255, 0, 0), duratio= n=3D0.5) on_color_clip =3D clip.on_color(size=3D(200, 160), color=3D(0, 0,= 255)) location =3D os.path.join(TMP_DIR, "oncolor.mp4") > on_color_clip.write_videofile(location, fps=3D24) tests/test_VideoClip.py:101:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/oncolor.mp4' size =3D (200, 160), fps =3D None, codec =3D 'libx264', audiofile =3D Non= e preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/oncol= or.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/oncolo= r.mp4 ________________________________ test_setaudio __________________________= _______ def test_setaudio(): clip =3D ColorClip(size=3D(100, 60), color=3D(255, 0, 0), duratio= n=3D0.5) make_frame_440 =3D lambda t: [sin(440 * 2 * pi * t)] audio =3D AudioClip(make_frame_440, duration=3D0.5) audio.fps =3D 44100 clip =3D clip.set_audio(audio) location =3D os.path.join(TMP_DIR, "setaudio.mp4") > clip.write_videofile(location, fps=3D24) tests/test_VideoClip.py:113:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/setaudio.mp4' size =3D (100, 60), fps =3D None, codec =3D 'libx264' audiofile =3D 'setaudioTEMP_MPY_wvf_snd.mp3', preset =3D 'medium', bitrat= e =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/setau= dio.mp4. MoviePy - Writing audio in setaudioTEMP_MPY_wvf_snd.mp3 MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/setaud= io.mp4 ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________=20test_setaudio_with_audiofile ________________= _________ def test_setaudio_with_audiofile(): clip =3D ColorClip(size=3D(100, 60), color=3D(255, 0, 0), duratio= n=3D0.5) audio =3D AudioFileClip("media/crunching.mp3").subclip(0, 0.5) clip =3D clip.set_audio(audio) location =3D os.path.join(TMP_DIR, "setaudiofile.mp4") > clip.write_videofile(location, fps=3D24) tests/test_VideoClip.py:123:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/setaudiofile.mp4= ' size =3D (100, 60), fps =3D None, codec =3D 'libx264' audiofile =3D 'setaudiofileTEMP_MPY_wvf_snd.mp3', preset =3D 'medium' bitrate =3D None, withmask =3D False, logfile =3D -1, threads =3D None ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/setau= diofile.mp4. MoviePy - Writing audio in setaudiofileTEMP_MPY_wvf_snd.mp3 MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/setaud= iofile.mp4 ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 _______________________________=20test_setopacity _______________________= _________ def test_setopacity(): clip =3D VideoFileClip("media/big_buck_bunny_432_433.webm").subcl= ip(0.2, 0.6) clip =3D clip.set_opacity(0.5) clip =3D clip.on_color(size=3D(1000, 1000), color=3D(0, 0, 255), = col_opacity=3D0.8) location =3D os.path.join(TMP_DIR, "setopacity.mp4") > clip.write_videofile(location) tests/test_VideoClip.py:133:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/setopacity.mp4' size =3D (1000, 1000), fps =3D None, codec =3D 'libx264' audiofile =3D 'setopacityTEMP_MPY_wvf_snd.mp3', preset =3D 'medium', bitr= ate =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/setop= acity.mp4. MoviePy - Writing audio in setopacityTEMP_MPY_wvf_snd.mp3 MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/setopa= city.mp4 ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _______________________________=20test_toimageclip ______________________= _________ def test_toimageclip(): clip =3D VideoFileClip("media/big_buck_bunny_432_433.webm").subcl= ip(0.2, 0.6) clip =3D clip.to_ImageClip(t=3D0.1, duration=3D0.4) location =3D os.path.join(TMP_DIR, "toimageclip.mp4") > clip.write_videofile(location, fps=3D24) tests/test_VideoClip.py:142:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/toimageclip.mp4' size =3D (1280, 720), fps =3D None, codec =3D 'libx264', audiofile =3D No= ne preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/toima= geclip.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/toimag= eclip.mp4 __________________________________ test_setup ___________________________= _______ def test_setup(): """Test VideoFileClip setup.""" red =3D ColorClip((256,200), color=3D(255,0,0)) green =3D ColorClip((256,200), color=3D(0,255,0)) blue =3D ColorClip((256,200), color=3D(0,0,255)) =20=20=20=20 =20 red.fps =3D green.fps =3D blue.fps =3D 10 with clips_array([[red, green, blue]]).set_duration(5) as video: > video.write_videofile(os.path.join(TMP_DIR, "test.mp4")) tests/test_VideoFileClip.py:24:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/test.mp4' size =3D (768, 200), fps =3D None, codec =3D 'libx264', audiofile =3D Non= e preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test.= mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test.m= p4 _______________________________ test_afterimage _________________________= _______ def test_afterimage(): ai =3D ImageClip("media/afterimage.png") masked_clip =3D mask_color(ai, color=3D[0,255,1]) # for green some_background_clip =3D ColorClip((800,600), color=3D(255,255,25= 5)) final_clip =3D CompositeVideoClip([some_background_clip, masked_c= lip], use_bgclip=3DTrue) final_clip.duration =3D 5 > final_clip.write_videofile( os.path.join(TMP_DIR, "afterimage.mp4"), fps=3D30) tests/test_Videos.py:22:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/afterimage.mp4' size =3D (800, 600), fps =3D None, codec =3D 'libx264', audiofile =3D Non= e preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/after= image.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/afteri= mage.mp4 __________________________ test_clips_array_duration ____________________= _______ def test_clips_array_duration(): # NOTE: anyone knows what behaviour this sets ? If yes please rep= lace # this comment. red =3D ColorClip((256, 200), color=3D(255, 0, 0)) green =3D ColorClip((256, 200), color=3D(0, 255, 0)) blue =3D ColorClip((256, 200), color=3D(0, 0, 255)) =20=20=20=20 =20 video =3D clips_array([[red, green, blue]]).set_duration(5) with pytest.raises(AttributeError): # fps not set > video.write_videofile(join(TMP_DIR, "test_clips_array.mp4")) tests/test_compositing.py:36:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/test_clips_array= .mp4' size =3D (768, 200), fps =3D None, codec =3D 'libx264', audiofile =3D Non= e preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test_= clips_array.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test_c= lips_array.mp4 _______________________________ test_blackwhite _________________________= _______ def test_blackwhite(): clip =3D get_test_video() clip1 =3D blackwhite(clip) > clip1.write_videofile(os.path.join(TMP_DIR, "blackwhite1.webm")) tests/test_fx.py:39:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/blackwhite1.webm= ' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'blackwhite1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bit= rate =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/black= white1.webm. MoviePy - Writing audio in blackwhite1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/blackw= hite1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_colorx _________________________= _________ def test_colorx(): clip =3D get_test_video() clip1 =3D colorx(clip, 2) > clip1.write_videofile(os.path.join(TMP_DIR, "colorx1.webm")) tests/test_fx.py:52:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/colorx1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'colorx1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate= =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/color= x1.webm. MoviePy - Writing audio in colorx1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/colorx= 1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 __________________________________=20test_crop __________________________= _________ def test_crop(): clip =3D get_test_video() =20=20=20=20 =20 clip1 =3D crop(clip) # ie, no cropping (just tests all default= values) > clip1.write_videofile(os.path.join(TMP_DIR, "crop1.webm")) tests/test_fx.py:59:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/crop1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'crop1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate = =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/crop1= .webm. MoviePy - Writing audio in crop1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/crop1.= webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_fadein _________________________= _________ def test_fadein(): clip =3D get_test_video() clip1 =3D fadein(clip, 0.5) > clip1.write_videofile(os.path.join(TMP_DIR, "fadein1.webm")) tests/test_fx.py:80:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/fadein1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'fadein1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate= =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/fadei= n1.webm. MoviePy - Writing audio in fadein1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/fadein= 1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_fadeout ________________________= _________ def test_fadeout(): clip =3D get_test_video() clip1 =3D fadeout(clip, 0.5) > clip1.write_videofile(os.path.join(TMP_DIR, "fadeout1.webm")) tests/test_fx.py:87:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/fadeout1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'fadeout1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrat= e =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/fadeo= ut1.webm. MoviePy - Writing audio in fadeout1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/fadeou= t1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ______________________________=20test_invert_colors _____________________= _________ def test_invert_colors(): clip =3D get_test_video() clip1 =3D invert_colors(clip) > clip1.write_videofile(os.path.join(TMP_DIR, "invert_colors1.webm"= )) tests/test_fx.py:94:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/invert_colors1.w= ebm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'invert_colors1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium' bitrate =3D None, withmask =3D False, logfile =3D -1, threads =3D None ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/inver= t_colors1.webm. MoviePy - Writing audio in invert_colors1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/invert= _colors1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ______________________________=20test_lum_contrast ______________________= _________ def test_lum_contrast(): clip =3D get_test_video() clip1 =3D lum_contrast(clip) > clip1.write_videofile(os.path.join(TMP_DIR, "lum_contrast1.webm")= ) tests/test_fx.py:117:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/lum_contrast1.we= bm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'lum_contrast1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium' bitrate =3D None, withmask =3D False, logfile =3D -1, threads =3D None ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/lum_c= ontrast1.webm. MoviePy - Writing audio in lum_contrast1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/lum_co= ntrast1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ______________________________=20test_make_loopable _____________________= _________ def test_make_loopable(): clip =3D get_test_video() clip1 =3D make_loopable(clip, 0.4) > clip1.write_videofile(os.path.join(TMP_DIR, "make_loopable1.webm"= )) tests/test_fx.py:128:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/make_loopable1.w= ebm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'make_loopable1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium' bitrate =3D None, withmask =3D False, logfile =3D -1, threads =3D None ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/make_= loopable1.webm. MoviePy - Writing audio in make_loopable1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/make_l= oopable1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_margin _________________________= _________ def test_margin(): clip =3D get_test_video() clip1 =3D margin(clip) # does the default values change anything= ? > clip1.write_videofile(os.path.join(TMP_DIR, "margin1.webm")) tests/test_fx.py:135:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _=20_ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/margin1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'margin1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate= =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/margi= n1.webm. MoviePy - Writing audio in margin1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/margin= 1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ________________________________=20test_mirror_x ________________________= _________ def test_mirror_x(): clip =3D get_test_video() clip1 =3D mirror_x(clip) > clip1.write_videofile(os.path.join(TMP_DIR, "mirror_x1.webm")) tests/test_fx.py:160:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/mirror_x1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'mirror_x1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitra= te =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/mirro= r_x1.webm. MoviePy - Writing audio in mirror_x1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/mirror= _x1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ________________________________=20test_mirror_y ________________________= _________ def test_mirror_y(): clip =3D get_test_video() clip1 =3D mirror_y(clip) > clip1.write_videofile(os.path.join(TMP_DIR, "mirror_y1.webm")) tests/test_fx.py:167:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/mirror_y1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'mirror_y1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitra= te =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/mirro= r_y1.webm. MoviePy - Writing audio in mirror_y1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/mirror= _y1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_resize _________________________= _________ def test_resize(): clip =3D get_test_video() =20=20=20=20 =20 clip1 =3D resize(clip, (460, 720)) # New resolution: (460,720) assert clip1.size =3D=3D (460, 720) > clip1.write_videofile(os.path.join(TMP_DIR, "resize1.webm")) tests/test_fx.py:180:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/resize1.webm' size =3D (460, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'resize1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate= =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/resiz= e1.webm. MoviePy - Writing audio in resize1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/resize= 1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_rotate _________________________= _________ def test_rotate(): clip =3D get_test_video() =20=20=20=20 =20 clip1 =3D rotate(clip, 90) # rotate 90 degrees assert clip1.size =3D=3D (clip.size[1], clip.size[0]) > clip1.write_videofile(os.path.join(TMP_DIR, "rotate1.webm")) tests/test_fx.py:202:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/rotate1.webm' size =3D (720, 1280), fps =3D None, codec =3D 'libvpx' audiofile =3D 'rotate1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate= =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/rotat= e1.webm. MoviePy - Writing audio in rotate1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/rotate= 1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _________________________________=20test_speedx _________________________= _________ def test_speedx(): clip =3D get_test_video() =20=20=20=20 =20 clip1 =3D speedx(clip, factor=3D0.5) # 1/2 speed assert clip1.duration =3D=3D 2 > clip1.write_videofile(os.path.join(TMP_DIR, "speedx1.webm")) tests/test_fx.py:227:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/speedx1.webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'speedx1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium', bitrate= =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/speed= x1.webm. MoviePy - Writing audio in speedx1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/speedx= 1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _______________________________=20test_time_mirror ______________________= _________ def test_time_mirror(): clip =3D get_test_video() =20=20=20=20 =20 clip1 =3D time_mirror(clip) assert clip1.duration =3D=3D clip.duration > clip1.write_videofile(os.path.join(TMP_DIR, "time_mirror1.webm")) tests/test_fx.py:248:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/time_mirror1.web= m' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'time_mirror1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium' bitrate =3D None, withmask =3D False, logfile =3D -1, threads =3D None ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/time_= mirror1.webm. MoviePy - Writing audio in time_mirror1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/time_m= irror1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 _____________________________=20test_time_symmetrize ____________________= _________ def test_time_symmetrize(): clip =3D get_test_video() =20=20=20=20 =20 clip1 =3D time_symmetrize(clip) > clip1.write_videofile(os.path.join(TMP_DIR, "time_symmetrize1.web= m")) tests/test_fx.py:256:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/time_symmetrize1= .webm' size =3D (1280, 720), fps =3D None, codec =3D 'libvpx' audiofile =3D 'time_symmetrize1TEMP_MPY_wvf_snd.ogg', preset =3D 'medium' bitrate =3D None, withmask =3D False, logfile =3D -1, threads =3D None ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"),=0D '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/time_= symmetrize1.webm. MoviePy - Writing audio in time_symmetrize1TEMP_MPY_wvf_snd.ogg MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/time_s= ymmetrize1.webm ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20 ________________________________=20test_issue_334 _______________________= _________ def test_issue_334(): # NOTE: this is horrible. Any simpler version ? last_move =3D None last_move1 =3D None =20=20=20=20 =20 lis =3D [(0.0, 113, 167, 47), (0.32, 138, 159, 47), (0.44, 152,= 144, 47), (0.48, 193, 148, 47), (0.6, 193, 148, 47), (0.76, 205, 138= , 55), (0.88, 204, 121, 63), (0.92, 190, 31, 127), (1.2, 183, 59,= 127), (1.4, 137, 22, 127), (1.52, 137, 22, 127), (1.72, 129, 67,= 127), (1.88, 123, 69, 127), (2.04, 131, 123, 63), (2.24, 130, 14= 8, 63), (2.48, 130, 148, 63), (2.8, 138, 180, 63), (3.0, 138, 180,= 63), (3.2, 146, 192, 63), (3.28, 105, 91, 151), (3.44, 105, 91,= 151), (3.72, 11, 48, 151), (3.96, 5, 78, 151), (4.32, 4, 134, 1)= , (4.6, 149, 184, 48), (4.8, 145, 188, 48), (5.0, 154, 217, = 48), (5.08, 163, 199, 48), (5.2, 163, 199, 48), (5.32, 164, 187= , 48), (5.48, 163, 200, 48), (5.76, 163, 200, 48), (5.96, 173, 19= 9, 48), (6.0, 133, 172, 48), (6.04, 128, 165, 48), (6.28, 128, 165= , 48), (6.4, 129, 180, 48), (6.52, 133, 166, 48), (6.64, 133, 166= , 48), (6.88, 144, 183, 48), (7.0, 153, 174, 48), (7.16, 153, 174= , 48), (7.24, 153, 174, 48), (7.28, 253, 65, 104), (7.64, 253, 65= , 104), (7.8, 279, 116, 80), (8.0, 290, 105, 80), (8.24, 288, 124,= 80), (8.44, 243, 102, 80), (8.56, 243, 102, 80), (8.8, 202, 107= , 80), (8.84, 164, 27, 104), (9.0, 164, 27, 104), (9.12, 121, 9, = 104), (9.28, 77, 33, 104), (9.32, 52, 23, 104), (9.48, 52, 23, 1= 04), (9.64, 33, 46, 104), (9.8, 93, 49, 104), (9.92, 93, 49, 10= 4), (10.16, 173, 19, 104), (10.2, 226, 173, 48), (10.36, 226, = 173, 48), (10.48, 211, 172, 48), (10.64, 208, 162, 48), (10.92, 220,= 171, 48)] =20=20=20=20 =20 lis1 =3D [(0.0, 113, 167, 47), (0.32, 138, 159, 47), (0.44, 152= , 144, 47), (0.48, 193, 148, 47), (0.6, 193, 148, 47), (0.76, 205, 13= 8, 55), (0.88, 204, 121, 63), (0.92, 190, 31, 127), (1.2, 183, 59= , 127), (1.4, 137, 22, 127), (1.52, 137, 22, 127), (1.72, 129, 67= , 127), (1.88, 123, 69, 127), (2.04, 131, 123, 63), (2.24, 130, 1= 48, 63), (2.48, 130, 148, 63), (2.8, 138, 180, 63), (3.0, 138, 180= , 63), (3.2, 146, 192, 63), (3.28, 105, 91, 151), (3.44, 105, 91= , 151), (3.72, 11, 48, 151), (3.96, 5, 78, 151), (4.32, 4, 134, 1= ), (4.6, 149, 184, 48), (4.8, 145, 188, 48), (5.0, 154, 217,= 48), (5.08, 163, 199, 48), (5.2, 163, 199, 48), (5.32, 164, 18= 7, 48), (5.48, 163, 200, 48), (5.76, 163, 200, 48), (5.96, 173, 1= 99, 48), (6.0, 133, 172, 48), (6.04, 128, 165, 48), (6.28, 128, 16= 5, 48), (6.4, 129, 180, 48), (6.52, 133, 166, 48), (6.64, 133, 16= 6, 48), (6.88, 144, 183, 48), (7.0, 153, 174, 48), (7.16, 153, 17= 4, 48), (7.24, 153, 174, 48), (7.28, 253, 65, 104), (7.64, 253, 6= 5, 104), (7.8, 279, 116, 80), (8.0, 290, 105, 80), (8.24, 288, 124= , 80), (8.44, 243, 102, 80), (8.56, 243, 102, 80), (8.8, 202, 10= 7, 80), (8.84, 164, 27, 104), (9.0, 164, 27, 104), (9.12, 121, 9,= 104), (9.28, 77, 33, 104), (9.32, 52, 23, 104), (9.48, 52, 23, = 104), (9.64, 33, 46, 104), (9.8, 93, 49, 104), (9.92, 93, 49, 1= 04), (10.16, 173, 19, 104), (10.2, 226, 173, 48), (10.36, 226,= 173, 48), (10.48, 211, 172, 48), (10.64, 208, 162, 48), (10.92, 220= , 171, 48)] =20=20=20=20 =20 def posi(t): global last_move if len(lis) =3D=3D 0: return (last_move[1], last_move[2]) if t >=3D lis[0][0]: last_move =3D item =3D lis.pop(0) return (item[1], item[2]) else: if len(lis) > 0: dura =3D lis[0][0] - last_move[0] now =3D t - last_move[0] w =3D (lis[0][1] - last_move[1]) * (now / dura) h =3D (lis[0][2] - last_move[2]) * (now / dura) # print t, last_move[1] + w, last_move[2] + h return (last_move[1] + w, last_move[2] + h) return (last_move[1], last_move[2]) =20=20=20=20 =20 def size(t): global last_move1 if len(lis1) =3D=3D 0: return (last_move1[3], last_move1[3] * 1.33) if t >=3D lis1[0][0]: last_move1 =3D item =3D lis1.pop(0) return (item[3], item[3] * 1.33) else: if len(lis) > 0: dura =3D lis1[0][0] - last_move1[0] now =3D t - last_move1[0] s =3D (lis1[0][3] - last_move1[3]) * (now / dura) nsw =3D last_move1[3] + s nsh =3D nsw * 1.33 # print t, nsw, nsh return (nsw, nsh) return (last_move1[3], last_move1[3] * 1.33) =20=20=20=20 =20 avatar =3D VideoFileClip("media/big_buck_bunny_432_433.webm", h= as_mask=3DTrue) avatar.audio =3D None maskclip =3D ImageClip("media/afterimage.png", ismask=3DTrue, transparent=3DTrue) avatar.set_mask(maskclip) # must set maskclip here.. concatenated =3D concatenate_videoclips([avatar] * 3) =20=20=20=20 =20 tt =3D VideoFileClip("media/big_buck_bunny_0_30.webm").subclip(= 0, 3) # TODO: Setting mask here does not work: # .set_mask(maskclip).resize(size)]) final =3D CompositeVideoClip( [tt, concatenated.set_position(posi).resize(size)]) final.duration =3D tt.duration > final.write_videofile( os.path.join(TMP_DIR, 'issue_334.mp4'), fps=3D10) tests/test_issues.py:143:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/issue_334.mp4' size =3D (1280, 720), fps =3D None, codec =3D 'libx264' audiofile =3D 'issue_334TEMP_MPY_wvf_snd.mp3', preset =3D 'medium', bitra= te =3D None withmask =3D False, logfile =3D -1, threads =3D None, ffmpeg_params =3D N= one def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/issue= _334.mp4. MoviePy - Writing audio in issue_334TEMP_MPY_wvf_snd.mp3 MoviePy - Done. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/issue_= 334.mp4 ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ________________________________=20test_issue_470 _______________________= _________ def test_issue_470(): audio_clip =3D AudioFileClip('media/crunching.mp3') =20=20=20=20 =20 # t_end is out of bounds subclip =3D audio_clip.subclip(t_start=3D6, t_end=3D9) =20=20=20=20 =20 with pytest.raises(IOError): > subclip.write_audiofile(os.path.join( TMP_DIR, 'issue_470.wav'), write_logfile=3DTrue) E Failed: DID NOT RAISE tests/test_issues.py:267: Failed ----------------------------- Captured stdout call ----------------------= ------- MoviePy - Writing audio in /tmp/guix-build-python-moviepy-1.0.3.drv-0/iss= ue_470.wav MoviePy - Done. ----------------------------- Captured stderr call ----------------------= ------- =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ________________________________=20test_issue_547 _______________________= _________ def test_issue_547(): red =3D ColorClip((640, 480), color=3D(255, 0, 0)).set_duration(1= ) green =3D ColorClip((640, 480), color=3D(0, 255, 0)).set_duration= (2) blue =3D ColorClip((640, 480), color=3D(0, 0, 255)).set_duration(= 3) =20=20=20=20 =20 video =3D concatenate_videoclips([red, green, blue], method=3D"= compose") assert video.duration =3D=3D 6 > assert video.mask.duration =3D=3D 6 E assert 9 =3D=3D 6 E +9 E -6 tests/test_issues.py:291: AssertionError ________________________________ test_subtitles _________________________= _______ self =3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpjcy0ne2v.txt' filename =3D None, size =3D ('800', '600'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D 24, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'caption', kerning = =3D None align =3D 'South', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmparicz9mw.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpjcy0ne2v.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: > subprocess_call(cmd, logger=3DNone) moviepy/video/VideoClip.py:1137:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 cmd=20=3D ['convert', '-background', 'transparent', '-fill', 'white', '-f= ont', ...] logger =3D errorprint =3D True def subprocess_call(cmd, logger=3D'bar', errorprint=3DTrue): """ Executes the given subprocess command. =20=20=20=20 =20 Set logger to None or a custom Proglog logger to avoid printing= s. """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Running:\n>>> "+ " ".join(cmd)') =20=20=20=20 =20 popen_params =3D {"stdout": DEVNULL, "stderr": sp.PIPE, "stdin": DEVNULL} =20=20=20=20 =20 if os.name =3D=3D "nt": popen_params["creationflags"] =3D 0x08000000 =20=20=20=20 =20 proc =3D sp.Popen(cmd, **popen_params) =20=20=20=20 =20 out, err =3D proc.communicate() # proc.wait() proc.stderr.close() =20=20=20=20 =20 if proc.returncode: if errorprint: logger(message=3D'Moviepy - Command returned an error') > raise IOError(err.decode('utf8')) E OSError: Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmparicz9mw.png' @ error/convert.c/ConvertImageCommand/32= 29. moviepy/tools.py:54: OSError During handling of the above exception, another exception occurred: def test_subtitles(): red =3D ColorClip((800, 600), color=3D(255, 0, 0)).set_duration(1= 0) green =3D ColorClip((800, 600), color=3D(0, 255, 0)).set_duration= (10) blue =3D ColorClip((800, 600), color=3D(0, 0, 255)).set_duration(= 10) myvideo =3D concatenate_videoclips([red, green, blue]) assert myvideo.duration =3D=3D 30 =20=20=20=20 =20 generator =3D lambda txt: TextClip(txt, font=3DFONT, size=3D(800, 600), fontsize=3D24= , method=3D'caption', align=3D'Sou= th', color=3D'white') =20=20=20=20 >=20 subtitles =3D SubtitlesClip("media/subtitles1.srt", generator) tests/test_misc.py:35:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 moviepy/video/tools/subtitles.py:86:=20in __init__ hasmask =3D bool(self.make_textclip('T').mask) tests/test_misc.py:30: in generator =3D lambda txt: TextClip(txt, font=3DFONT, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpjcy0ne2v.txt' filename =3D None, size =3D ('800', '600'), color =3D 'white' bg_color =3D 'transparent', fontsize =3D 24, font =3D 'Liberation-Mono' stroke_color =3D None, stroke_width =3D 1, method =3D 'caption', kerning = =3D None align =3D 'South', interline =3D None tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmparicz9mw.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmpjcy0ne2v.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: subprocess_call(cmd, logger=3DNone) except (IOError, OSError) as err: error =3D ("MoviePy Error: creation of %s failed because of t= he " "following error:\n\n%s.\n\n." % (filename, str(err)= ) + ("This error can be due to the fact that ImageMagi= ck " "is not installed on your computer, or (for Windo= ws " "users) that you didn't specify the path to the " "ImageMagick binary in file conf.py, or that the = path " "you specified is incorrect")) > raise IOError(error) E OSError: MoviePy Error: creation of None failed because of th= e following error: E=20=20=20=20=20=20=20=20=20=20=20 E=20 Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmparicz9mw.png' @ error/convert.c/ConvertImageCommand/32= 29. E . E=20=20=20=20=20=20=20=20=20=20=20 E=20 .This error can be due to the fact that ImageMagick is not = installed on your computer, or (for Windows users) that you didn't specif= y the path to the ImageMagick binary in file conf.py, or that the path yo= u specified is incorrect moviepy/video/VideoClip.py:1146: OSError ________________________ test_release_of_file_via_close _________________= _______ def test_release_of_file_via_close(): # Create a random video file. red =3D ColorClip((256, 200), color=3D(255, 0, 0)) green =3D ColorClip((256, 200), color=3D(0, 255, 0)) blue =3D ColorClip((256, 200), color=3D(0, 0, 255)) =20=20=20=20 =20 red.fps =3D green.fps =3D blue.fps =3D 10 =20=20=20=20 =20 # Repeat this so we can see no conflicts. for i in range(3): # Get the name of a temporary file we can use. local_video_filename =3D join( TMP_DIR, "test_release_of_file_via_close_%s.mp4" % int(time.time()= ) ) =20=20=20=20 =20 clip =3D clips_array([[red, green, blue]]).set_duration(0.5= ) > clip.write_videofile(local_video_filename) tests/test_resourcerelease.py:40:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/test_release_of_= file_via_close_1674878483.mp4' size =3D (768, 200), fps =3D None, codec =3D 'libx264', audiofile =3D Non= e preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test_= release_of_file_via_close_1674878483.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test_r= elease_of_file_via_close_1674878483.mp4 _________________________ test_failure_to_release_file __________________= _______ def test_failure_to_release_file(): """ This isn't really a test, because it is expected to fail. It demonstrates that there *is* a problem with not releasing = resources when running on Windows. =20=20=20=20 =20 The real issue was that, as of movepy 0.2.3.2, there was no= way around it. =20=20=20=20 =20 See test_resourcerelease.py to see how the close() methods = provide a solution. """ =20=20=20=20 =20 # Get the name of a temporary file we can use. local_video_filename =3D join( TMP_DIR, "test_release_of_file_%s.mp4" % int(time.time())) =20=20=20=20 =20 # Repeat this so we can see that the problems escalate: for i in range(5): =20=20=20=20 =20 # Create a random video file. red =3D ColorClip((256, 200), color=3D(255, 0, 0)) green =3D ColorClip((256, 200), color=3D(0, 255, 0)) blue =3D ColorClip((256, 200), color=3D(0, 0, 255)) =20=20=20=20 =20 red.fps =3D green.fps =3D blue.fps =3D 30 video =3D clips_array([[red, green, blue]]).set_duration(1) =20=20=20=20 =20 try: > video.write_videofile(local_video_filename) tests/test_resourcereleasedemo.py:51:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232:=20in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:54: in requires_duration return f(clip, *a, **k) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:135: in use_clip_fps_by_default return f(clip, *new_a, **new_kw) /gnu/store/zfw5y8356i5hmfghpix46qk3iaxg3i6y-python-decorator-5.0.9/lib/py= thon3.9/site-packages/decorator.py:232: in fun return caller(func, *(extras + args), **kw) moviepy/decorators.py:22: in convert_masks_to_RGB return f(clip, *a, **k) moviepy/video/VideoClip.py:300: in write_videofile ffmpeg_write_video(self, filename, fps, codec, moviepy/video/io/ffmpeg_writer.py:213: in ffmpeg_write_video with FFMPEG_VideoWriter(filename, clip.size, fps, codec =3D codec, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D filename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/test_release_of_= file_1674878483.mp4' size =3D (768, 200), fps =3D None, codec =3D 'libx264', audiofile =3D Non= e preset =3D 'medium', bitrate =3D None, withmask =3D False, logfile =3D -1 threads =3D None, ffmpeg_params =3D None def __init__(self, filename, size, fps, codec=3D"libx264", audiofile= =3DNone, preset=3D"medium", bitrate=3DNone, withmask=3DFalse, logfile=3DNone, threads=3DNone, ffmpeg_params=3DNone): =20=20=20=20 =20 if logfile is None: logfile =3D sp.PIPE =20=20=20=20 =20 self.filename =3D filename self.codec =3D codec self.ext =3D self.filename.split(".")[-1] =20=20=20=20 =20 # order is important cmd =3D [ get_setting("FFMPEG_BINARY"), '-y', '-loglevel', 'error' if logfile =3D=3D sp.PIPE else 'info', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '%dx%d' % (size[0], size[1]), '-pix_fmt', 'rgba' if withmask else 'rgb24', > '-r', '%.02f' % fps, '-an', '-i', '-' ] E TypeError: must be real number, not NoneType moviepy/video/io/ffmpeg_writer.py:88: TypeError ----------------------------- Captured stdout call ----------------------= ------- Moviepy - Building video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test_= release_of_file_1674878483.mp4. Moviepy - Writing video /tmp/guix-build-python-moviepy-1.0.3.drv-0/test_r= elease_of_file_1674878483.mp4 _____________________________ test_sys_write_flush ______________________= _______ def test_sys_write_flush(): """Test for sys_write-flush function. Check that stdout has no co= ntent after flushing.""" tools.sys_write_flush("hello world") =20=20=20=20 =20 file =3D sys.stdout.read() > assert file =3D=3D b"" E AssertionError: assert '' =3D=3D b'' E +'' E -b'' tests/test_tools.py:62: AssertionError ----------------------------- Captured stdout call ----------------------= ------- hello world _________________________________ test_credits __________________________= _______ self =3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmps9s_zmr9.txt' filename =3D None, size =3D None, color =3D 'white', bg_color =3D 'transp= arent' fontsize =3D 60, font =3D 'Liberation-Mono', stroke_color =3D 'blue', str= oke_width =3D 5 method =3D 'label', kerning =3D None, align =3D 'East', interline =3D Non= e tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmphlp2n7nz.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmps9s_zmr9.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: > subprocess_call(cmd, logger=3DNone) moviepy/video/VideoClip.py:1137:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 cmd=20=3D ['convert', '-background', 'transparent', '-fill', 'white', '-f= ont', ...] logger =3D errorprint =3D True def subprocess_call(cmd, logger=3D'bar', errorprint=3DTrue): """ Executes the given subprocess command. =20=20=20=20 =20 Set logger to None or a custom Proglog logger to avoid printing= s. """ logger =3D proglog.default_bar_logger(logger) logger(message=3D'Moviepy - Running:\n>>> "+ " ".join(cmd)') =20=20=20=20 =20 popen_params =3D {"stdout": DEVNULL, "stderr": sp.PIPE, "stdin": DEVNULL} =20=20=20=20 =20 if os.name =3D=3D "nt": popen_params["creationflags"] =3D 0x08000000 =20=20=20=20 =20 proc =3D sp.Popen(cmd, **popen_params) =20=20=20=20 =20 out, err =3D proc.communicate() # proc.wait() proc.stderr.close() =20=20=20=20 =20 if proc.returncode: if errorprint: logger(message=3D'Moviepy - Command returned an error') > raise IOError(err.decode('utf8')) E OSError: Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmphlp2n7nz.png' @ error/convert.c/ConvertImageCommand/32= 29. moviepy/tools.py:54: OSError During handling of the above exception, another exception occurred: def test_credits(): credit_file =3D "# This is a comment\n" \ "# The next line says : leave 4 blank lines\n" \ ".blank 2\n" \ "\n" \ "..Executive Story Editor\n" \ "MARCEL DURAND\n" \ "\n" \ ".blank 2\n" \ "\n" \ "..Associate Producers\n" \ "MARTIN MARCEL\n" \ "DIDIER MARTIN\n" \ "\n" \ "..Music Supervisor\n" \ "JEAN DIDIER\n" =20=20=20=20 =20 file_location =3D os.path.join(TMP_DIR, "credits.txt") vid_location =3D os.path.join(TMP_DIR, "credits.mp4") with open(file_location, "w") as file: file.write(credit_file) =20=20=20=20 >=20 image =3D credits1(file_location, 600, gap=3D100, stroke_color= =3D"blue", stroke_width=3D5, font=3DFONT) tests/test_videotools.py:33:=20 _=20_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _ _=20 moviepy/video/tools/credits.py:100:=20in credits1 left, right =3D [TextClip(txt, color=3Dcolor, stroke_color=3Dstroke_c= olor, moviepy/video/tools/credits.py:100: in left, right =3D [TextClip(txt, color=3Dcolor, stroke_color=3Dstroke_c= olor, _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _= _ _ _=20 self=20=3D txt =3D '@/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmps9s_zmr9.txt' filename =3D None, size =3D None, color =3D 'white', bg_color =3D 'transp= arent' fontsize =3D 60, font =3D 'Liberation-Mono', stroke_color =3D 'blue', str= oke_width =3D 5 method =3D 'label', kerning =3D None, align =3D 'East', interline =3D Non= e tempfilename =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmphlp2n7nz.= png' temptxt =3D '/tmp/guix-build-python-moviepy-1.0.3.drv-0/tmps9s_zmr9.txt' transparent =3D True, remove_temp =3D True, print_cmd =3D False def __init__(self, txt=3DNone, filename=3DNone, size=3DNone, color=3D= 'black', bg_color=3D'transparent', fontsize=3DNone, font=3D'Couri= er', stroke_color=3DNone, stroke_width=3D1, method=3D'label', kerning=3DNone, align=3D'center', interline=3DNone, tempfilename=3DNone, temptxt=3DNone, transparent=3DTrue, remove_temp=3DTrue, print_cmd=3DFalse): =20=20=20=20 =20 if txt is not None: if temptxt is None: temptxt_fd, temptxt =3D tempfile.mkstemp(suffix=3D'.txt') try: # only in Python3 will this work os.write(temptxt_fd, bytes(txt, 'UTF8')) except TypeError: # oops, fall back to Python2 os.write(temptxt_fd, txt) os.close(temptxt_fd) txt =3D '@' + temptxt else: # use a file instead of a text. txt =3D "@%" + filename =20=20=20=20 =20 if size is not None: size =3D ('' if size[0] is None else str(size[0]), '' if size[1] is None else str(size[1])) =20=20=20=20 =20 cmd =3D ([get_setting("IMAGEMAGICK_BINARY"), "-background", bg_color, "-fill", color, "-font", font]) =20=20=20=20 =20 if fontsize is not None: cmd +=3D ["-pointsize", "%d" % fontsize] if kerning is not None: cmd +=3D ["-kerning", "%0.1f" % kerning] if stroke_color is not None: cmd +=3D ["-stroke", stroke_color, "-strokewidth", "%.01f" % stroke_width] if size is not None: cmd +=3D ["-size", "%sx%s" % (size[0], size[1])] if align is not None: cmd +=3D ["-gravity", align] if interline is not None: cmd +=3D ["-interline-spacing", "%d" % interline] =20=20=20=20 =20 if tempfilename is None: tempfile_fd, tempfilename =3D tempfile.mkstemp(suffix=3D'.png= ') os.close(tempfile_fd) =20=20=20=20 =20 cmd +=3D ["%s:%s" % (method, txt), "-type", "truecolormatte", "PNG32:%s" % tempfilename] =20=20=20=20 =20 if print_cmd: print(" ".join(cmd)) =20=20=20=20 =20 try: subprocess_call(cmd, logger=3DNone) except (IOError, OSError) as err: error =3D ("MoviePy Error: creation of %s failed because of t= he " "following error:\n\n%s.\n\n." % (filename, str(err)= ) + ("This error can be due to the fact that ImageMagi= ck " "is not installed on your computer, or (for Windo= ws " "users) that you didn't specify the path to the " "ImageMagick binary in file conf.py, or that the = path " "you specified is incorrect")) > raise IOError(error) E OSError: MoviePy Error: creation of None failed because of th= e following error: E=20=20=20=20=20=20=20=20=20=20=20 E=20 Fontconfig error: No writable cache directories E Fontconfig error: No writable cache directories E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: unable to read font `Liberation-Mono' @ warning/anno= tate.c/RenderType/949. E convert: unable to read font `Liberation-Mono' @ error/annota= te.c/RenderFreetype/1396. E convert: no images defined `PNG32:/tmp/guix-build-python-movi= epy-1.0.3.drv-0/tmphlp2n7nz.png' @ error/convert.c/ConvertImageCommand/32= 29. E . E=20=20=20=20=20=20=20=20=20=20=20 E=20 .This error can be due to the fact that ImageMagick is not = installed on your computer, or (for Windows users) that you didn't specif= y the path to the ImageMagick binary in file conf.py, or that the path yo= u specified is incorrect moviepy/video/VideoClip.py:1146: OSError =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D warnings summary =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D moviepy/config_defaults.py:1 /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/config_defaul= ts.py:1: DeprecationWarning: invalid escape sequence \P """ moviepy/video/io/ffmpeg_reader.py:294 /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/io/ffmp= eg_reader.py:294: DeprecationWarning: invalid escape sequence \d lines_video =3D [l for l in lines if ' Video: ' in l and re.search('\= d+x\d+', l)] moviepy/video/io/ffmpeg_reader.py:367 /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/io/ffmp= eg_reader.py:367: DeprecationWarning: invalid escape sequence \d rotation_lines =3D [l for l in lines if 'rotate :' in l and = re.search('\d+$', l)] moviepy/video/io/ffmpeg_reader.py:370 /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/io/ffmp= eg_reader.py:370: DeprecationWarning: invalid escape sequence \d match =3D re.search('\d+$', rotation_line) tests/test_VideoClip.py: 40 warnings /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/io/gif_= writers.py:225: DeprecationWarning: tostring() is deprecated. Use tobytes= () instead. proc1.stdin.write(frame.tostring()) tests/test_compositing.py: 2 warnings tests/test_fx.py: 1 warning tests/test_issues.py: 4 warnings tests/test_misc.py: 18 warnings /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/fx/resi= ze.py:37: DeprecationWarning: ANTIALIAS is deprecated and will be removed= in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead. resized_pil =3D pilim.resize(newsize[::-1], Image.ANTIALIAS) tests/test_fx.py::test_rotate /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/fx/rota= te.py:41: DeprecationWarning: BILINEAR is deprecated and will be removed = in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead. resample =3D {"bilinear": Image.BILINEAR, tests/test_fx.py::test_rotate /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/fx/rota= te.py:42: DeprecationWarning: NEAREST is deprecated and will be removed i= n Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead. "nearest": Image.NEAREST, tests/test_fx.py::test_rotate /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/fx/rota= te.py:43: DeprecationWarning: BICUBIC is deprecated and will be removed i= n Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead. "bicubic": Image.BICUBIC}[resample] tests/test_fx.py::test_time_mirror tests/test_fx.py::test_time_symmetrize /tmp/guix-build-python-moviepy-1.0.3.drv-0/source/moviepy/video/io/ffmp= eg_reader.py:123: UserWarning: Warning: in file media/big_buck_bunny_432_= 433.webm, 2764800 bytes wanted but 0 bytes read,at frame 24/25, at time 1= .00/1.00 sec. Using the last valid frame instead. warnings.warn("Warning: in file %s, "%(self.filename)+ -- Docs: https://docs.pytest.org/en/stable/warnings.html =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D short test summary info =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D FAILED tests/test_ImageSequenceClip.py::test_1 - TypeError: must be real = numb... FAILED tests/test_PR.py::test_PR_339 - OSError: MoviePy Error: creation o= f No... FAILED tests/test_PR.py::test_PR_458 - TypeError: must be real number, no= t No... FAILED tests/test_PR.py::test_PR_528 - TypeError: must be real number, no= t No... FAILED tests/test_PR.py::test_PR_529 - assert 0 =3D=3D 180 FAILED tests/test_TextClip.py::test_duration - OSError: MoviePy Error: cr= eati... FAILED tests/test_TextClip.py::test_if_textclip_crashes_in_caption_mode -= OSE... FAILED tests/test_TextClip.py::test_if_textclip_crashes_in_label_mode - O= SErr... FAILED tests/test_VideoClip.py::test_write_image_sequence - TypeError: un= supp... FAILED tests/test_VideoClip.py::test_subfx - TypeError: must be real numb= er, ... FAILED tests/test_VideoClip.py::test_oncolor - TypeError: must be real nu= mber... FAILED tests/test_VideoClip.py::test_setaudio - TypeError: must be real n= umbe... FAILED tests/test_VideoClip.py::test_setaudio_with_audiofile - TypeError:= mus... FAILED tests/test_VideoClip.py::test_setopacity - TypeError: must be real= num... FAILED tests/test_VideoClip.py::test_toimageclip - TypeError: must be rea= l nu... FAILED tests/test_VideoFileClip.py::test_setup - TypeError: must be real = numb... FAILED tests/test_Videos.py::test_afterimage - TypeError: must be real nu= mber... FAILED tests/test_compositing.py::test_clips_array_duration - TypeError: = must... FAILED tests/test_fx.py::test_blackwhite - TypeError: must be real number= , no... FAILED tests/test_fx.py::test_colorx - TypeError: must be real number, no= t No... FAILED tests/test_fx.py::test_crop - TypeError: must be real number, not = None... FAILED tests/test_fx.py::test_fadein - TypeError: must be real number, no= t No... FAILED tests/test_fx.py::test_fadeout - TypeError: must be real number, n= ot N... FAILED tests/test_fx.py::test_invert_colors - TypeError: must be real num= ber,... FAILED tests/test_fx.py::test_lum_contrast - TypeError: must be real numb= er, ... FAILED tests/test_fx.py::test_make_loopable - TypeError: must be real num= ber,... FAILED tests/test_fx.py::test_margin - TypeError: must be real number, no= t No... FAILED tests/test_fx.py::test_mirror_x - TypeError: must be real number, = not ... FAILED tests/test_fx.py::test_mirror_y - TypeError: must be real number, = not ... FAILED tests/test_fx.py::test_resize - TypeError: must be real number, no= t No... FAILED tests/test_fx.py::test_rotate - TypeError: must be real number, no= t No... FAILED tests/test_fx.py::test_speedx - TypeError: must be real number, no= t No... FAILED tests/test_fx.py::test_time_mirror - TypeError: must be real numbe= r, n... FAILED tests/test_fx.py::test_time_symmetrize - TypeError: must be real n= umbe... FAILED tests/test_issues.py::test_issue_334 - TypeError: must be real num= ber,... FAILED tests/test_issues.py::test_issue_470 - Failed: DID NOT RAISE =20 phase=20`check' failed after 115.3 seconds command "pytest" "-vv" failed with status 1 note: keeping build directory `/tmp/guix-build-python-moviepy-1.0.3.drv-3= ' builder for `/gnu/store/v9lrnnsp473lld65ggwlrbqqi08609dx-python-moviepy-1= .0.3.drv' failed with exit code 1 build of /gnu/store/v9lrnnsp473lld65ggwlrbqqi08609dx-python-moviepy-1.0.3= .drv failed View build log at '/var/log/guix/drvs/v9/lrnnsp473lld65ggwlrbqqi08609dx-p= ython-moviepy-1.0.3.drv.gz'. guix build: error: build of `/gnu/store/v9lrnnsp473lld65ggwlrbqqi08609dx-= python-moviepy-1.0.3.drv' failed ``` https://github.com/Zulko/moviepy