1. 说明
需要 python
版本 >= 3.9
2. 使用 opencv
和 PIL
3. 使用 moviepy
4. 遇到的问题
4.1. module 'PIL.Image' has no attribute 'ANTIALIAS'
ANTIALIAS was removed in Pillow 10.0.0 (after being deprecated through many previous versions). Now you need to use PIL.Image.LANCZOS or PIL.Image.Resampling.LANCZOS.
(This is the exact same algorithm that ANTIALIAS referred to, you just can no longer access it through the name ANTIALIAS.)
使用 pip install Pillow==9.5.0
安装低版本即可。
参考:10.0.0 (2023-07-01) - Pillow (PIL Fork) 10.4.0 documentation