Skip to main content

minimax 开放平台视频生成插件

Project description

开放平台视频生成批量操作

项目简介

本项目是基于开放平台的视频生成批量操作,主要包括视频生成功能,通过本demo你可以快速生成多个一致性高度相同的视频备选素材。

提交包含 input_text, image_path 字段的 level_contexts.xlsx 文件

input_text:文本内容

image_path: 图片绝对路径

输出结果为视频任务 id 的 csv文件,

快速尝试

使用

  • 1、安装依赖 python 需要3.10以上版本
pip install minimax-platform-video -U
  • 2、设置环境变量 我们设定好 API Key。
export API_KEY="开放平台key" 
  • 3、准备数据

基础表格里需要准备的数据包含了 input_text, image_path 字段

input_text 为生成提示词,用于控制镜头

image_path 为起始帧的图片,这个图片可以不存在,使用 request_img 命令参数控制是否必须采用起始帧,默认必须存在

  • 4、运行

启动目录为项目根目录

python -m minimax_platform_video.start --input_excel C:\\Users\\Administrator\\Desktop\\data\\level_contexts.xlsx --output_path C:\\Users\\Administrator\\Desktop\\data\\

参数说明

input_excel:为包含input_text,image_path字段的的level_contexts.xlsx文件

output_path:为输出文件路径,生成 video_report.csv文件

可以断点续传,会自动跳过已经生成的任务,

根据需要配置线程

prompt_num_threads: 提示词线程数,默认2

video_num_threads: 视频生成线程数,默认1

  • 5、获取任务结果

启动目录为项目根目录

python -m minimax_platform_video.video_pull --task_video_csv C:\\Users\\Administrator\\Desktop\\data\\video_report.csv --output_path C:\\Users\\Administrator\\Desktop\\data\\

参数说明

input_excel: video_report.csv文件

output_path:为输出文件路径 生成video_pull_report.csv文件

会自动跳过已经获取的任务, 删除根目录cache_data/VideoPullGenerator的文件可以重新获取

根据需要配置线程

num_threads: 线程数,默认2

  • 6、下载视频

启动目录为项目根目录

python -m minimax_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

minimax_platform_video-0.0.4.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

minimax_platform_video-0.0.4-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file minimax_platform_video-0.0.4.tar.gz.

File metadata

  • Download URL: minimax_platform_video-0.0.4.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.11 Windows/10

File hashes

Hashes for minimax_platform_video-0.0.4.tar.gz
Algorithm Hash digest
SHA256 93988f068c77d16ec0f2dc9f187d162feaa26b8801f923e2e2a42ec189c4323a
MD5 33d4963d595a20bf9d54e374d674fc8a
BLAKE2b-256 9e101d50e366fd6d9a3c3e73f331e311ab120fc178f1fd7f59a4f6975285c464

See more details on using hashes here.

File details

Details for the file minimax_platform_video-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for minimax_platform_video-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8cf3da697ab97344ee1b85c93ccf19a32cd414e8141845c37eb74cc58082269d
MD5 ae13c7ded8dea0091915cdefcb08f898
BLAKE2b-256 46c8c06cc73da4c797564be52796eae6b2a40968a019ff83f2d010cf7007dd0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page