开放平台视频生成批量操作
1. 项目简介
本项目是基于开放平台的视频生成批量操作,主要包括视频生成功能,提交包含input_text,image_path字段的的level_contexts.xlsx文件
input_text:文本内容 image_path: 图片绝对路径
输出结果为视频任务id
使用
python 需要3.10以上版本
- 安装依赖
pip install zhipuai-platform-video -U
- 设置环境变量
export ZHIPUAI_API_KEY="开放平台key"
- 运行
启动目录为项目根目录
python -m zhipuai_platform_video.start --input_excel C:\\Users\\renrui\\Desktop\\data\\level_contexts.xlsx --output_path C:\\Users\\renrui\\Desktop\\data\\
参数说明
input_excel:为包含input_text,image_path字段的的level_contexts.xlsx文件
output_path:为输出文件路径,生成 video_report.csv文件
可以断点续传,会自动跳过已经生成的任务,
根据需要配置线程
prompt_num_threads: 提示词线程数,默认2
video_num_threads: 视频生成线程数,默认1
- 获取任务结果
启动目录为项目根目录
python -m zhipuai_platform_video.video_pull --task_video_csv C:\\Users\\renrui\\Desktop\\data\\video_report.csv --output_path C:\\Users\\renrui\\Desktop\\data\\
参数说明
input_excel: video_report.csv文件
output_path:为输出文件路径 生成video_pull_report.csv文件
会自动跳过已经获取的任务, 删除根目录cache_data/VideoPullGenerator的文件可以重新获取
根据需要配置线程
num_threads: 线程数,默认2
- 下载视频
启动目录为项目根目录
python -m zhipuai_platform_video.download_video --csv_file_path C:\\Users\\renrui\\Desktop\\data\\video_pull_report.csv --output_path C:\\Users\\renrui\\Desktop\\data\\
参数说明
csv_file_path: video_pull_report.csv文件
output_path:为输出文件路径 视频下载目录
Metadata
Release files for zhipuai-platform-video 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zhipuai_platform_video-0.0.4.tar.gz | 11.6 kB | Without provenance | Details for zhipuai_platform_video-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zhipuai_platform_video-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for zhipuai_platform_video-0.0.4-py3-none-any.whl |
Total release size: 29.2 kB
Release files / zhipuai_platform_video-0.0.4.tar.gz
| Download URL | zhipuai_platform_video-0.0.4.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
154b455a01a2ff677f2e3e3db854176795ab7ebc49754679cacac40d7dcdab78
|
|
BLAKE2b-256 checksum How to use checksums |
9ef9ec60201232a62771cc341dd30167a7c385c76d2b99f4104a6d73e263b700
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / zhipuai_platform_video-0.0.4-py3-none-any.whl
| Download URL | zhipuai_platform_video-0.0.4-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66712a7abf988b0428aedf5f02b49303979143581f73dd1f1aedb62dd67b2a94
|
|
BLAKE2b-256 checksum How to use checksums |
3a0e47a1b5047a2840025f08cf86a12573ca4ebbdda5dfb02e335cd0a78ef94a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for zhipuai-platform-video 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.