Python implements subtitle rain effect

Let’s take a look at the final renderings first:

Use python to achieve the above subtitle rain effect. The main library used is pygame;

pygame is not a built-in module and needs to be installed first:

Install pygame

There are many recommended installation methods, and pip is recommended;

pip is a package installer for Python. In fact, pip is a package in the Python Standard Library (The Python Standard Library), but this package is quite special. It can be used to manage other packages in the Python Standard Library (The Python Standard Library). pip is a command line program. Installing pip adds a pip command to your system that can be run from the command prompt.

Install pip:

  • Install python; this is required;

  • Download pip:

    Official website address: pypi.org/project/pip… ; After downloading, unzip

  • Open the command line window and enter the directory where pip is decompressed; execute the code

Guess you like

Origin blog.csdn.net/weixin_73136678/article/details/128469269