moviepy用pyinstaller打包问题

moviepy打包出现问题,需要修改两个文件。之后可行。

更改moviepy\video\fx\all_init_.py

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Loads all the fx !
Usage:
import moviepy.video.fx.all as vfx
clip = vfx.resize(some_clip, width=400)
clip = vfx.mirror_x(some_clip)
"""

import pkgutil
import moviepy.video.fx as fx

__all__ = [name for _, name, _ in pkgutil.iter_modules(
fx.__path__) if name != "all"]

# for name in __all__:
# exec("from ..%s import %s" % (name, name))

from moviepy.video.fx.crop import crop
from moviepy.video.fx.fadein import fadein
from moviepy.video.fx.fadeout import fadeout
#from moviepy.video.fx.left_right import left_right
from moviepy.video.fx.margin import margin
from moviepy.video.fx.loop import loop
from moviepy.video.fx.invert_colors import invert_colors
from moviepy.video.fx.mask_and import mask_and
from moviepy.video.fx.mask_color import mask_color
from moviepy.video.fx.mask_or import mask_or
from moviepy.video.fx.mirror_x import mirror_x
from moviepy.video.fx.mirror_y import mirror_y
from moviepy.video.fx.resize import resize
from moviepy.video.fx.rotate import rotate
from moviepy.video.fx.scroll import scroll
from moviepy.video.fx.speedx import speedx
from moviepy.video.fx.supersample import supersample
from moviepy.video.fx.time_mirror import time_mirror
from moviepy.video.fx.time_symmetrize import time_symmetrize

更改moviepy\audio\fx\all_init_.py

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Loads all the fx !
Usage:
import moviepy.audio.fx.all as afx
audio_clip = afx.volume_x(some_clip, .5)
"""

import pkgutil
import moviepy.audio.fx as fx

__all__ = [name for _, name, _ in pkgutil.iter_modules(
fx.__path__) if name != "all"]

# for name in __all__:
# exec("from ..%s import %s" % (name, name))
from moviepy.audio.fx.audio_fadein import audio_fadein
from moviepy.audio.fx.audio_fadeout import audio_fadeout
from moviepy.audio.fx.audio_left_right import audio_left_right
from moviepy.audio.fx.audio_loop import audio_loop
from moviepy.audio.fx.audio_normalize import audio_normalize
from moviepy.audio.fx.volumex import volumex