要在 Python 中获取 MP4 文件的时长,你可以使用 Python 的第三方库 moviepy。 首先,你需要安装 moviepy 库,使用以下命令进行安装: pipinstall moviepy