ZhipuAI 开放平台视频生成插件
Project description
开放平台视频生成批量操作
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:为输出文件路径 视频下载目录
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zhipuai_platform_video-0.0.4.tar.gz
.
File metadata
- Download URL: zhipuai_platform_video-0.0.4.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 154b455a01a2ff677f2e3e3db854176795ab7ebc49754679cacac40d7dcdab78 |
|
MD5 | f5e9aae468e408cc3e8f7c29aa55e3ca |
|
BLAKE2b-256 | 9ef9ec60201232a62771cc341dd30167a7c385c76d2b99f4104a6d73e263b700 |
File details
Details for the file zhipuai_platform_video-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: zhipuai_platform_video-0.0.4-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66712a7abf988b0428aedf5f02b49303979143581f73dd1f1aedb62dd67b2a94 |
|
MD5 | 7aa1676b51797573c00f793fb617d5da |
|
BLAKE2b-256 | 3a0e47a1b5047a2840025f08cf86a12573ca4ebbdda5dfb02e335cd0a78ef94a |