mirror of
https://github.com/sun-guannan/CapCutAPI.git
synced 2025-11-25 11:29:32 +08:00
Initial commit: CapCutAPI - 轻量、灵活、易上手的剪映/CapCut API工具
This commit is contained in:
14
.flake8
Normal file
14
.flake8
Normal file
@@ -0,0 +1,14 @@
|
||||
[flake8]
|
||||
extend-ignore = E301, E302, E303, E305, E306, E701, F403, F405
|
||||
exclude =
|
||||
.git,
|
||||
__pycache__,
|
||||
ignored,
|
||||
build,
|
||||
pyJianYingDraft/metadata/animation_meta.py,
|
||||
pyJianYingDraft/metadata/audio_effect_meta.py,
|
||||
pyJianYingDraft/metadata/filter_meta.py,
|
||||
pyJianYingDraft/metadata/video_effect_meta.py,
|
||||
pyJianYingDraft/metadata/transition_meta.py,
|
||||
pyJianYingDraft\metadata\font_meta.py
|
||||
max-line-length = 140
|
||||
17
.gitignore
vendored
Normal file
17
.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
__pycache__
|
||||
ignored
|
||||
|
||||
build/
|
||||
dist/
|
||||
*.egg-info/
|
||||
|
||||
.vscode/
|
||||
.idea/
|
||||
.DS_Store
|
||||
|
||||
config.json
|
||||
./resource
|
||||
|
||||
.venv/
|
||||
venv/
|
||||
tmp/
|
||||
133
README.md
Normal file
133
README.md
Normal file
@@ -0,0 +1,133 @@
|
||||
# CapCutAPI
|
||||
|
||||
轻量、灵活、易上手的剪映/CapCutAPI工具,构建全自动化视频剪辑/混剪流水线。
|
||||
|
||||
## 项目功能
|
||||
|
||||
本项目是一个基于Python的剪映/CapCut处理工具,提供以下核心功能:
|
||||
|
||||
### 核心功能
|
||||
|
||||
- **草稿文件管理**:创建、读取、修改和保存剪映/CapCut草稿文件
|
||||
- **素材处理**:支持视频、音频、图片、文本、贴纸等多种素材的添加和编辑
|
||||
- **特效应用**:支持添加转场、滤镜、蒙版、动画等多种特效
|
||||
- **API服务**:提供HTTP API接口,支持远程调用和自动化处理
|
||||
- **AI集成**:集成多种AI服务,支持智能生成字幕、文本和图像
|
||||
|
||||
### 主要API接口
|
||||
|
||||
- `/create_draft`创建草稿
|
||||
- `/add_video`:添加视频素材到草稿
|
||||
- `/add_audio`:添加音频素材到草稿
|
||||
- `/add_image`:添加图片素材到草稿
|
||||
- `/add_text`:添加文本素材到草稿
|
||||
- `/add_subtitle`:添加字幕到草稿
|
||||
- `/add_effect`:添加特效到素材
|
||||
- `/add_sticker`:添加贴纸到草稿
|
||||
- `/save_draft`:保存草稿文件
|
||||
|
||||
## 配置说明
|
||||
|
||||
### 配置文件
|
||||
|
||||
项目支持通过配置文件进行自定义设置。要使用配置文件:
|
||||
|
||||
1. 复制`config.json.example`为`config.json`
|
||||
2. 根据需要修改配置项
|
||||
|
||||
```bash
|
||||
cp config.json.example config.json
|
||||
```
|
||||
|
||||
### 环境配置
|
||||
|
||||
#### ffmpeg
|
||||
|
||||
本项目依赖于ffmpeg,您需要确保系统中已安装ffmpeg,并且将其添加到系统的环境变量中。
|
||||
|
||||
#### Python 环境
|
||||
|
||||
本项目需要 Python 3.8.20 版本,请确保您的系统已安装正确版本的 Python。
|
||||
|
||||
#### 安装依赖
|
||||
|
||||
安装项目所需的依赖包:
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
### 运行服务器
|
||||
|
||||
完成配置和环境设置后,执行以下命令启动服务器:
|
||||
|
||||
```bash
|
||||
python capcut_server.py
|
||||
```
|
||||
|
||||
服务器启动后,您可以通过 API 接口访问相关功能。
|
||||
|
||||
## 使用示例
|
||||
|
||||
### 添加视频
|
||||
|
||||
```python
|
||||
import requests
|
||||
|
||||
response = requests.post("http://localhost:9000/add_video", json={
|
||||
"video_url": "http://example.com/video.mp4",
|
||||
"start": 0,
|
||||
"end": 10,
|
||||
"width": 1080,
|
||||
"height": 1920
|
||||
})
|
||||
|
||||
print(response.json())
|
||||
```
|
||||
|
||||
### 添加文本
|
||||
|
||||
```python
|
||||
import requests
|
||||
|
||||
response = requests.post("http://localhost:9000/add_text", json={
|
||||
"text": "你好,世界!",
|
||||
"start": 0,
|
||||
"end": 3,
|
||||
"font": "思源黑体",
|
||||
"font_color": "#FF0000",
|
||||
"font_size": 30.0
|
||||
})
|
||||
|
||||
print(response.json())
|
||||
```
|
||||
|
||||
### 保存草稿
|
||||
|
||||
```python
|
||||
import requests
|
||||
|
||||
response = requests.post("http://localhost:9000/save_draft", json={
|
||||
"draft_id": "123456",
|
||||
"draft_folder":"your capcut draft folder"
|
||||
})
|
||||
|
||||
print(response.json())
|
||||
```
|
||||
|
||||
### 复制草稿到剪映/capcut草稿路径
|
||||
调用`save_draft`会在服务器当前目录下生成一个`dfd_`开头的文件夹,将他复制到剪映/CapCut草稿目录,即可看到生成的草稿
|
||||
|
||||
|
||||
### 更多示例
|
||||
请参考项目的`example.py`文件,其中包含了更多的使用示例,如添加音频、添加特效等。
|
||||
|
||||
|
||||
## 项目特点
|
||||
|
||||
- **跨平台支持**:同时支持剪映和CapCut国际版
|
||||
- **自动化处理**:支持批量处理和自动化工作流
|
||||
- **丰富的API**:提供全面的API接口,方便集成到其他系统
|
||||
- **灵活的配置**:通过配置文件实现灵活的功能定制
|
||||
- **AI增强**:集成多种AI服务,提升视频制作效率
|
||||
|
||||
154
add_audio_track.py
Normal file
154
add_audio_track.py
Normal file
@@ -0,0 +1,154 @@
|
||||
# 导入必要的模块
|
||||
import os
|
||||
import pyJianYingDraft as draft
|
||||
import time
|
||||
from util import generate_draft_url, is_windows_path, url_to_hash
|
||||
import re
|
||||
from typing import Optional, Dict, Tuple, List
|
||||
from pyJianYingDraft import exceptions, Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type, CapCut_Voice_filters_effect_type,CapCut_Voice_characters_effect_type,CapCut_Speech_to_song_effect_type, trange
|
||||
from create_draft import get_or_create_draft
|
||||
from settings.local import IS_CAPCUT_ENV
|
||||
|
||||
def add_audio_track(
|
||||
audio_url: str,
|
||||
draft_folder: Optional[str] = None,
|
||||
start: float = 0,
|
||||
end: Optional[float] = None,
|
||||
target_start: float = 0,
|
||||
draft_id: Optional[str] = None,
|
||||
volume: float = 1.0,
|
||||
track_name: str = "audio_main",
|
||||
speed: float = 1.0,
|
||||
sound_effects: Optional[List[Tuple[str, Optional[List[Optional[float]]]]]]=None,
|
||||
width: int = 1080,
|
||||
height: int = 1920,
|
||||
duration: Optional[float] = None # 新增 duration 参数
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
向指定草稿添加音频轨道
|
||||
:param draft_folder: 草稿文件夹路径,可选参数
|
||||
:param audio_url: 音频URL
|
||||
:param start: 开始时间(秒),默认0
|
||||
:param end: 结束时间(秒),默认None(使用音频总时长)
|
||||
:param target_start: 目标轨道的插入位置(秒),默认0
|
||||
:param draft_id: 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
:param volume: 音量大小,范围0.0-1.0,默认1.0
|
||||
:param track_name: 轨道名称,默认"audio_main"
|
||||
:param speed: 播放速度,默认1.0
|
||||
:param sound_effects: 场景音效果列表,每个元素是一个元组,包含效果类型名称和参数列表,默认None
|
||||
:return: 更新后的草稿信息
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 添加音频轨道(仅当轨道不存在时)
|
||||
if track_name is not None:
|
||||
try:
|
||||
imported_track = script.get_imported_track(draft.Track_type.audio, name=track_name)
|
||||
# 如果没有抛出异常,说明轨道已存在
|
||||
except exceptions.TrackNotFound:
|
||||
# 轨道不存在,创建新轨道
|
||||
script.add_track(draft.Track_type.audio, track_name=track_name)
|
||||
else:
|
||||
script.add_track(draft.Track_type.audio)
|
||||
|
||||
# 如果传递了 duration 参数,优先使用它;否则使用默认音频时长0秒,在下载时,才会获取真实时长
|
||||
if duration is not None:
|
||||
# 使用传递进来的 duration,跳过时长获取和检查
|
||||
audio_duration = duration
|
||||
else:
|
||||
# 使用默认音频时长0秒,在下载草稿时,才会获取真实时长
|
||||
audio_duration = 0.0 # 默认音频时长为0秒
|
||||
# duration_result = get_video_duration(audio_url) # 复用视频时长获取函数
|
||||
# if not duration_result["success"]:
|
||||
# print(f"获取音频时长失败: {duration_result['error']}")
|
||||
|
||||
# # 检查音频时长是否超过10分钟
|
||||
# if duration_result["output"] > 600: # 600秒 = 10分钟
|
||||
# raise Exception(f"音频时长超过10分钟限制,当前时长: {duration_result['output']}秒")
|
||||
|
||||
# audio_duration = duration_result["output"]
|
||||
|
||||
# 下载音频到本地
|
||||
# local_audio_path = download_audio(audio_url, draft_dir)
|
||||
|
||||
material_name = f"audio_{url_to_hash(audio_url)}.mp3" # 使用原始文件名+时间戳+固定mp3扩展名
|
||||
|
||||
# 构建draft_audio_path
|
||||
draft_audio_path = None
|
||||
if draft_folder:
|
||||
if is_windows_path(draft_folder):
|
||||
# Windows路径处理
|
||||
windows_drive, windows_path = re.match(r'([a-zA-Z]:)(.*)', draft_folder).groups()
|
||||
parts = [p for p in windows_path.split('\\') if p]
|
||||
draft_audio_path = os.path.join(windows_drive, *parts, draft_id, "assets", "audio", material_name)
|
||||
# 规范化路径(确保分隔符一致)
|
||||
draft_audio_path = draft_audio_path.replace('/', '\\')
|
||||
else:
|
||||
# macOS/Linux路径处理
|
||||
draft_audio_path = os.path.join(draft_folder, draft_id, "assets", "audio", material_name)
|
||||
|
||||
# 设置音频结束时间的默认值
|
||||
audio_end = end if end is not None else audio_duration
|
||||
|
||||
# 计算音频时长
|
||||
duration = audio_end - start
|
||||
|
||||
# 创建音频片段
|
||||
if draft_audio_path:
|
||||
print('replace_path:', draft_audio_path)
|
||||
audio_material = draft.Audio_material(replace_path=draft_audio_path, remote_url=audio_url, material_name=material_name, duration=audio_duration)
|
||||
else:
|
||||
audio_material = draft.Audio_material(remote_url=audio_url, material_name=material_name, duration=audio_duration)
|
||||
audio_segment = draft.Audio_segment(
|
||||
audio_material, # 传入素材对象
|
||||
target_timerange=trange(f"{target_start}s", f"{duration}s"), # 使用target_start和duration
|
||||
source_timerange=trange(f"{start}s", f"{duration}s"),
|
||||
speed=speed, # 设置播放速度
|
||||
volume=volume # 设置音量
|
||||
)
|
||||
|
||||
# 添加场景音效果
|
||||
if sound_effects:
|
||||
for effect_name, params in sound_effects:
|
||||
# 根据IS_CAPCUT_ENV选择不同的效果类型
|
||||
effect_type = None
|
||||
|
||||
if IS_CAPCUT_ENV:
|
||||
# CapCut环境下,查找CapCut_Voice_filters_effect_type中的效果
|
||||
effect_type = getattr(CapCut_Voice_filters_effect_type, effect_name)
|
||||
# 如果在Voice_filters中没找到,可以继续在其他CapCut效果类型中查找
|
||||
if effect_type is None:
|
||||
# 查找CapCut_Voice_characters_effect_type中的效果
|
||||
effect_type = getattr(CapCut_Voice_characters_effect_type, effect_name)
|
||||
# 如果仍未找到,查找CapCut_Speech_to_song_effect_type中的效果
|
||||
if effect_type is None:
|
||||
effect_type = getattr(CapCut_Speech_to_song_effect_type, effect_name)
|
||||
else:
|
||||
# 剪映环境下,查找Audio_scene_effect_type中的效果
|
||||
effect_type = getattr(Audio_scene_effect_type, effect_name)
|
||||
# 如果在Audio_scene_effect_type中没找到,可以继续在其他效果类型中查找
|
||||
if effect_type is None:
|
||||
effect_type = getattr(Tone_effect_type, effect_name)
|
||||
# 如果仍未找到,查找Speech_to_song_type中的效果
|
||||
if effect_type is None:
|
||||
effect_type = getattr(Speech_to_song_type, effect_name)
|
||||
# 这里可以根据需要添加其他效果类型的查找逻辑
|
||||
|
||||
# 如果找到了对应的效果类型,则添加到音频片段
|
||||
if effect_type:
|
||||
audio_segment.add_effect(effect_type, params)
|
||||
else:
|
||||
print(f"警告: 未找到名为 {effect_name} 的音频效果")
|
||||
|
||||
# 添加音频片段到轨道
|
||||
script.add_segment(audio_segment, track_name=track_name)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
73
add_effect_impl.py
Normal file
73
add_effect_impl.py
Normal file
@@ -0,0 +1,73 @@
|
||||
from pyJianYingDraft import trange, Video_scene_effect_type, Video_character_effect_type, CapCut_Video_scene_effect_type, CapCut_Video_character_effect_type, exceptions
|
||||
import pyJianYingDraft as draft
|
||||
from typing import Optional, Dict, List, Union
|
||||
from create_draft import get_or_create_draft
|
||||
from util import generate_draft_url
|
||||
from settings import IS_CAPCUT_ENV
|
||||
|
||||
def add_effect_impl(
|
||||
effect_type: str, # 修改为字符串类型
|
||||
start: float = 0,
|
||||
end: float = 3.0,
|
||||
draft_id: Optional[str] = None,
|
||||
track_name: Optional[str] = "effect_01",
|
||||
params: Optional[List[Optional[float]]] = None,
|
||||
width: int = 1080,
|
||||
height: int = 1920
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
向指定草稿添加特效
|
||||
:param effect_type: 特效类型名称,将从Video_scene_effect_type或Video_character_effect_type中匹配
|
||||
:param start: 开始时间(秒),默认0
|
||||
:param end: 结束时间(秒),默认3秒
|
||||
:param draft_id: 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
:param track_name: 轨道名称,当特效轨道仅有一条时可省略
|
||||
:param params: 特效参数列表,参数列表中未提供或为None的项使用默认值
|
||||
:param width: 视频宽度,默认1080
|
||||
:param height: 视频高度,默认1920
|
||||
:return: 更新后的草稿信息
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 计算时间范围
|
||||
duration = end - start
|
||||
t_range = trange(f"{start}s", f"{duration}s")
|
||||
|
||||
# 动态获取特效类型对象
|
||||
if IS_CAPCUT_ENV:
|
||||
# 如果是CapCut环境,使用CapCut特效
|
||||
effect_enum = CapCut_Video_scene_effect_type[effect_type]
|
||||
if effect_enum is None:
|
||||
effect_enum = CapCut_Video_character_effect_type[effect_type]
|
||||
else:
|
||||
# 默认使用剪映特效
|
||||
effect_enum = Video_scene_effect_type[effect_type]
|
||||
if effect_enum is None:
|
||||
effect_enum = Video_character_effect_type[effect_type]
|
||||
|
||||
if effect_enum is None:
|
||||
raise ValueError(f"Unknown effect type: {effect_type}")
|
||||
|
||||
# 添加特效轨道(仅当轨道不存在时)
|
||||
if track_name is not None:
|
||||
try:
|
||||
imported_track=script.get_imported_track(draft.Track_type.effect, name=track_name)
|
||||
# 如果没有抛出异常,说明轨道已存在
|
||||
except exceptions.TrackNotFound:
|
||||
# 轨道不存在,创建新轨道
|
||||
script.add_track(draft.Track_type.effect, track_name=track_name)
|
||||
else:
|
||||
script.add_track(draft.Track_type.effect)
|
||||
|
||||
# 添加特效
|
||||
script.add_effect(effect_enum, t_range, params=params[::-1], track_name=track_name)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
232
add_image_impl.py
Normal file
232
add_image_impl.py
Normal file
@@ -0,0 +1,232 @@
|
||||
import os
|
||||
import uuid
|
||||
import pyJianYingDraft as draft
|
||||
import time
|
||||
from settings.local import IS_CAPCUT_ENV
|
||||
from util import generate_draft_url, is_windows_path, url_to_hash
|
||||
from pyJianYingDraft import trange, Clip_settings
|
||||
import re
|
||||
from typing import Optional, Dict
|
||||
from pyJianYingDraft import exceptions
|
||||
from create_draft import get_or_create_draft
|
||||
|
||||
def add_image_impl(
|
||||
image_url: str,
|
||||
draft_folder: Optional[str] = None,
|
||||
width: int = 1080,
|
||||
height: int = 1920,
|
||||
start: float = 0,
|
||||
end: float = 3.0, # 默认显示3秒
|
||||
draft_id: Optional[str] = None,
|
||||
transform_y: float = 0,
|
||||
scale_x: float = 1,
|
||||
scale_y: float = 1,
|
||||
transform_x: float = 0,
|
||||
track_name: str = "main",
|
||||
relative_index: int = 0,
|
||||
animation: Optional[str] = None, # 入场动画参数(向后兼容)
|
||||
animation_duration: float = 0.5, # 入场动画持续时间参数,默认0.5秒
|
||||
intro_animation: Optional[str] = None, # 新的入场动画参数,优先级高于animation
|
||||
intro_animation_duration: float = 0.5, # 新的入场动画持续时间参数,默认0.5秒
|
||||
outro_animation: Optional[str] = None, # 出场动画参数
|
||||
outro_animation_duration: float = 0.5, # 出场动画持续时间参数,默认0.5秒
|
||||
combo_animation: Optional[str] = None, # 组合动画参数
|
||||
combo_animation_duration: float = 0.5, # 组合动画持续时间参数,默认0.5秒
|
||||
transition: Optional[str] = None, # 转场类型参数
|
||||
transition_duration: Optional[float] = 0.5, # 转场持续时间参数(秒),默认0.5秒
|
||||
# 蒙版相关参数
|
||||
mask_type: Optional[str] = None, # 蒙版类型:线性、镜面、圆形、矩形、爱心、星形
|
||||
mask_center_x: float = 0.0, # 蒙版中心点X坐标
|
||||
mask_center_y: float = 0.0, # 蒙版中心点Y坐标
|
||||
mask_size: float = 0.5, # 蒙版主要尺寸
|
||||
mask_rotation: float = 0.0, # 蒙版旋转角度
|
||||
mask_feather: float = 0.0, # 蒙版羽化参数(0-100)
|
||||
mask_invert: bool = False, # 是否反转蒙版
|
||||
mask_rect_width: Optional[float] = None, # 矩形蒙版宽度(仅矩形蒙版)
|
||||
mask_round_corner: Optional[float] = None # 矩形蒙版圆角(仅矩形蒙版,0-100)
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
向指定草稿添加图片轨道
|
||||
:param animation: 入场动画名称,支持的动画包括:缩小、渐显、放大、旋转、Kira游动、抖动下降、镜像翻转、旋转开幕、折叠开幕、漩涡旋转、跳转开幕等
|
||||
:param animation_duration: 入场动画持续时间(秒),默认0.5秒
|
||||
:param intro_animation: 新的入场动画参数,优先级高于animation
|
||||
:param intro_animation_duration: 新的入场动画持续时间(秒),默认0.5秒
|
||||
:param outro_animation: 出场动画参数
|
||||
:param outro_animation_duration: 出场动画持续时间(秒),默认0.5秒
|
||||
:param combo_animation: 组合动画参数
|
||||
:param combo_animation_duration: 组合动画持续时间(秒),默认0.5秒
|
||||
:param transition: 转场类型,支持的转场包括:叠化、上移、下移、左移、右移、分割、压缩、动漫云朵、动漫漩涡等
|
||||
:param transition_duration: 转场持续时间(秒),默认0.5秒
|
||||
:param draft_folder: 草稿文件夹路径,可选参数
|
||||
:param image_url: 图片URL
|
||||
:param width: 视频宽度,默认1080
|
||||
:param height: 视频高度,默认1920
|
||||
:param start: 开始时间(秒),默认0
|
||||
:param end: 结束时间(秒),默认3秒
|
||||
:param draft_id: 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
:param transform_y: Y轴变换,默认0
|
||||
:param scale_x: X轴缩放,默认1
|
||||
:param scale_y: Y轴缩放,默认1
|
||||
:param transform_x: X轴变换,默认0
|
||||
:param track_name: 当只有一个视频的时候,轨道名称可以省略
|
||||
:param relative_index: 轨道渲染顺序索引,默认0
|
||||
:param mask_type: 蒙版类型,支持:线性、镜面、圆形、矩形、爱心、星形
|
||||
:param mask_center_x: 蒙版中心点X坐标(以素材的像素为单位),默认设置在素材中心
|
||||
:param mask_center_y: 蒙版中心点Y坐标(以素材的像素为单位),默认设置在素材中心
|
||||
:param mask_size: 蒙版的主要尺寸,以占素材高度的比例表示,默认为0.5
|
||||
:param mask_rotation: 蒙版顺时针旋转的角度,默认不旋转
|
||||
:param mask_feather: 蒙版的羽化参数,取值范围0~100,默认无羽化
|
||||
:param mask_invert: 是否反转蒙版,默认不反转
|
||||
:param mask_rect_width: 矩形蒙版的宽度,仅在蒙版类型为矩形时允许设置,以占素材宽度的比例表示
|
||||
:param mask_round_corner: 矩形蒙版的圆角参数,仅在蒙版类型为矩形时允许设置,取值范围0~100
|
||||
:return: 更新后的草稿信息,包含draft_id和draft_url
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 检查是否存在视频轨道,如果不存在则添加一条默认视频轨道
|
||||
try:
|
||||
script.get_track(draft.Track_type.video, track_name=None)
|
||||
except exceptions.TrackNotFound:
|
||||
script.add_track(draft.Track_type.video, relative_index=0)
|
||||
except NameError:
|
||||
# 如果存在多个视频轨道(NameError),则不做任何操作
|
||||
pass
|
||||
|
||||
# 添加视频轨道(仅当轨道不存在时)
|
||||
if track_name is not None:
|
||||
try:
|
||||
imported_track=script.get_imported_track(draft.Track_type.video, name=track_name)
|
||||
# 如果没有抛出异常,说明轨道已存在
|
||||
except exceptions.TrackNotFound:
|
||||
# 轨道不存在,创建新轨道
|
||||
script.add_track(draft.Track_type.video, track_name=track_name, relative_index=relative_index)
|
||||
else:
|
||||
script.add_track(draft.Track_type.video, relative_index=relative_index)
|
||||
|
||||
# 生成material_name但不下载图片
|
||||
material_name = f"image_{url_to_hash(image_url)}.png"
|
||||
|
||||
# 构建draft_image_path
|
||||
draft_image_path = None
|
||||
if draft_folder:
|
||||
# 检测输入路径类型并处理
|
||||
if is_windows_path(draft_folder):
|
||||
# Windows路径处理
|
||||
windows_drive, windows_path = re.match(r'([a-zA-Z]:)(.*)', draft_folder).groups()
|
||||
parts = [p for p in windows_path.split('\\') if p] # 分割路径并过滤空部分
|
||||
draft_image_path = os.path.join(windows_drive, *parts, draft_id, "assets", "image", material_name)
|
||||
# 规范化路径(确保分隔符一致)
|
||||
draft_image_path = draft_image_path.replace('/', '\\')
|
||||
else:
|
||||
# macOS/Linux路径处理
|
||||
draft_image_path = os.path.join(draft_folder, draft_id, "assets", "image", material_name)
|
||||
|
||||
# 打印路径信息
|
||||
print('replace_path:', draft_image_path)
|
||||
|
||||
# 创建图片素材
|
||||
if draft_image_path:
|
||||
image_material = draft.Video_material(path=None, material_type='photo', replace_path=draft_image_path, remote_url=image_url, material_name=material_name)
|
||||
else:
|
||||
image_material = draft.Video_material(path=None, material_type='photo', remote_url=image_url, material_name=material_name)
|
||||
|
||||
# 创建target_timerange(图片
|
||||
duration = end - start
|
||||
target_timerange = trange(f"{start}s", f"{duration}s")
|
||||
source_timerange = trange(f"{0}s", f"{duration}s")
|
||||
|
||||
# 创建图片片段
|
||||
image_segment = draft.Video_segment(
|
||||
image_material,
|
||||
target_timerange=target_timerange,
|
||||
source_timerange=source_timerange,
|
||||
clip_settings=Clip_settings(
|
||||
transform_y=transform_y,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
transform_x=transform_x
|
||||
)
|
||||
)
|
||||
|
||||
# 添加入场动画(优先使用intro_animation,其次使用animation)
|
||||
intro_anim = intro_animation if intro_animation is not None else animation
|
||||
intro_animation_duration = intro_animation_duration if intro_animation_duration is not None else animation_duration
|
||||
if intro_anim:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
animation_type = getattr(draft.CapCut_Intro_type, intro_anim)
|
||||
else:
|
||||
animation_type = getattr(draft.Intro_type, intro_anim)
|
||||
image_segment.add_animation(animation_type, intro_animation_duration * 1e6) # 使用微秒单位的动画持续时间
|
||||
except AttributeError:
|
||||
raise ValueError(f"警告:不支持的入场动画类型 {intro_anim},将忽略此参数")
|
||||
|
||||
# 添加出场动画
|
||||
if outro_animation:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
outro_type = getattr(draft.CapCut_Outro_type, outro_animation)
|
||||
else:
|
||||
outro_type = getattr(draft.Outro_type, outro_animation)
|
||||
image_segment.add_animation(outro_type, outro_animation_duration * 1e6) # 使用微秒单位的动画持续时间
|
||||
except AttributeError:
|
||||
raise ValueError(f"警告:不支持的出场动画类型 {outro_animation},将忽略此参数")
|
||||
|
||||
# 添加组合动画
|
||||
if combo_animation:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
combo_type = getattr(draft.CapCut_Group_animation_type, combo_animation)
|
||||
else:
|
||||
combo_type = getattr(draft.Group_animation_type, combo_animation)
|
||||
image_segment.add_animation(combo_type, combo_animation_duration * 1e6) # 使用微秒单位的动画持续时间
|
||||
except AttributeError:
|
||||
raise ValueError(f"警告:不支持的组合动画类型 {combo_animation},将忽略此参数")
|
||||
|
||||
# 添加转场效果
|
||||
if transition:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
transition_type = getattr(draft.CapCut_Transition_type, transition)
|
||||
else:
|
||||
transition_type = getattr(draft.Transition_type, transition)
|
||||
# 将秒转换为微秒(乘以1000000)
|
||||
duration_microseconds = int(transition_duration * 1000000) if transition_duration is not None else None
|
||||
image_segment.add_transition(transition_type, duration=duration_microseconds)
|
||||
except AttributeError:
|
||||
raise ValueError(f"警告:不支持的转场类型 {transition},将忽略此参数")
|
||||
|
||||
# 添加蒙版效果
|
||||
if mask_type:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
mask_type_enum = getattr(draft.CapCut_Mask_type, mask_type)
|
||||
else:
|
||||
mask_type_enum = getattr(draft.Mask_type, mask_type)
|
||||
image_segment.add_mask(
|
||||
script,
|
||||
mask_type_enum, # 移除关键字名称,作为位置参数传递
|
||||
center_x=mask_center_x,
|
||||
center_y=mask_center_y,
|
||||
size=mask_size,
|
||||
rotation=mask_rotation,
|
||||
feather=mask_feather,
|
||||
invert=mask_invert,
|
||||
rect_width=mask_rect_width,
|
||||
round_corner=mask_round_corner
|
||||
)
|
||||
except:
|
||||
raise ValueError(f"不支持的蒙版类型 {mask_type},支持的类型包括:线性、镜面、圆形、矩形、爱心、星形")
|
||||
|
||||
# 添加图片片段到轨道
|
||||
script.add_segment(image_segment, track_name=track_name)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
86
add_sticker_impl.py
Normal file
86
add_sticker_impl.py
Normal file
@@ -0,0 +1,86 @@
|
||||
import pyJianYingDraft as draft
|
||||
from pyJianYingDraft import trange
|
||||
from typing import Optional, Dict
|
||||
from pyJianYingDraft import exceptions
|
||||
from create_draft import get_or_create_draft
|
||||
from util import generate_draft_url
|
||||
|
||||
def add_sticker_impl(
|
||||
resource_id: str,
|
||||
start: float,
|
||||
end: float,
|
||||
draft_id: str = None,
|
||||
transform_y: float = 0,
|
||||
transform_x: float = 0,
|
||||
alpha: float = 1.0,
|
||||
flip_horizontal: bool = False,
|
||||
flip_vertical: bool = False,
|
||||
rotation: float = 0.0,
|
||||
scale_x: float = 1.0,
|
||||
scale_y: float = 1.0,
|
||||
track_name: str = "sticker_main",
|
||||
relative_index: int = 0,
|
||||
width: int = 1080,
|
||||
height: int = 1920
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
向指定草稿添加贴纸
|
||||
:param resource_id: 贴纸资源ID
|
||||
:param start: 开始时间(秒)
|
||||
:param end: 结束时间(秒)
|
||||
:param draft_id: 草稿ID(可选,默认None则创建新草稿)
|
||||
:param transform_y: Y轴位置(默认0,屏幕中间)
|
||||
:param transform_x: X轴位置(默认0,屏幕中间)
|
||||
:param alpha: 图像不透明度,范围0-1(默认1.0,完全不透明)
|
||||
:param flip_horizontal: 是否水平翻转(默认False)
|
||||
:param flip_vertical: 是否垂直翻转(默认False)
|
||||
:param rotation: 顺时针旋转的角度,可正可负(默认0.0)
|
||||
:param scale_x: 水平缩放比例(默认1.0)
|
||||
:param scale_y: 垂直缩放比例(默认1.0)
|
||||
:param track_name: 轨道名称
|
||||
:param relative_index: 相对(同类型轨道的)图层位置,越高越接近前景(默认0)
|
||||
:param width: 视频宽度,默认1080
|
||||
:param height: 视频高度,默认1920
|
||||
:return: 更新后的草稿信息
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 添加贴纸轨道
|
||||
if track_name is not None:
|
||||
try:
|
||||
imported_track = script.get_imported_track(draft.Track_type.sticker, name=track_name)
|
||||
# 如果没有抛出异常,说明轨道已存在
|
||||
except exceptions.TrackNotFound:
|
||||
# 轨道不存在,创建新轨道
|
||||
script.add_track(draft.Track_type.sticker, track_name=track_name, relative_index=relative_index)
|
||||
else:
|
||||
script.add_track(draft.Track_type.sticker, relative_index=relative_index)
|
||||
|
||||
# 创建贴纸片段
|
||||
sticker_segment = draft.Sticker_segment(
|
||||
resource_id,
|
||||
trange(f"{start}s", f"{end-start}s"),
|
||||
clip_settings=draft.Clip_settings(
|
||||
transform_y=transform_y,
|
||||
transform_x=transform_x,
|
||||
alpha=alpha,
|
||||
flip_horizontal=flip_horizontal,
|
||||
flip_vertical=flip_vertical,
|
||||
rotation=rotation,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y
|
||||
)
|
||||
)
|
||||
|
||||
# 添加贴纸片段到轨道
|
||||
script.add_segment(sticker_segment, track_name=track_name)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
160
add_subtitle_impl.py
Normal file
160
add_subtitle_impl.py
Normal file
@@ -0,0 +1,160 @@
|
||||
import pyJianYingDraft as draft
|
||||
from util import generate_draft_url, hex_to_rgb
|
||||
from create_draft import get_or_create_draft
|
||||
from pyJianYingDraft.text_segment import TextBubble, TextEffect
|
||||
from typing import Optional
|
||||
import requests
|
||||
|
||||
def add_subtitle_impl(
|
||||
srt_path: str,
|
||||
draft_id: str = None,
|
||||
track_name: str = "subtitle",
|
||||
time_offset: float = 0,
|
||||
# 字体样式参数
|
||||
font_size: float = 8.0,
|
||||
bold: bool = False,
|
||||
italic: bool = False,
|
||||
underline: bool = False,
|
||||
font_color: str = "#FFFFFF",
|
||||
|
||||
# 描边参数
|
||||
border_alpha: float = 1.0,
|
||||
border_color: str = "#000000",
|
||||
border_width: float = 0.0, # 默认不显示描边
|
||||
|
||||
# 背景参数
|
||||
background_color: str = "#000000",
|
||||
background_style: int = 1,
|
||||
background_alpha: float = 0.0, # 默认不显示背景
|
||||
|
||||
# 气泡效果
|
||||
bubble_effect_id: Optional[str] = None,
|
||||
bubble_resource_id: Optional[str] = None,
|
||||
|
||||
# 文本花字
|
||||
effect_effect_id: Optional[str] = None,
|
||||
# 图像调节参数
|
||||
transform_x: float = 0.0,
|
||||
transform_y: float = -0.8, # 字幕默认位置在底部
|
||||
scale_x: float = 1.0,
|
||||
scale_y: float = 1.0,
|
||||
rotation: float = 0.0,
|
||||
style_reference: draft.Text_segment = None,
|
||||
vertical: bool = True, # 新增参数:是否垂直显示
|
||||
alpha: float = 0.4,
|
||||
width: int = 1080, # 新增参数
|
||||
height: int = 1920 # 新增参数
|
||||
):
|
||||
"""
|
||||
向草稿添加字幕
|
||||
:param srt_path: 字幕文件路径或URL或SRT文本内容
|
||||
:param draft_id: 草稿ID,如果为None则创建新草稿
|
||||
:param track_name: 轨道名称,默认为"subtitle"
|
||||
:param time_offset: 时间偏移量,默认为"0"s
|
||||
:param text_style: 文本样式,默认为None
|
||||
:param clip_settings: 片段设置,默认为None
|
||||
:param style_reference: 样式参考,默认为None
|
||||
:return: 草稿信息
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 处理字幕内容
|
||||
srt_content = None
|
||||
|
||||
# 检查是否为URL
|
||||
if srt_path.startswith(('http://', 'https://')):
|
||||
try:
|
||||
response = requests.get(srt_path)
|
||||
response.raise_for_status()
|
||||
|
||||
response.encoding = 'utf-8'
|
||||
srt_content = response.text
|
||||
except Exception as e:
|
||||
raise Exception(f"下载字幕文件失败: {str(e)}")
|
||||
else:
|
||||
# 如果不是URL,直接使用内容
|
||||
srt_content = srt_path
|
||||
# 处理可能包含的转义字符
|
||||
srt_content = srt_content.replace('\\n', '\n').replace('/n', '\n')
|
||||
|
||||
# 导入字幕
|
||||
# 转换十六进制颜色为RGB
|
||||
rgb_color = hex_to_rgb(font_color)
|
||||
|
||||
# 创建text_border (描边)
|
||||
text_border = None
|
||||
if border_width > 0:
|
||||
text_border = draft.Text_border(
|
||||
alpha=border_alpha,
|
||||
color=hex_to_rgb(border_color),
|
||||
width=border_width
|
||||
)
|
||||
|
||||
# 创建text_background (背景)
|
||||
text_background = None
|
||||
if background_alpha > 0:
|
||||
text_background = draft.Text_background(
|
||||
color=background_color,
|
||||
style=background_style,
|
||||
alpha=background_alpha
|
||||
)
|
||||
|
||||
# 创建text_style
|
||||
text_style = draft.Text_style(
|
||||
size=font_size,
|
||||
bold=bold,
|
||||
italic=italic,
|
||||
underline=underline,
|
||||
color=rgb_color,
|
||||
align=1, # 保持居中对齐
|
||||
vertical=vertical, # 使用传入的vertical参数
|
||||
alpha=alpha # 使用传入的alpha参数
|
||||
)
|
||||
|
||||
# 创建气泡效果
|
||||
text_bubble = None
|
||||
if bubble_effect_id and bubble_resource_id:
|
||||
text_bubble = TextBubble(
|
||||
effect_id=bubble_effect_id,
|
||||
resource_id=bubble_resource_id
|
||||
)
|
||||
|
||||
# 创建花字效果
|
||||
text_effect = None
|
||||
if effect_effect_id:
|
||||
text_effect = TextEffect(
|
||||
effect_id=effect_effect_id,
|
||||
resource_id=effect_effect_id
|
||||
)
|
||||
|
||||
# 创建clip_settings
|
||||
clip_settings = draft.Clip_settings(
|
||||
transform_x=transform_x,
|
||||
transform_y=transform_y,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
rotation=rotation
|
||||
)
|
||||
|
||||
script.import_srt(
|
||||
srt_content,
|
||||
track_name=track_name,
|
||||
time_offset=int(time_offset * 1000000), # 将秒转换为微秒
|
||||
text_style=text_style,
|
||||
clip_settings=clip_settings,
|
||||
style_reference=style_reference,
|
||||
border=text_border,
|
||||
background=text_background,
|
||||
bubble=text_bubble,
|
||||
effect=text_effect
|
||||
)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
215
add_text_impl.py
Normal file
215
add_text_impl.py
Normal file
@@ -0,0 +1,215 @@
|
||||
import pyJianYingDraft as draft
|
||||
from settings.local import IS_CAPCUT_ENV
|
||||
from util import generate_draft_url, hex_to_rgb
|
||||
from pyJianYingDraft import trange, Font_type
|
||||
from typing import Optional
|
||||
from pyJianYingDraft import exceptions
|
||||
from create_draft import get_or_create_draft
|
||||
from pyJianYingDraft.text_segment import TextBubble, TextEffect
|
||||
|
||||
def add_text_impl(
|
||||
text: str,
|
||||
start: float,
|
||||
end: float,
|
||||
draft_id: str = None,
|
||||
transform_y: float = -0.8,
|
||||
transform_x: float = 0,
|
||||
font: str = "文轩体",
|
||||
font_color: str = "#ffffff",
|
||||
font_size: float = 8.0,
|
||||
track_name: str = "text_main",
|
||||
vertical: bool = False, # 是否竖排显示
|
||||
font_alpha: float = 1.0, # 透明度,范围0.0-1.0
|
||||
# 描边参数
|
||||
border_alpha: float = 1.0,
|
||||
border_color: str = "#000000",
|
||||
border_width: float = 0.0, # 默认不显示描边
|
||||
# 背景参数
|
||||
background_color: str = "#000000",
|
||||
background_style: int = 1,
|
||||
background_alpha: float = 0.0, # 默认不显示背景
|
||||
# 气泡效果
|
||||
bubble_effect_id: Optional[str] = None,
|
||||
bubble_resource_id: Optional[str] = None,
|
||||
# 文本花字
|
||||
effect_effect_id: Optional[str] = None,
|
||||
intro_animation: Optional[str] = None, # 入场动画类型
|
||||
intro_duration: float = 0.5, # 入场动画持续时间(秒),默认0.5秒
|
||||
outro_animation: Optional[str] = None, # 出场动画类型
|
||||
outro_duration: float = 0.5, # 出场动画持续时间(秒),默认0.5秒
|
||||
width: int = 1080,
|
||||
height: int = 1920,
|
||||
fixed_width: float = -1, # 文本固定宽度比例,默认-1表示不固定
|
||||
fixed_height: float = -1, # 文本固定高度比例,默认-1表示不固定
|
||||
):
|
||||
"""
|
||||
向指定草稿添加文本字幕(参数可配置版本)
|
||||
:param text: 文本内容
|
||||
:param start: 开始时间(秒)
|
||||
:param end: 结束时间(秒)
|
||||
:param draft_id: 草稿ID(可选,默认None则创建新草稿)
|
||||
:param transform_y: Y轴位置(默认-0.8,屏幕下方)
|
||||
:param transform_x: X轴位置(默认0,屏幕中间)
|
||||
:param font: 字体名称(支持Font_type中的所有字体)
|
||||
:param font_color: 字体颜色 #FFF0FF
|
||||
:param font_size: 字体大小(浮点值,默认8.0)
|
||||
:param track_name: 轨道名称
|
||||
:param vertical: 是否竖排显示(默认False)
|
||||
:param font_alpha: 文字透明度,范围0.0-1.0(默认1.0,完全不透明)
|
||||
:param border_alpha: 描边透明度,范围0.0-1.0(默认1.0)
|
||||
:param border_color: 描边颜色(默认黑色)
|
||||
:param border_width: 描边宽度(默认0.0,不显示描边)
|
||||
:param background_color: 背景颜色(默认黑色)
|
||||
:param background_style: 背景样式(默认1)
|
||||
:param background_alpha: 背景透明度(默认0.0,不显示背景)
|
||||
:param bubble_effect_id: 气泡效果ID
|
||||
:param bubble_resource_id: 气泡资源ID
|
||||
:param effect_effect_id: 花字效果ID
|
||||
:param intro_animation: 入场动画类型
|
||||
:param intro_duration: 入场动画持续时间(秒),默认0.5秒
|
||||
:param outro_animation: 出场动画类型
|
||||
:param outro_duration: 出场动画持续时间(秒),默认0.5秒
|
||||
:param width: 视频宽度(像素)
|
||||
:param height: 视频高度(像素)
|
||||
:param fixed_width: 文本固定宽度比例,范围0.0-1.0,默认-1表示不固定
|
||||
:param fixed_height: 文本固定高度比例,范围0.0-1.0,默认-1表示不固定
|
||||
:return: 更新后的草稿信息
|
||||
"""
|
||||
# 校验字体是否在Font_type中
|
||||
try:
|
||||
font_type = getattr(Font_type, font)
|
||||
except:
|
||||
available_fonts = [attr for attr in dir(Font_type) if not attr.startswith('_')]
|
||||
raise ValueError(f"不支持的字体:{font},请使用Font_type中的字体之一:{available_fonts}")
|
||||
|
||||
# 校验alpha值范围
|
||||
if not 0.0 <= font_alpha <= 1.0:
|
||||
raise ValueError("alpha值必须在0.0到1.0之间")
|
||||
if not 0.0 <= border_alpha <= 1.0:
|
||||
raise ValueError("border_alpha值必须在0.0到1.0之间")
|
||||
if not 0.0 <= background_alpha <= 1.0:
|
||||
raise ValueError("background_alpha值必须在0.0到1.0之间")
|
||||
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 添加文本轨道
|
||||
if track_name is not None:
|
||||
try:
|
||||
imported_track = script.get_imported_track(draft.Track_type.text, name=track_name)
|
||||
# 如果没有抛出异常,说明轨道已存在
|
||||
except exceptions.TrackNotFound:
|
||||
# 轨道不存在,创建新轨道
|
||||
script.add_track(draft.Track_type.text, track_name=track_name)
|
||||
else:
|
||||
script.add_track(draft.Track_type.audio)
|
||||
|
||||
# 转换十六进制颜色为 RGB 元组
|
||||
try:
|
||||
rgb_color = hex_to_rgb(font_color)
|
||||
rgb_border_color = hex_to_rgb(border_color)
|
||||
except ValueError as e:
|
||||
raise ValueError(f"颜色参数错误: {str(e)}")
|
||||
|
||||
# 创建text_border (描边)
|
||||
text_border = None
|
||||
if border_width > 0:
|
||||
text_border = draft.Text_border(
|
||||
alpha=border_alpha,
|
||||
color=rgb_border_color,
|
||||
width=border_width
|
||||
)
|
||||
|
||||
# 创建text_background (背景)
|
||||
text_background = None
|
||||
if background_alpha > 0:
|
||||
text_background = draft.Text_background(
|
||||
color=background_color,
|
||||
style=background_style,
|
||||
alpha=background_alpha
|
||||
)
|
||||
|
||||
# 创建气泡效果
|
||||
text_bubble = None
|
||||
if bubble_effect_id and bubble_resource_id:
|
||||
text_bubble = TextBubble(
|
||||
effect_id=bubble_effect_id,
|
||||
resource_id=bubble_resource_id
|
||||
)
|
||||
|
||||
# 创建花字效果
|
||||
text_effect = None
|
||||
if effect_effect_id:
|
||||
text_effect = TextEffect(
|
||||
effect_id=effect_effect_id
|
||||
)
|
||||
|
||||
# 将比例转换为像素值
|
||||
pixel_fixed_width = -1
|
||||
pixel_fixed_height = -1
|
||||
if fixed_width > 0:
|
||||
pixel_fixed_width = int(fixed_width * script.width)
|
||||
if fixed_height > 0:
|
||||
pixel_fixed_height = int(fixed_height * script.height)
|
||||
|
||||
# 创建文本片段(使用可配置参数)
|
||||
text_segment = draft.Text_segment(
|
||||
text,
|
||||
trange(f"{start}s", f"{end-start}s"),
|
||||
font=font_type, # 使用Font_type中的字体
|
||||
style=draft.Text_style(
|
||||
color=rgb_color,
|
||||
size=font_size,
|
||||
align=1,
|
||||
vertical=vertical, # 设置是否竖排
|
||||
alpha=font_alpha # 设置透明度
|
||||
),
|
||||
clip_settings=draft.Clip_settings(transform_y=transform_y, transform_x=transform_x),
|
||||
border=text_border,
|
||||
background=text_background,
|
||||
fixed_width=pixel_fixed_width,
|
||||
fixed_height=pixel_fixed_height
|
||||
)
|
||||
|
||||
if text_bubble:
|
||||
text_segment.add_bubble(text_bubble.effect_id, text_bubble.resource_id)
|
||||
if text_effect:
|
||||
text_segment.add_effect(text_effect.effect_id)
|
||||
|
||||
# 添加入场动画
|
||||
if intro_animation:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
animation_type = getattr(draft.CapCut_Text_intro, intro_animation)
|
||||
else:
|
||||
animation_type = getattr(draft.Text_intro, intro_animation)
|
||||
# 将秒转换为微秒
|
||||
duration_microseconds = int(intro_duration * 1000000)
|
||||
text_segment.add_animation(animation_type, duration_microseconds) # 添加入场动画,设置持续时间
|
||||
except:
|
||||
print(f"警告:不支持的入场动画类型 {intro_animation},将忽略此参数")
|
||||
|
||||
# 添加出场动画
|
||||
if outro_animation:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
animation_type = getattr(draft.CapCut_Text_outro, outro_animation)
|
||||
else:
|
||||
animation_type = getattr(draft.Text_outro, outro_animation)
|
||||
# 将秒转换为微秒
|
||||
duration_microseconds = int(outro_duration * 1000000)
|
||||
text_segment.add_animation(animation_type, duration_microseconds) # 添加出场动画,设置持续时间
|
||||
except:
|
||||
print(f"警告:不支持的出场动画类型 {outro_animation},将忽略此参数")
|
||||
|
||||
# 添加文本片段到轨道
|
||||
script.add_segment(text_segment, track_name=track_name)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
169
add_video_keyframe_impl.py
Normal file
169
add_video_keyframe_impl.py
Normal file
@@ -0,0 +1,169 @@
|
||||
import pyJianYingDraft as draft
|
||||
from pyJianYingDraft import exceptions
|
||||
from create_draft import get_or_create_draft
|
||||
from typing import Optional, Dict, List
|
||||
|
||||
from util import generate_draft_url
|
||||
|
||||
def add_video_keyframe_impl(
|
||||
draft_id: Optional[str] = None,
|
||||
track_name: str = "main",
|
||||
property_type: str = "alpha",
|
||||
time: float = 0.0,
|
||||
value: str = "1.0",
|
||||
property_types: Optional[List[str]] = None,
|
||||
times: Optional[List[float]] = None,
|
||||
values: Optional[List[str]] = None
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
向指定片段添加关键帧
|
||||
:param draft_id: 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
:param track_name: 轨道名称,默认"main"
|
||||
:param property_type: 关键帧属性类型,支持以下值:
|
||||
- position_x: 水平位置,范围[-1,1],0表示居中,1表示最右边
|
||||
- position_y: 垂直位置,范围[-1,1],0表示居中,1表示最下边
|
||||
- rotation: 顺时针旋转角度
|
||||
- scale_x: X轴缩放比例(1.0为不缩放),与uniform_scale互斥
|
||||
- scale_y: Y轴缩放比例(1.0为不缩放),与uniform_scale互斥
|
||||
- uniform_scale: 整体缩放比例(1.0为不缩放),与scale_x和scale_y互斥
|
||||
- alpha: 不透明度,1.0为完全不透明
|
||||
- saturation: 饱和度,0.0为原始饱和度,范围为-1.0到1.0
|
||||
- contrast: 对比度,0.0为原始对比度,范围为-1.0到1.0
|
||||
- brightness: 亮度,0.0为原始亮度,范围为-1.0到1.0
|
||||
- volume: 音量,1.0为原始音量
|
||||
:param time: 关键帧时间点(秒),默认0.0
|
||||
:param value: 关键帧值,格式根据property_type不同而不同:
|
||||
- position_x/position_y: "0"表示居中位置,范围[-1,1]
|
||||
- rotation: "45deg"表示45度
|
||||
- scale_x/scale_y/uniform_scale: "1.5"表示放大1.5倍
|
||||
- alpha: "50%"表示50%不透明度
|
||||
- saturation/contrast/brightness: "+0.5"表示增加0.5,"-0.5"表示减少0.5
|
||||
- volume: "80%"表示原始音量的80%
|
||||
:param property_types: 批量模式:关键帧属性类型列表,如 ["alpha", "position_x", "rotation"]
|
||||
:param times: 批量模式:关键帧时间点列表(秒),如 [0.0, 1.0, 2.0]
|
||||
:param values: 批量模式:关键帧值列表,如 ["1.0", "0.5", "45deg"]
|
||||
注意:property_types、times、values 三个参数必须同时提供且长度相等,如果提供了这些参数,将忽略单个关键帧参数
|
||||
:return: 更新后的草稿信息
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id
|
||||
)
|
||||
|
||||
try:
|
||||
# 获取指定轨道
|
||||
track = script.get_track(draft.Video_segment, track_name=track_name)
|
||||
|
||||
# 获取轨道中的片段
|
||||
segments = track.segments
|
||||
if not segments:
|
||||
raise Exception(f"轨道 {track_name} 中没有片段")
|
||||
|
||||
# 确定要处理的关键帧列表
|
||||
if property_types is not None or times is not None or values is not None:
|
||||
# 批量模式:使用三个数组参数
|
||||
if property_types is None or times is None or values is None:
|
||||
raise Exception("批量模式下,property_types、times、values 三个参数必须同时提供")
|
||||
|
||||
if not (isinstance(property_types, list) and isinstance(times, list) and isinstance(values, list)):
|
||||
raise Exception("property_types、times、values 必须都是列表类型")
|
||||
|
||||
if len(property_types) == 0:
|
||||
raise Exception("批量模式下,参数列表不能为空")
|
||||
|
||||
if not (len(property_types) == len(times) == len(values)):
|
||||
raise Exception(f"property_types、times、values 的长度必须相等,当前长度分别为:{len(property_types)}, {len(times)}, {len(values)}")
|
||||
|
||||
keyframes_to_process = [
|
||||
{
|
||||
"property_type": prop_type,
|
||||
"time": t,
|
||||
"value": val
|
||||
}
|
||||
for prop_type, t, val in zip(property_types, times, values)
|
||||
]
|
||||
else:
|
||||
# 单个模式:使用原有参数
|
||||
keyframes_to_process = [{
|
||||
"property_type": property_type,
|
||||
"time": time,
|
||||
"value": value
|
||||
}]
|
||||
|
||||
# 处理每个关键帧
|
||||
added_count = 0
|
||||
for i, kf in enumerate(keyframes_to_process):
|
||||
try:
|
||||
_add_single_keyframe(track, kf["property_type"], kf["time"], kf["value"])
|
||||
added_count += 1
|
||||
except Exception as e:
|
||||
raise Exception(f"添加第{i+1}个关键帧失败 (property_type={kf['property_type']}, time={kf['time']}, value={kf['value']}): {str(e)}")
|
||||
|
||||
result = {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
|
||||
# 如果是批量模式,返回添加的关键帧数量
|
||||
if property_types is not None:
|
||||
result["added_keyframes_count"] = added_count
|
||||
|
||||
return result
|
||||
|
||||
except exceptions.TrackNotFound:
|
||||
raise Exception(f"找不到名为 {track_name} 的轨道")
|
||||
except Exception as e:
|
||||
raise Exception(f"添加关键帧失败: {str(e)}")
|
||||
|
||||
|
||||
def _add_single_keyframe(track, property_type: str, time: float, value: str):
|
||||
"""
|
||||
添加单个关键帧的内部函数
|
||||
"""
|
||||
# 将属性类型字符串转换为枚举值,验证属性类型是否有效
|
||||
try:
|
||||
property_enum = getattr(draft.Keyframe_property, property_type)
|
||||
except:
|
||||
raise Exception(f"不支持的关键帧属性类型: {property_type}")
|
||||
|
||||
# 根据属性类型解析value值
|
||||
try:
|
||||
if property_type in ['position_x', 'position_y']:
|
||||
# 处理位置,范围[0,1]
|
||||
float_value = float(value)
|
||||
if not -10 <= float_value <= 10:
|
||||
raise ValueError(f"{property_type}的值必须在-10到10之间")
|
||||
elif property_type == 'rotation':
|
||||
# 处理旋转角度
|
||||
if value.endswith('deg'):
|
||||
float_value = float(value[:-3])
|
||||
else:
|
||||
float_value = float(value)
|
||||
elif property_type == 'alpha':
|
||||
# 处理不透明度
|
||||
if value.endswith('%'):
|
||||
float_value = float(value[:-1]) / 100
|
||||
else:
|
||||
float_value = float(value)
|
||||
elif property_type == 'volume':
|
||||
# 处理音量
|
||||
if value.endswith('%'):
|
||||
float_value = float(value[:-1]) / 100
|
||||
else:
|
||||
float_value = float(value)
|
||||
elif property_type in ['saturation', 'contrast', 'brightness']:
|
||||
# 处理饱和度、对比度、亮度
|
||||
if value.startswith('+'):
|
||||
float_value = float(value[1:])
|
||||
elif value.startswith('-'):
|
||||
float_value = -float(value[1:])
|
||||
else:
|
||||
float_value = float(value)
|
||||
else:
|
||||
# 其他属性直接转换为浮点数
|
||||
float_value = float(value)
|
||||
except ValueError:
|
||||
raise Exception(f"无效的值格式: {value}")
|
||||
|
||||
# 如果提供了轨道对象,则使用轨道的add_pending_keyframe方法
|
||||
track.add_pending_keyframe(property_type, time, value)
|
||||
221
add_video_track.py
Normal file
221
add_video_track.py
Normal file
@@ -0,0 +1,221 @@
|
||||
import os
|
||||
import pyJianYingDraft as draft
|
||||
import time
|
||||
from settings.local import IS_CAPCUT_ENV
|
||||
from util import generate_draft_url, is_windows_path, url_to_hash
|
||||
from pyJianYingDraft import trange, Clip_settings
|
||||
import re
|
||||
from typing import Optional, Dict
|
||||
from pyJianYingDraft import exceptions
|
||||
from create_draft import get_or_create_draft
|
||||
|
||||
def add_video_track(
|
||||
video_url: str,
|
||||
draft_folder: Optional[str] = None,
|
||||
width: int = 1080,
|
||||
height: int = 1920,
|
||||
start: float = 0,
|
||||
end: Optional[float] = None,
|
||||
target_start: float = 0,
|
||||
draft_id: Optional[str] = None,
|
||||
transform_y: float = 0,
|
||||
scale_x: float = 1,
|
||||
scale_y: float = 1,
|
||||
transform_x: float = 0,
|
||||
speed: float = 1.0,
|
||||
track_name: str = "main",
|
||||
relative_index: int = 0,
|
||||
duration: Optional[float] = None, # 新增 duration 参数
|
||||
transition: Optional[str] = None, # 转场类型
|
||||
transition_duration: Optional[float] = 0.5, # 转场时长(秒)
|
||||
# 蒙版相关参数
|
||||
mask_type: Optional[str] = None, # 蒙版类型
|
||||
mask_center_x: float = 0.5, # 蒙版中心X坐标(0-1)
|
||||
mask_center_y: float = 0.5, # 蒙版中心Y坐标(0-1)
|
||||
mask_size: float = 1.0, # 蒙版大小(0-1)
|
||||
mask_rotation: float = 0.0, # 蒙版旋转角度(度)
|
||||
mask_feather: float = 0.0, # 蒙版羽化程度(0-1)
|
||||
mask_invert: bool = False, # 是否反转蒙版
|
||||
mask_rect_width: Optional[float] = None, # 矩形蒙版宽度(仅矩形蒙版)
|
||||
mask_round_corner: Optional[float] = None, # 矩形蒙版圆角(仅矩形蒙版,0-100)
|
||||
volume: float = 1.0 # 音量大小,默认1.0
|
||||
) -> Dict[str, str]:
|
||||
"""
|
||||
向指定草稿添加视频轨道
|
||||
:param draft_folder: 草稿文件夹路径,可选参数
|
||||
:param video_url: 视频URL
|
||||
:param width: 视频宽度,默认1080
|
||||
:param height: 视频高度,默认1920
|
||||
:param start: 源视频开始时间(秒),默认0
|
||||
:param end: 源视频结束时间(秒),默认None(使用视频总时长)
|
||||
:param target_start: 目标视频开始时间(秒),默认0
|
||||
:param draft_id: 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
:param transform_y: Y轴变换,默认0
|
||||
:param scale_x: X轴缩放,默认1
|
||||
:param scale_y: Y轴缩放,默认1
|
||||
:param transform_x: X轴变换,默认0
|
||||
:param speed: 视频播放速度,默认1.0
|
||||
:param track_name: 当只有一个视频的时候,轨道名称可以省略
|
||||
:param relative_index: 轨道渲染顺序索引,默认0
|
||||
:param duration: 视频时长(秒),如果提供则跳过时长检测
|
||||
:param transition: 转场类型,可选参数
|
||||
:param transition_duration: 转场时长(秒),默认使用转场类型的默认时长
|
||||
:param mask_type: 蒙版类型(线性、镜面、圆形、矩形、爱心、星形),可选参数
|
||||
:param mask_center_x: 蒙版中心X坐标(0-1),默认0.5
|
||||
:param mask_center_y: 蒙版中心Y坐标(0-1),默认0.5
|
||||
:param mask_size: 蒙版大小(0-1),默认1.0
|
||||
:param mask_rotation: 蒙版旋转角度(度),默认0.0
|
||||
:param mask_feather: 蒙版羽化程度(0-1),默认0.0
|
||||
:param mask_invert: 是否反转蒙版,默认False
|
||||
:param mask_rect_width: 矩形蒙版的宽度,仅在蒙版类型为矩形时允许设置,以占素材宽度的比例表示
|
||||
:param mask_round_corner: 矩形蒙版的圆角参数,仅在蒙版类型为矩形时允许设置,取值范围0~100
|
||||
:param volume: 音量大小,默认1.0(0.0为静音,1.0为原音量)
|
||||
:return: 更新后的草稿信息,包含draft_id和draft_url
|
||||
"""
|
||||
# 获取或创建草稿
|
||||
draft_id, script = get_or_create_draft(
|
||||
draft_id=draft_id,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
# 检查是否存在视频轨道,如果不存在则添加一条默认视频轨道
|
||||
try:
|
||||
script.get_track(draft.Track_type.video, track_name=None)
|
||||
except exceptions.TrackNotFound:
|
||||
script.add_track(draft.Track_type.video, relative_index=0)
|
||||
except NameError:
|
||||
# 如果存在多个视频轨道(NameError),则不做任何操作
|
||||
pass
|
||||
|
||||
# 添加视频轨道(仅当轨道不存在时)
|
||||
if track_name is not None:
|
||||
try:
|
||||
imported_track=script.get_imported_track(draft.Track_type.video, name=track_name)
|
||||
# 如果没有抛出异常,说明轨道已存在
|
||||
except exceptions.TrackNotFound:
|
||||
# 轨道不存在,创建新轨道
|
||||
script.add_track(draft.Track_type.video, track_name=track_name, relative_index=relative_index)
|
||||
else:
|
||||
script.add_track(draft.Track_type.video, relative_index=relative_index)
|
||||
|
||||
# 如果传递了 duration 参数,优先使用它;否则使用默认时长0秒,在下载草稿时,才会获取真实时长
|
||||
if duration is not None:
|
||||
# 使用传递进来的 duration,跳过时长获取和检查
|
||||
video_duration = duration
|
||||
else:
|
||||
# 使用默认时长0秒,在下载草稿时,才会获取真实时长
|
||||
video_duration = 0.0 # 默认视频时长为0秒
|
||||
# duration_result = get_video_duration(video_url)
|
||||
# if not duration_result["success"]:
|
||||
# print(f"获取视频时长失败: {duration_result['error']}")
|
||||
|
||||
# # 检查视频时长是否超过2分钟
|
||||
# if duration_result["output"] > 120: # 120秒 = 2分钟
|
||||
# raise Exception(f"视频时长超过2分钟限制,当前时长: {duration_result['output']}秒")
|
||||
|
||||
# video_duration = duration_result["output"]
|
||||
|
||||
# 生成本地文件名
|
||||
material_name = f"video_{url_to_hash(video_url)}.mp4"
|
||||
# local_video_path = download_video(video_url, draft_dir)
|
||||
|
||||
# 构建draft_video_path
|
||||
draft_video_path = None
|
||||
if draft_folder:
|
||||
# 检测输入路径类型并处理
|
||||
if is_windows_path(draft_folder):
|
||||
# Windows路径处理
|
||||
windows_drive, windows_path = re.match(r'([a-zA-Z]:)(.*)', draft_folder).groups()
|
||||
parts = [p for p in windows_path.split('\\') if p] # 分割路径并过滤空部分
|
||||
draft_video_path = os.path.join(windows_drive, *parts, draft_id, "assets", "video", material_name)
|
||||
# 规范化路径(确保分隔符一致)
|
||||
draft_video_path = draft_video_path.replace('/', '\\')
|
||||
else:
|
||||
# macOS/Linux路径处理
|
||||
draft_video_path = os.path.join(draft_folder, draft_id, "assets", "video", material_name)
|
||||
|
||||
# 打印路径信息
|
||||
print('replace_path:', draft_video_path)
|
||||
|
||||
# 设置视频结束时间
|
||||
video_end = end if end is not None else video_duration
|
||||
|
||||
# 计算源视频时长
|
||||
source_duration = video_end - start
|
||||
# 计算目标视频时长(考虑速度因素)
|
||||
target_duration = source_duration / speed
|
||||
|
||||
# 创建视频片段
|
||||
if draft_video_path:
|
||||
video_material = draft.Video_material(material_type='video', replace_path=draft_video_path, remote_url=video_url, material_name=material_name, duration=video_duration, width=0, height=0)
|
||||
else:
|
||||
video_material = draft.Video_material(material_type='video', remote_url=video_url, material_name=material_name, duration = video_duration, width=0, height=0)
|
||||
|
||||
# 创建source_timerange和target_timerange
|
||||
source_timerange = trange(f"{start}s", f"{source_duration}s")
|
||||
target_timerange = trange(f"{target_start}s", f"{target_duration}s")
|
||||
|
||||
video_segment = draft.Video_segment(
|
||||
video_material,
|
||||
target_timerange=target_timerange,
|
||||
source_timerange=source_timerange,
|
||||
speed=speed,
|
||||
clip_settings=Clip_settings(
|
||||
transform_y=transform_y,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
transform_x=transform_x
|
||||
),
|
||||
volume=volume
|
||||
)
|
||||
|
||||
# 添加转场效果
|
||||
if transition:
|
||||
try:
|
||||
# 获取转场类型
|
||||
if IS_CAPCUT_ENV:
|
||||
transition_type = getattr(draft.CapCut_Transition_type, transition)
|
||||
else:
|
||||
transition_type = getattr(draft.Transition_type, transition)
|
||||
|
||||
# 设置转场时长(转换为微秒)
|
||||
duration_microseconds = int(transition_duration * 1e6)
|
||||
|
||||
# 添加转场
|
||||
video_segment.add_transition(transition_type, duration=duration_microseconds)
|
||||
except AttributeError:
|
||||
raise ValueError(f"不支持的转场类型: {transition},已跳过转场设置")
|
||||
|
||||
# 添加蒙版效果
|
||||
if mask_type:
|
||||
try:
|
||||
if IS_CAPCUT_ENV:
|
||||
mask_type_enum = getattr(draft.CapCut_Mask_type, mask_type)
|
||||
else:
|
||||
mask_type_enum = getattr(draft.Mask_type, mask_type)
|
||||
video_segment.add_mask(
|
||||
script,
|
||||
mask_type_enum,
|
||||
center_x=mask_center_x,
|
||||
center_y=mask_center_y,
|
||||
size=mask_size,
|
||||
rotation=mask_rotation,
|
||||
feather=mask_feather,
|
||||
invert=mask_invert,
|
||||
rect_width=mask_rect_width,
|
||||
round_corner=mask_round_corner
|
||||
)
|
||||
except:
|
||||
raise ValueError(f"不支持的蒙版类型 {mask_type},支持的类型包括:线性、镜面、圆形、矩形、爱心、星形")
|
||||
|
||||
# 添加视频片段到轨道
|
||||
# if imported_track is not None:
|
||||
# imported_track.add_segment(video_segment)
|
||||
# else:
|
||||
script.add_segment(video_segment, track_name=track_name)
|
||||
|
||||
return {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": generate_draft_url(draft_id)
|
||||
}
|
||||
807
capcut_server.py
Normal file
807
capcut_server.py
Normal file
@@ -0,0 +1,807 @@
|
||||
import requests
|
||||
from flask import Flask, request, jsonify, Response
|
||||
from datetime import datetime
|
||||
import pyJianYingDraft as draft
|
||||
import random
|
||||
import uuid
|
||||
import json
|
||||
import codecs
|
||||
from add_audio_track import add_audio_track
|
||||
from add_video_track import add_video_track
|
||||
from add_text_impl import add_text_impl
|
||||
from add_subtitle_impl import add_subtitle_impl
|
||||
from add_image_impl import add_image_impl
|
||||
from add_video_keyframe_impl import add_video_keyframe_impl
|
||||
from save_draft_impl import save_draft_impl, query_task_status, query_script_impl
|
||||
from add_effect_impl import add_effect_impl
|
||||
from add_sticker_impl import add_sticker_impl
|
||||
from create_draft import create_draft
|
||||
from util import generate_draft_url as utilgenerate_draft_url
|
||||
|
||||
from settings.local import IS_CAPCUT_ENV, DRAFT_DOMAIN, PREVIEW_ROUTER
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/add_video', methods=['POST'])
|
||||
def add_video():
|
||||
data = request.get_json()
|
||||
# 获取必要参数
|
||||
draft_folder = data.get('draft_folder')
|
||||
video_url = data.get('video_url')
|
||||
start = data.get('start', 0)
|
||||
end = data.get('end', 0)
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
draft_id = data.get('draft_id')
|
||||
transform_y = data.get('transform_y', 0)
|
||||
scale_x = data.get('scale_x', 1)
|
||||
scale_y = data.get('scale_y', 1)
|
||||
transform_x = data.get('transform_x', 0)
|
||||
speed = data.get('speed', 1.0) # 新增速度参数
|
||||
target_start = data.get('target_start', 0) # 新增目标开始时间参数
|
||||
track_name = data.get('track_name', "video_main") # 新增轨道名称参数
|
||||
relative_index = data.get('relative_index', 0) # 新增相对索引参数
|
||||
duration = data.get('duration') # 新增时长参数
|
||||
transition = data.get('transition') # 新增转场类型参数
|
||||
transition_duration = data.get('transition_duration', 0.5) # 新增转场持续时间参数,默认0.5秒
|
||||
volume = data.get('volume', 1.0) # 新增音量参数,默认1.0
|
||||
|
||||
# 获取蒙版相关参数
|
||||
mask_type = data.get('mask_type') # 蒙版类型
|
||||
mask_center_x = data.get('mask_center_x', 0.5) # 蒙版中心X坐标
|
||||
mask_center_y = data.get('mask_center_y', 0.5) # 蒙版中心Y坐标
|
||||
mask_size = data.get('mask_size', 1.0) # 蒙版大小,相对屏幕高度的大小
|
||||
mask_rotation = data.get('mask_rotation', 0.0) # 蒙版旋转角度
|
||||
mask_feather = data.get('mask_feather', 0.0) # 蒙版羽化程度
|
||||
mask_invert = data.get('mask_invert', False) # 是否反转蒙版
|
||||
mask_rect_width = data.get('mask_rect_width') # 矩形蒙版宽度
|
||||
mask_round_corner = data.get('mask_round_corner') # 矩形蒙版圆角
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not video_url:
|
||||
error_message = "Hi, the required parameters 'video_url' are missing."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
draft_result = add_video_track(
|
||||
draft_folder=draft_folder,
|
||||
video_url=video_url,
|
||||
width=width,
|
||||
height=height,
|
||||
start=start,
|
||||
end=end,
|
||||
target_start=target_start,
|
||||
draft_id=draft_id,
|
||||
transform_y=transform_y,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
transform_x=transform_x,
|
||||
speed=speed,
|
||||
track_name=track_name,
|
||||
relative_index=relative_index,
|
||||
duration=duration,
|
||||
transition=transition, # 传入转场类型参数
|
||||
transition_duration=transition_duration, # 传入转场持续时间参数
|
||||
volume=volume, # 传入音量参数
|
||||
# 传入蒙版相关参数
|
||||
mask_type=mask_type,
|
||||
mask_center_x=mask_center_x,
|
||||
mask_center_y=mask_center_y,
|
||||
mask_size=mask_size,
|
||||
mask_rotation=mask_rotation,
|
||||
mask_feather=mask_feather,
|
||||
mask_invert=mask_invert,
|
||||
mask_rect_width=mask_rect_width,
|
||||
mask_round_corner=mask_round_corner
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while processing video: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_audio', methods=['POST'])
|
||||
def add_audio():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
draft_folder = data.get('draft_folder')
|
||||
audio_url = data.get('audio_url')
|
||||
start = data.get('start', 0)
|
||||
end = data.get('end', None)
|
||||
draft_id = data.get('draft_id')
|
||||
volume = data.get('volume', 1.0) # 默认音量1.0
|
||||
target_start = data.get('target_start', 0) # 新增目标开始时间参数
|
||||
speed = data.get('speed', 1.0) # 新增速度参数
|
||||
track_name = data.get('track_name', 'audio_main') # 新增轨道名称参数
|
||||
duration = data.get('duration', None) # 新增 duration 参数
|
||||
# 音效参数分开获取
|
||||
effect_type = data.get('effect_type', None) # 音效类型名称
|
||||
effect_params = data.get('effect_params', None) # 音效参数列表
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
|
||||
# # 如果有音效参数,将其组合成sound_effects格式
|
||||
sound_effects = None
|
||||
if effect_type is not None:
|
||||
sound_effects = [(effect_type, effect_params)]
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not audio_url:
|
||||
error_message = "Hi, the required parameters 'audio_url' are missing."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 调用修改后的 add_audio_track 方法
|
||||
draft_result = add_audio_track(
|
||||
draft_folder=draft_folder,
|
||||
audio_url=audio_url,
|
||||
start=start,
|
||||
end=end,
|
||||
target_start=target_start,
|
||||
draft_id=draft_id,
|
||||
volume=volume,
|
||||
track_name=track_name,
|
||||
speed=speed,
|
||||
sound_effects=sound_effects, # 添加音效参数
|
||||
width=width,
|
||||
height=height,
|
||||
duration=duration # 添加 duration 参数
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while processing audio: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/create_draft', methods=['POST'])
|
||||
def create_draft_service():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取参数
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
try:
|
||||
# 创建新草稿
|
||||
script, draft_id = create_draft(width=width, height=height)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = {
|
||||
"draft_id": draft_id,
|
||||
"draft_url": utilgenerate_draft_url(draft_id)
|
||||
}
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while creating draft: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_subtitle', methods=['POST'])
|
||||
def add_subtitle():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
srt = data.get('srt') # 字幕内容或URL
|
||||
draft_id = data.get('draft_id')
|
||||
time_offset = data.get('time_offset', 0.0) # 默认0秒
|
||||
|
||||
# 字体样式参数
|
||||
font_size = data.get('font_size', 5.0) # 默认大小5.0
|
||||
bold = data.get('bold', False) # 默认不加粗
|
||||
italic = data.get('italic', False) # 默认不斜体
|
||||
underline = data.get('underline', False) # 默认不下划线
|
||||
font_color = data.get('font_color', '#FFFFFF') # 默认白色
|
||||
vertical = data.get('vertical', False) # 新增:是否垂直显示,默认False
|
||||
alpha = data.get('alpha', 1) # 新增:透明度,默认1
|
||||
# 边框参数
|
||||
border_alpha = data.get('border_alpha', 1.0)
|
||||
border_color = data.get('border_color', '#000000')
|
||||
border_width = data.get('border_width', 0.0)
|
||||
|
||||
# 背景参数
|
||||
background_color = data.get('background_color', '#000000')
|
||||
background_style = data.get('background_style', 0)
|
||||
background_alpha = data.get('background_alpha', 0.0)
|
||||
|
||||
# 图像调节参数
|
||||
transform_x = data.get('transform_x', 0.0) # 默认0
|
||||
transform_y = data.get('transform_y', -0.8) # 默认-0.8
|
||||
scale_x = data.get('scale_x', 1.0) # 默认1.0
|
||||
scale_y = data.get('scale_y', 1.0) # 默认1.0
|
||||
rotation = data.get('rotation', 0.0) # 默认0.0
|
||||
track_name = data.get('track_name', 'subtitle') # 默认轨道名称为'subtitle'
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not srt:
|
||||
error_message = "Hi, the required parameters 'srt' are missing."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 调用 add_subtitle_impl 方法
|
||||
draft_result = add_subtitle_impl(
|
||||
srt_path=srt,
|
||||
draft_id=draft_id,
|
||||
track_name=track_name,
|
||||
time_offset=time_offset,
|
||||
# 字体样式参数
|
||||
font_size=font_size,
|
||||
bold=bold,
|
||||
italic=italic,
|
||||
underline=underline,
|
||||
font_color=font_color,
|
||||
vertical=vertical, # 新增:传递vertical参数
|
||||
alpha=alpha, # 新增:传递alpha参数
|
||||
border_alpha=border_alpha,
|
||||
border_color=border_color,
|
||||
border_width=border_width,
|
||||
background_color=background_color,
|
||||
background_style=background_style,
|
||||
background_alpha=background_alpha,
|
||||
# 图像调节参数
|
||||
transform_x=transform_x,
|
||||
transform_y=transform_y,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
rotation=rotation,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while processing subtitle: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_text', methods=['POST'])
|
||||
def add_text():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
text = data.get('text')
|
||||
start = data.get('start', 0)
|
||||
end = data.get('end', 5)
|
||||
draft_id = data.get('draft_id')
|
||||
transform_y = data.get('transform_y', 0)
|
||||
transform_x = data.get('transform_x', 0)
|
||||
font = data.get('font', "文轩体")
|
||||
font_color = data.get('font_color', "#FF0000")
|
||||
font_size = data.get('font_size', 8.0)
|
||||
track_name = data.get('track_name', "text_main")
|
||||
vertical = data.get('vertical', False)
|
||||
font_alpha = data.get('font_alpha', 1.0)
|
||||
outro_animation = data.get('outro_animation', None)
|
||||
outro_duration = data.get('outro_duration', 0.5)
|
||||
track_name = data.get('track_name', 'text_main')
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
|
||||
# 新增固定宽高参数
|
||||
fixed_width = data.get('fixed_width', -1)
|
||||
fixed_height = data.get('fixed_height', -1)
|
||||
|
||||
# 描边参数
|
||||
border_alpha = data.get('border_alpha', 1.0)
|
||||
border_color = data.get('border_color', "#000000")
|
||||
border_width = data.get('border_width', 0.0)
|
||||
|
||||
# 背景参数
|
||||
background_color = data.get('background_color', "#000000")
|
||||
background_style = data.get('background_style', 0)
|
||||
background_alpha = data.get('background_alpha', 0.0)
|
||||
|
||||
# 气泡和花字效果
|
||||
bubble_effect_id = data.get('bubble_effect_id')
|
||||
bubble_resource_id = data.get('bubble_resource_id')
|
||||
effect_effect_id = data.get('effect_effect_id')
|
||||
|
||||
# 入场动画
|
||||
intro_animation = data.get('intro_animation')
|
||||
intro_duration = data.get('intro_duration', 0.5)
|
||||
|
||||
# 出场动画
|
||||
outro_animation = data.get('outro_animation')
|
||||
outro_duration = data.get('outro_duration', 0.5)
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not text or start is None or end is None:
|
||||
error_message = "Hi, the required parameters 'text', 'start' or 'end' are missing. "
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
|
||||
# 调用 add_text_impl 方法
|
||||
draft_result = add_text_impl(
|
||||
text=text,
|
||||
start=start,
|
||||
end=end,
|
||||
draft_id=draft_id,
|
||||
transform_y=transform_y,
|
||||
transform_x=transform_x,
|
||||
font=font,
|
||||
font_color=font_color,
|
||||
font_size=font_size,
|
||||
track_name=track_name,
|
||||
vertical=vertical,
|
||||
font_alpha=font_alpha,
|
||||
border_alpha=border_alpha,
|
||||
border_color=border_color,
|
||||
border_width=border_width,
|
||||
background_color=background_color,
|
||||
background_style=background_style,
|
||||
background_alpha=background_alpha,
|
||||
bubble_effect_id=bubble_effect_id,
|
||||
bubble_resource_id=bubble_resource_id,
|
||||
effect_effect_id=effect_effect_id,
|
||||
intro_animation=intro_animation,
|
||||
intro_duration=intro_duration,
|
||||
outro_animation=outro_animation,
|
||||
outro_duration=outro_duration,
|
||||
width=width,
|
||||
height=height,
|
||||
fixed_width=fixed_width,
|
||||
fixed_height=fixed_height
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
if is_chinese:
|
||||
error_message = f"处理文本时出错啦:{str(e)}。您可以点击下面的链接寻求帮助:"
|
||||
else:
|
||||
error_message = f"Error occurred while processing text: {str(e)}. You can click the link below for help: "
|
||||
result["error"] = error_message + purchase_link
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_image', methods=['POST'])
|
||||
def add_image():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
draft_folder = data.get('draft_folder')
|
||||
image_url = data.get('image_url')
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
start = data.get('start', 0)
|
||||
end = data.get('end', 3.0) # 默认显示3秒
|
||||
draft_id = data.get('draft_id')
|
||||
transform_y = data.get('transform_y', 0)
|
||||
scale_x = data.get('scale_x', 1)
|
||||
scale_y = data.get('scale_y', 1)
|
||||
transform_x = data.get('transform_x', 0)
|
||||
track_name = data.get('track_name', "image_main") # 默认轨道名称
|
||||
relative_index = data.get('relative_index', 0) # 新增轨道渲染顺序索引参数
|
||||
animation = data.get('animation') # 入场动画参数(向后兼容)
|
||||
animation_duration = data.get('animation_duration', 0.5) # 入场动画持续时间
|
||||
intro_animation = data.get('intro_animation') # 新增入场动画参数,优先级高于animation
|
||||
intro_animation_duration = data.get('intro_animation_duration', 0.5)
|
||||
outro_animation = data.get('outro_animation') # 新增出场动画参数
|
||||
outro_animation_duration = data.get('outro_animation_duration', 0.5) # 新增出场动画持续时间
|
||||
combo_animation = data.get('combo_animation') # 新增组合动画参数
|
||||
combo_animation_duration = data.get('combo_animation_duration', 0.5) # 新增组合动画持续时间
|
||||
transition = data.get('transition') # 转场类型参数
|
||||
transition_duration = data.get('transition_duration', 0.5) # 转场持续时间参数,默认0.5秒
|
||||
|
||||
# 新增蒙版相关参数
|
||||
mask_type = data.get('mask_type') # 蒙版类型
|
||||
mask_center_x = data.get('mask_center_x', 0.0) # 蒙版中心点X坐标
|
||||
mask_center_y = data.get('mask_center_y', 0.0) # 蒙版中心点Y坐标
|
||||
mask_size = data.get('mask_size', 0.5) # 蒙版主要尺寸,相对画布高度
|
||||
mask_rotation = data.get('mask_rotation', 0.0) # 蒙版旋转角度
|
||||
mask_feather = data.get('mask_feather', 0.0) # 蒙版羽化参数
|
||||
mask_invert = data.get('mask_invert', False) # 是否反转蒙版
|
||||
mask_rect_width = data.get('mask_rect_width') # 矩形蒙版宽度
|
||||
mask_round_corner = data.get('mask_round_corner') # 矩形蒙版圆角
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not image_url:
|
||||
error_message = "Hi, the required parameters 'image_url' are missing."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
draft_result = add_image_impl(
|
||||
draft_folder=draft_folder,
|
||||
image_url=image_url,
|
||||
width=width,
|
||||
height=height,
|
||||
start=start,
|
||||
end=end,
|
||||
draft_id=draft_id,
|
||||
transform_y=transform_y,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
transform_x=transform_x,
|
||||
track_name=track_name,
|
||||
relative_index=relative_index, # 传入轨道渲染顺序索引参数
|
||||
animation=animation, # 传入入场动画参数(向后兼容)
|
||||
animation_duration=animation_duration, # 传入入场动画持续时间
|
||||
intro_animation=intro_animation, # 传入新的入场动画参数
|
||||
intro_animation_duration=intro_animation_duration,
|
||||
outro_animation=outro_animation, # 传入出场动画参数
|
||||
outro_animation_duration=outro_animation_duration, # 传入出场动画持续时间
|
||||
combo_animation=combo_animation, # 传入组合动画参数
|
||||
combo_animation_duration=combo_animation_duration, # 传入组合动画持续时间
|
||||
transition=transition, # 传入转场类型参数
|
||||
transition_duration=transition_duration, # 传入转场持续时间参数(秒)
|
||||
# 传入蒙版相关参数
|
||||
mask_type=mask_type,
|
||||
mask_center_x=mask_center_x,
|
||||
mask_center_y=mask_center_y,
|
||||
mask_size=mask_size,
|
||||
mask_rotation=mask_rotation,
|
||||
mask_feather=mask_feather,
|
||||
mask_invert=mask_invert,
|
||||
mask_rect_width=mask_rect_width,
|
||||
mask_round_corner=mask_round_corner
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while processing image: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_video_keyframe', methods=['POST'])
|
||||
def add_video_keyframe():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
draft_id = data.get('draft_id')
|
||||
track_name = data.get('track_name', 'video_main') # 默认主轨道
|
||||
|
||||
# 单个关键帧参数(向后兼容)
|
||||
property_type = data.get('property_type', 'alpha') # 默认不透明度
|
||||
time = data.get('time', 0.0) # 默认0秒
|
||||
value = data.get('value', '1.0') # 默认值1.0
|
||||
|
||||
# 批量关键帧参数(新增)
|
||||
property_types = data.get('property_types') # 属性类型列表
|
||||
times = data.get('times') # 时间列表
|
||||
values = data.get('values') # 值列表
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
try:
|
||||
# 调用 add_video_keyframe_impl 方法
|
||||
draft_result = add_video_keyframe_impl(
|
||||
draft_id=draft_id,
|
||||
track_name=track_name,
|
||||
property_type=property_type,
|
||||
time=time,
|
||||
value=value,
|
||||
property_types=property_types,
|
||||
times=times,
|
||||
values=values
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while adding keyframe: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_effect', methods=['POST'])
|
||||
def add_effect():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
effect_type = data.get('effect_type') # 特效类型名称,将从Video_scene_effect_type或Video_character_effect_type中匹配
|
||||
start = data.get('start', 0) # 开始时间(秒),默认0
|
||||
end = data.get('end', 3.0) # 结束时间(秒),默认3秒
|
||||
draft_id = data.get('draft_id') # 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
track_name = data.get('track_name', "effect_01") # 轨道名称,当特效轨道仅有一条时可省略
|
||||
params = data.get('params') # 特效参数列表,参数列表中未提供或为None的项使用默认值
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not effect_type:
|
||||
error_message = "Hi, the required parameters 'effect_type' are missing. Please add them and try again."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 调用 add_effect_impl 方法
|
||||
draft_result = add_effect_impl(
|
||||
effect_type=effect_type,
|
||||
start=start,
|
||||
end=end,
|
||||
draft_id=draft_id,
|
||||
track_name=track_name,
|
||||
params=params,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while adding effect: {str(e)}. "
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/query_script', methods=['POST'])
|
||||
def query_script():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
draft_id = data.get('draft_id')
|
||||
force_update = data.get('force_update', True)
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not draft_id:
|
||||
error_message = "Hi, the required parameter 'draft_id' is missing. Please add it and try again."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 调用 query_script_impl 方法
|
||||
script = query_script_impl(draft_id=draft_id, force_update=force_update)
|
||||
|
||||
if script is None:
|
||||
error_message = f"Draft {draft_id} does not exist in cache."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
# 将脚本对象转换为JSON可序列化的字典
|
||||
script_str = script.dumps()
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = script_str
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while querying script: {str(e)}. "
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/save_draft', methods=['POST'])
|
||||
def save_draft():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
draft_id = data.get('draft_id')
|
||||
draft_folder = data.get('draft_folder') # 草稿文件夹参数
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not draft_id:
|
||||
error_message = "Hi, the required parameter 'draft_id' is missing. Please add it and try again."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 调用 save_draft_impl 方法,启动后台任务
|
||||
draft_result = save_draft_impl(draft_id, draft_folder)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while saving draft: {str(e)}. "
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
# 添加新的查询状态接口
|
||||
@app.route('/query_draft_status', methods=['POST'])
|
||||
def query_draft_status():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
task_id = data.get('task_id')
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not task_id:
|
||||
error_message = "Hi, the required parameter 'task_id' is missing. Please add it and try again."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 获取任务状态
|
||||
task_status = query_task_status(task_id)
|
||||
|
||||
if task_status["status"] == "not_found":
|
||||
error_message = f"Task with ID {task_id} not found. Please check if the task ID is correct."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = task_status
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while querying task status: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/generate_draft_url', methods=['POST'])
|
||||
def generate_draft_url():
|
||||
data = request.get_json()
|
||||
|
||||
# 获取必要参数
|
||||
draft_id = data.get('draft_id')
|
||||
draft_folder = data.get('draft_folder') # 新增draft_folder参数
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not draft_id:
|
||||
error_message = "Hi, the required parameter 'draft_id' is missing. Please add it and try again."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
draft_result = { "draft_url" : f"{DRAFT_DOMAIN}{PREVIEW_ROUTER}?={draft_id}"}
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while saving draft: {str(e)}."
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
@app.route('/add_sticker', methods=['POST'])
|
||||
def add_sticker():
|
||||
data = request.get_json()
|
||||
# 获取必要参数
|
||||
resource_id = data.get('sticker_id')
|
||||
start = data.get('start', 0)
|
||||
end = data.get('end', 5.0) # 默认显示5秒
|
||||
draft_id = data.get('draft_id')
|
||||
transform_y = data.get('transform_y', 0)
|
||||
transform_x = data.get('transform_x', 0)
|
||||
alpha = data.get('alpha', 1.0)
|
||||
flip_horizontal = data.get('flip_horizontal', False)
|
||||
flip_vertical = data.get('flip_vertical', False)
|
||||
rotation = data.get('rotation', 0.0)
|
||||
scale_x = data.get('scale_x', 1.0)
|
||||
scale_y = data.get('scale_y', 1.0)
|
||||
track_name = data.get('track_name', 'sticker_main')
|
||||
relative_index = data.get('relative_index', 0)
|
||||
width = data.get('width', 1080)
|
||||
height = data.get('height', 1920)
|
||||
|
||||
result = {
|
||||
"success": False,
|
||||
"output": "",
|
||||
"error": ""
|
||||
}
|
||||
|
||||
# 验证必要参数
|
||||
if not resource_id:
|
||||
error_message = "Hi, the required parameter 'sticker_id' is missing. Please add it and try again. "
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
try:
|
||||
# 调用 add_sticker_impl 方法
|
||||
draft_result = add_sticker_impl(
|
||||
resource_id=resource_id,
|
||||
start=start,
|
||||
end=end,
|
||||
draft_id=draft_id,
|
||||
transform_y=transform_y,
|
||||
transform_x=transform_x,
|
||||
alpha=alpha,
|
||||
flip_horizontal=flip_horizontal,
|
||||
flip_vertical=flip_vertical,
|
||||
rotation=rotation,
|
||||
scale_x=scale_x,
|
||||
scale_y=scale_y,
|
||||
track_name=track_name,
|
||||
relative_index=relative_index,
|
||||
width=width,
|
||||
height=height
|
||||
)
|
||||
|
||||
result["success"] = True
|
||||
result["output"] = draft_result
|
||||
return jsonify(result)
|
||||
|
||||
except Exception as e:
|
||||
error_message = f"Error occurred while adding sticker: {str(e)}. "
|
||||
result["error"] = error_message
|
||||
return jsonify(result)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host='0.0.0.0', port=9000)
|
||||
25
config.json.example
Normal file
25
config.json.example
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
// 是否是剪映国际版,默认为true
|
||||
"is_capcut_env": true,
|
||||
// API 路由
|
||||
"draft_domain": "https://www.install-ai-guider.top",
|
||||
// 预览路由
|
||||
"preview_router": "/draft/downloader",
|
||||
// 是否上传草稿文件
|
||||
"is_upload_draft": false,
|
||||
// 上传草稿文件到阿里云OSS的配置
|
||||
"oss_config": {
|
||||
"bucket_name": "your-bucket-name",
|
||||
"access_key_id": "your-access-key-id",
|
||||
"access_key_secret": "your-access-key-secret",
|
||||
"endpoint": "https://your-endpoint.aliyuncs.com"
|
||||
},
|
||||
// 上传渲染的MP4文件到阿里云OSS的配置
|
||||
"mp4_oss_config": {
|
||||
"bucket_name": "your-mp4-bucket-name",
|
||||
"access_key_id": "your-access-key-id",
|
||||
"access_key_secret": "your-access-key-secret",
|
||||
"region": "your-region",
|
||||
"endpoint": "http://your-custom-domain"
|
||||
}
|
||||
}
|
||||
50
create_draft.py
Normal file
50
create_draft.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import uuid
|
||||
import pyJianYingDraft as draft
|
||||
import time
|
||||
from draft_cache import DRAFT_CACHE, update_cache
|
||||
|
||||
def create_draft(width=1080, height=1920):
|
||||
"""
|
||||
创建新的剪映草稿
|
||||
:param width: 视频宽度,默认1080
|
||||
:param height: 视频高度,默认1920
|
||||
:return: (draft_name, draft_path, draft_id, draft_url)
|
||||
"""
|
||||
# 生成时间戳和draft_id
|
||||
unix_time = int(time.time())
|
||||
unique_id = uuid.uuid4().hex[:8] # 取UUID的前8位即可
|
||||
draft_id = f"dfd_cat_{unix_time}_{unique_id}" # 使用Unix时间戳和UUID组合
|
||||
|
||||
# 创建指定分辨率的剪映草稿
|
||||
script = draft.Script_file(width, height)
|
||||
|
||||
# 存入全局缓存
|
||||
update_cache(draft_id, script)
|
||||
|
||||
return script, draft_id
|
||||
|
||||
def get_or_create_draft(draft_id=None, width=1080, height=1920):
|
||||
"""
|
||||
获取或创建剪映草稿
|
||||
:param draft_id: 草稿ID,如果为None或找不到对应的zip文件,则创建新草稿
|
||||
:param width: 视频宽度,默认1080
|
||||
:param height: 视频高度,默认1920
|
||||
:return: (draft_name, draft_path, draft_id, draft_dir, script)
|
||||
"""
|
||||
global DRAFT_CACHE # 声明使用全局变量
|
||||
|
||||
if draft_id is not None and draft_id in DRAFT_CACHE:
|
||||
# 从缓存中获取已存在的草稿信息
|
||||
print(f"从缓存中获取草稿: {draft_id}")
|
||||
# 更新最近访问时间
|
||||
update_cache(draft_id, DRAFT_CACHE[draft_id])
|
||||
return draft_id, DRAFT_CACHE[draft_id]
|
||||
|
||||
# 创建新草稿逻辑
|
||||
print("创建新草稿")
|
||||
script, generate_draft_id = create_draft(
|
||||
width=width,
|
||||
height=height,
|
||||
)
|
||||
return generate_draft_id, script
|
||||
|
||||
169
downloader.py
Normal file
169
downloader.py
Normal file
@@ -0,0 +1,169 @@
|
||||
import os
|
||||
import subprocess
|
||||
import time
|
||||
import requests
|
||||
from requests.exceptions import RequestException, Timeout
|
||||
from urllib.parse import urlparse, unquote
|
||||
|
||||
def download_video(video_url, draft_name, material_name):
|
||||
"""
|
||||
下载视频到指定目录
|
||||
:param video_url: 视频URL
|
||||
:param draft_name: 草稿名称
|
||||
:param material_name: 素材名称
|
||||
:return: 本地视频路径
|
||||
"""
|
||||
# 确保目录存在
|
||||
video_dir = f"{draft_name}/assets/video"
|
||||
os.makedirs(video_dir, exist_ok=True)
|
||||
|
||||
# 生成本地文件名
|
||||
local_path = f"{video_dir}/{material_name}"
|
||||
|
||||
# 检查文件是否已存在
|
||||
if os.path.exists(local_path):
|
||||
print(f"视频文件已存在: {local_path}")
|
||||
return local_path
|
||||
|
||||
try:
|
||||
# 使用ffmpeg下载视频
|
||||
command = [
|
||||
'ffmpeg',
|
||||
'-i', video_url,
|
||||
'-c', 'copy', # 直接复制,不重新编码
|
||||
local_path
|
||||
]
|
||||
subprocess.run(command, check=True, capture_output=True)
|
||||
return local_path
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception(f"下载视频失败: {e.stderr.decode('utf-8')}")
|
||||
|
||||
def download_image(image_url, draft_name, material_name):
|
||||
"""
|
||||
下载图片到指定目录,并统一转换为PNG格式
|
||||
:param image_url: 图片URL
|
||||
:param draft_name: 草稿名称
|
||||
:param material_name: 素材名称
|
||||
:return: 本地图片路径
|
||||
"""
|
||||
# 确保目录存在
|
||||
image_dir = f"{draft_name}/assets/image"
|
||||
os.makedirs(image_dir, exist_ok=True)
|
||||
|
||||
# 统一使用png格式
|
||||
local_path = f"{image_dir}/{material_name}"
|
||||
|
||||
# 检查文件是否已存在
|
||||
if os.path.exists(local_path):
|
||||
print(f"图片文件已存在: {local_path}")
|
||||
return local_path
|
||||
|
||||
try:
|
||||
# 使用ffmpeg下载并转换图片为PNG格式
|
||||
command = [
|
||||
'ffmpeg',
|
||||
'-i', image_url,
|
||||
'-vf', 'format=rgba', # 转换为RGBA格式以支持透明度
|
||||
'-frames:v', '1', # 确保只处理一帧
|
||||
'-y', # 覆盖已存在的文件
|
||||
local_path
|
||||
]
|
||||
subprocess.run(command, check=True, capture_output=True)
|
||||
return local_path
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception(f"下载图片失败: {e.stderr.decode('utf-8')}")
|
||||
|
||||
def download_audio(audio_url, draft_name, material_name):
|
||||
"""
|
||||
下载音频并转码为MP3格式到指定目录
|
||||
:param audio_url: 音频URL
|
||||
:param draft_name: 草稿名称
|
||||
:param material_name: 素材名称
|
||||
:return: 本地音频路径
|
||||
"""
|
||||
# 确保目录存在
|
||||
audio_dir = f"{draft_name}/assets/audio"
|
||||
os.makedirs(audio_dir, exist_ok=True)
|
||||
|
||||
# 生成本地文件名(保留.mp3后缀)
|
||||
local_path = f"{audio_dir}/{material_name}"
|
||||
|
||||
# 检查文件是否已存在
|
||||
if os.path.exists(local_path):
|
||||
print(f"音频文件已存在: {local_path}")
|
||||
return local_path
|
||||
|
||||
try:
|
||||
# 使用ffmpeg下载并转码为MP3(关键修改:指定MP3编码器)
|
||||
command = [
|
||||
'ffmpeg',
|
||||
'-i', audio_url, # 输入URL
|
||||
'-c:a', 'libmp3lame', # 强制将音频流编码为MP3
|
||||
'-q:a', '2', # 设置音频质量(0-9,0为最佳,2为平衡质量与文件大小)
|
||||
'-y', # 覆盖已存在文件(可选)
|
||||
local_path # 输出路径
|
||||
]
|
||||
subprocess.run(command, check=True, capture_output=True, text=True)
|
||||
return local_path
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise Exception(f"下载音频失败:\n{e.stderr}")
|
||||
|
||||
def download_file(url:str, local_filename, max_retries=3, timeout=180):
|
||||
# 提取目录部分
|
||||
directory = os.path.dirname(local_filename)
|
||||
|
||||
retries = 0
|
||||
while retries < max_retries:
|
||||
try:
|
||||
if retries > 0:
|
||||
wait_time = 2 ** retries # 指数退避策略
|
||||
print(f"Retrying in {wait_time} seconds... (Attempt {retries+1}/{max_retries})")
|
||||
time.sleep(wait_time)
|
||||
|
||||
print(f"Downloading file: {local_filename}")
|
||||
start_time = time.time()
|
||||
|
||||
# 创建目录(如果不存在)
|
||||
if directory and not os.path.exists(directory):
|
||||
os.makedirs(directory, exist_ok=True)
|
||||
print(f"Created directory: {directory}")
|
||||
|
||||
with requests.get(url, stream=True, timeout=timeout) as response:
|
||||
response.raise_for_status()
|
||||
|
||||
total_size = int(response.headers.get('content-length', 0))
|
||||
block_size = 1024
|
||||
|
||||
with open(local_filename, 'wb') as file:
|
||||
bytes_written = 0
|
||||
for chunk in response.iter_content(block_size):
|
||||
if chunk:
|
||||
file.write(chunk)
|
||||
bytes_written += len(chunk)
|
||||
|
||||
if total_size > 0:
|
||||
progress = bytes_written / total_size * 100
|
||||
# 对于频繁更新的进度,可以考虑使用logger.debug或更细粒度的控制,避免日志文件过大
|
||||
# 或者只在控制台输出进度,不写入文件
|
||||
print(f"\r[PROGRESS] {progress:.2f}% ({bytes_written/1024:.2f}KB/{total_size/1024:.2f}KB)", end='')
|
||||
pass # 避免在日志文件中打印过多进度信息
|
||||
|
||||
if total_size > 0:
|
||||
# print() # 原始的换行符
|
||||
pass
|
||||
print(f"Download completed in {time.time()-start_time:.2f} seconds")
|
||||
print(f"File saved as: {os.path.abspath(local_filename)}")
|
||||
return True
|
||||
|
||||
except Timeout:
|
||||
print(f"Download timed out after {timeout} seconds")
|
||||
except RequestException as e:
|
||||
print(f"Request failed: {e}")
|
||||
except Exception as e:
|
||||
print(f"Unexpected error during download: {e}")
|
||||
|
||||
retries += 1
|
||||
|
||||
print(f"Download failed after {max_retries} attempts for URL: {url}")
|
||||
return False
|
||||
|
||||
19
draft_cache.py
Normal file
19
draft_cache.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from collections import OrderedDict
|
||||
import pyJianYingDraft as draft
|
||||
from typing import Dict
|
||||
|
||||
# 修改全局变量,使用OrderedDict实现LRU缓存,限制最大数量为10000
|
||||
DRAFT_CACHE: Dict[str, 'draft.Script_file'] = OrderedDict() # 使用 Dict 进行类型提示
|
||||
MAX_CACHE_SIZE = 10000
|
||||
|
||||
def update_cache(key: str, value: draft.Script_file) -> None:
|
||||
"""更新LRU缓存"""
|
||||
if key in DRAFT_CACHE:
|
||||
# 如果键存在,删除旧的项
|
||||
DRAFT_CACHE.pop(key)
|
||||
elif len(DRAFT_CACHE) >= MAX_CACHE_SIZE:
|
||||
print(f"{key}, 缓存已满,删除最久未使用的项")
|
||||
# 如果缓存已满,删除最久未使用的项(第一个项)
|
||||
DRAFT_CACHE.popitem(last=False)
|
||||
# 添加新项到末尾(最近使用)
|
||||
DRAFT_CACHE[key] = value
|
||||
2021
example.py
Normal file
2021
example.py
Normal file
File diff suppressed because it is too large
Load Diff
100
get_duration_impl.py
Normal file
100
get_duration_impl.py
Normal file
@@ -0,0 +1,100 @@
|
||||
import subprocess
|
||||
import json
|
||||
import time
|
||||
|
||||
def get_video_duration(video_url):
|
||||
"""
|
||||
获取视频时长,支持超时重试。
|
||||
:param video_url: 视频URL
|
||||
:return: 视频时长(秒)
|
||||
"""
|
||||
|
||||
# 定义重试次数和每次重试的等待时间
|
||||
max_retries = 3
|
||||
retry_delay_seconds = 1 # 每次重试间隔1秒
|
||||
timeout_seconds = 10 # 设置每次尝试的超时时间
|
||||
|
||||
for attempt in range(max_retries):
|
||||
print(f"尝试获取视频时长 (第 {attempt + 1}/{max_retries} 次尝试) ...")
|
||||
result = {"success": False, "output": 0, "error": None} # 每次重试前重置结果
|
||||
|
||||
try:
|
||||
command = [
|
||||
'ffprobe',
|
||||
'-v', 'error',
|
||||
'-show_entries', 'stream=duration',
|
||||
'-show_entries', 'format=duration',
|
||||
'-print_format', 'json',
|
||||
video_url
|
||||
]
|
||||
|
||||
# 使用 subprocess.run 更灵活地处理超时和输出
|
||||
process = subprocess.run(command,
|
||||
capture_output=True,
|
||||
text=True, # 自动解码为文本
|
||||
timeout=timeout_seconds, # 使用变量设置超时时间
|
||||
check=True) # 如果返回非零退出码则抛出CalledProcessError
|
||||
|
||||
info = json.loads(process.stdout)
|
||||
|
||||
# 优先从流中获取时长,因为更精确
|
||||
media_streams = [s for s in info.get('streams', []) if 'duration' in s]
|
||||
|
||||
if media_streams:
|
||||
duration = float(media_streams[0]['duration'])
|
||||
result["output"] = duration
|
||||
result["success"] = True
|
||||
# 否则从格式信息中获取时长
|
||||
elif 'format' in info and 'duration' in info['format']:
|
||||
duration = float(info['format']['duration'])
|
||||
result["output"] = duration
|
||||
result["success"] = True
|
||||
else:
|
||||
result["error"] = "未找到音视频时长信息。"
|
||||
|
||||
# 如果成功获取时长,直接返回结果,不再重试
|
||||
if result["success"]:
|
||||
print(f"成功获取时长: {result['output']:.2f} 秒")
|
||||
return result
|
||||
|
||||
except subprocess.TimeoutExpired:
|
||||
result["error"] = f"获取视频时长超时(超过{timeout_seconds}秒)。"
|
||||
print(f"尝试 {attempt + 1} 超时。")
|
||||
except subprocess.CalledProcessError as e:
|
||||
result["error"] = f"执行 ffprobe 命令出错 (退出码 {e.returncode}): {e.stderr.strip()}"
|
||||
print(f"尝试 {attempt + 1} 失败。错误: {e.stderr.strip()}")
|
||||
except json.JSONDecodeError as e:
|
||||
result["error"] = f"解析 JSON 数据出错: {e}"
|
||||
print(f"尝试 {attempt + 1} 失败。JSON 解析错误: {e}")
|
||||
except FileNotFoundError:
|
||||
result["error"] = "ffprobe 命令未找到。请确保 FFmpeg 已安装且在系统 PATH 中。"
|
||||
print("错误: ffprobe 命令未找到,请检查安装。")
|
||||
return result # ffprobe本身找不到,无需重试
|
||||
except Exception as e:
|
||||
result["error"] = f"发生未知错误: {e}"
|
||||
print(f"尝试 {attempt + 1} 失败。未知错误: {e}")
|
||||
|
||||
# 每次失败后都尝试使用远程服务获取时长
|
||||
if not result["success"]:
|
||||
print(f"本地获取失败")
|
||||
# try:
|
||||
# remote_duration = get_duration(video_url)
|
||||
# if remote_duration is not None:
|
||||
# result["success"] = True
|
||||
# result["output"] = remote_duration
|
||||
# result["error"] = None
|
||||
# print(f"远程服务成功获取时长: {remote_duration:.2f} 秒")
|
||||
# return result # 远程服务成功,直接返回
|
||||
# else:
|
||||
# print(f"远程服务也无法获取时长 (第 {attempt + 1} 次尝试)")
|
||||
# except Exception as e:
|
||||
# print(f"远程服务获取时长失败 (第 {attempt + 1} 次尝试): {e}")
|
||||
|
||||
# 如果当前尝试失败且未达到最大重试次数,则等待并准备下一次重试
|
||||
if not result["success"] and attempt < max_retries - 1:
|
||||
print(f"等待 {retry_delay_seconds} 秒后重试...")
|
||||
time.sleep(retry_delay_seconds)
|
||||
elif not result["success"] and attempt == max_retries - 1:
|
||||
print(f"已达到最大重试次数 {max_retries},本地和远程服务都无法获取时长。")
|
||||
|
||||
return result # 所有重试都失败后返回最后一次的失败结果
|
||||
47
oss.py
Normal file
47
oss.py
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
import oss2
|
||||
import os
|
||||
from settings.local import OSS_CONFIG, MP4_OSS_CONFIG
|
||||
|
||||
def upload_to_oss(path):
|
||||
# 创建OSS客户端
|
||||
auth = oss2.Auth(OSS_CONFIG['access_key_id'], OSS_CONFIG['access_key_secret'])
|
||||
bucket = oss2.Bucket(auth, OSS_CONFIG['endpoint'], OSS_CONFIG['bucket_name'])
|
||||
|
||||
# 上传文件
|
||||
object_name = os.path.basename(path)
|
||||
bucket.put_object_from_file(object_name, path)
|
||||
|
||||
# 生成签名URL(24小时有效)
|
||||
url = bucket.sign_url('GET', object_name, 24 * 60 * 60)
|
||||
|
||||
# 清理临时文件
|
||||
os.remove(path)
|
||||
|
||||
return url
|
||||
|
||||
def upload_mp4_to_oss(path):
|
||||
"""专门用于上传MP4文件的方法,使用自定义域名和v4签名"""
|
||||
# 直接使用配置文件中的凭证
|
||||
auth = oss2.AuthV4(MP4_OSS_CONFIG['access_key_id'], MP4_OSS_CONFIG['access_key_secret'])
|
||||
|
||||
# 创建OSS客户端,使用自定义域名
|
||||
bucket = oss2.Bucket(
|
||||
auth,
|
||||
MP4_OSS_CONFIG['endpoint'],
|
||||
MP4_OSS_CONFIG['bucket_name'],
|
||||
region=MP4_OSS_CONFIG['region'],
|
||||
is_cname=True
|
||||
)
|
||||
|
||||
# 上传文件
|
||||
object_name = os.path.basename(path)
|
||||
bucket.put_object_from_file(object_name, path)
|
||||
|
||||
# 生成预签名URL(24小时有效),设置slash_safe为True避免路径转义
|
||||
url = bucket.sign_url('GET', object_name, 24 * 60 * 60, slash_safe=True)
|
||||
|
||||
# 清理临时文件
|
||||
os.remove(path)
|
||||
|
||||
return url
|
||||
83
pyJianYingDraft/__init__.py
Normal file
83
pyJianYingDraft/__init__.py
Normal file
@@ -0,0 +1,83 @@
|
||||
from .local_materials import Crop_settings, Video_material, Audio_material
|
||||
from .keyframe import Keyframe_property
|
||||
|
||||
from .time_util import Timerange
|
||||
from .audio_segment import Audio_segment
|
||||
from .video_segment import Video_segment, Sticker_segment, Clip_settings
|
||||
from .effect_segment import Effect_segment, Filter_segment
|
||||
from .text_segment import Text_segment, Text_style, Text_border, Text_background
|
||||
|
||||
from .metadata import Font_type
|
||||
from .metadata import Mask_type
|
||||
from .metadata import CapCut_Mask_type
|
||||
from .metadata import Transition_type, Filter_type
|
||||
from .metadata import CapCut_Transition_type
|
||||
from .metadata import Intro_type, Outro_type, Group_animation_type
|
||||
from .metadata import CapCut_Intro_type, CapCut_Outro_type, CapCut_Group_animation_type
|
||||
from .metadata import Text_intro, Text_outro, Text_loop_anim
|
||||
from .metadata import CapCut_Text_intro, CapCut_Text_outro, CapCut_Text_loop_anim
|
||||
from .metadata import Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type
|
||||
from .metadata import CapCut_Voice_filters_effect_type, CapCut_Voice_characters_effect_type, CapCut_Speech_to_song_effect_type
|
||||
from .metadata import Video_scene_effect_type, Video_character_effect_type
|
||||
from .metadata import CapCut_Video_scene_effect_type, CapCut_Video_character_effect_type
|
||||
|
||||
from .track import Track_type
|
||||
from .template_mode import Shrink_mode, Extend_mode
|
||||
from .script_file import Script_file
|
||||
from .draft_folder import Draft_folder
|
||||
|
||||
from .time_util import SEC, tim, trange
|
||||
|
||||
__all__ = [
|
||||
"Font_type",
|
||||
"Mask_type",
|
||||
"CapCut_Mask_type",
|
||||
"Filter_type",
|
||||
"Transition_type",
|
||||
"CapCut_Transition_type",
|
||||
"Intro_type",
|
||||
"Outro_type",
|
||||
"Group_animation_type",
|
||||
"CapCut_Intro_type",
|
||||
"CapCut_Outro_type",
|
||||
"CapCut_Group_animation_type",
|
||||
"Text_intro",
|
||||
"Text_outro",
|
||||
"Text_loop_anim",
|
||||
"CapCut_Text_intro",
|
||||
"CapCut_Text_outro",
|
||||
"CapCut_Text_loop_anim",
|
||||
"Audio_scene_effect_type",
|
||||
"Tone_effect_type",
|
||||
"Speech_to_song_type",
|
||||
"Video_scene_effect_type",
|
||||
"Video_character_effect_type",
|
||||
"CapCut_Voice_filters_effect_type",
|
||||
"CapCut_Voice_characters_effect_type",
|
||||
"CapCut_Speech_to_song_effect_type",
|
||||
"CapCut_Video_scene_effect_type",
|
||||
"CapCut_Video_character_effect_type",
|
||||
"Crop_settings",
|
||||
"Video_material",
|
||||
"Audio_material",
|
||||
"Keyframe_property",
|
||||
"Timerange",
|
||||
"Audio_segment",
|
||||
"Video_segment",
|
||||
"Sticker_segment",
|
||||
"Clip_settings",
|
||||
"Effect_segment",
|
||||
"Filter_segment",
|
||||
"Text_segment",
|
||||
"Text_style",
|
||||
"Text_border",
|
||||
"Text_background",
|
||||
"Track_type",
|
||||
"Shrink_mode",
|
||||
"Extend_mode",
|
||||
"Script_file",
|
||||
"Draft_folder",
|
||||
"SEC",
|
||||
"tim",
|
||||
"trange"
|
||||
]
|
||||
142
pyJianYingDraft/animation.py
Normal file
142
pyJianYingDraft/animation.py
Normal file
@@ -0,0 +1,142 @@
|
||||
"""定义视频/文本动画相关类"""
|
||||
|
||||
import uuid
|
||||
|
||||
from typing import Union, Optional
|
||||
from typing import Literal, Dict, List, Any
|
||||
|
||||
from .time_util import Timerange
|
||||
|
||||
from .metadata.animation_meta import Animation_meta
|
||||
from .metadata import Intro_type, Outro_type, Group_animation_type
|
||||
from .metadata import CapCut_Intro_type, CapCut_Outro_type, CapCut_Group_animation_type
|
||||
from .metadata import Text_intro, Text_outro, Text_loop_anim
|
||||
from .metadata import CapCut_Text_intro, CapCut_Text_loop_anim, CapCut_Text_outro
|
||||
|
||||
class Animation:
|
||||
"""一个视频/文本动画效果"""
|
||||
|
||||
name: str
|
||||
"""动画名称, 默认取为动画效果的名称"""
|
||||
effect_id: str
|
||||
"""另一种动画id, 由剪映本身提供"""
|
||||
animation_type: str
|
||||
"""动画类型, 在子类中定义"""
|
||||
resource_id: str
|
||||
"""资源id, 由剪映本身提供"""
|
||||
|
||||
start: int
|
||||
"""动画相对此片段开头的偏移, 单位为微秒"""
|
||||
duration: int
|
||||
"""动画持续时间, 单位为微秒"""
|
||||
|
||||
is_video_animation: bool
|
||||
"""是否为视频动画, 在子类中定义"""
|
||||
|
||||
def __init__(self, animation_meta: Animation_meta, start: int, duration: int):
|
||||
self.name = animation_meta.title
|
||||
self.effect_id = animation_meta.effect_id
|
||||
self.resource_id = animation_meta.resource_id
|
||||
|
||||
self.start = start
|
||||
self.duration = duration
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"anim_adjust_params": None,
|
||||
"platform": "all",
|
||||
"panel": "video" if self.is_video_animation else "",
|
||||
"material_type": "video" if self.is_video_animation else "sticker",
|
||||
|
||||
"name": self.name,
|
||||
"id": self.effect_id,
|
||||
"type": self.animation_type,
|
||||
"resource_id": self.resource_id,
|
||||
|
||||
"start": self.start,
|
||||
"duration": self.duration,
|
||||
# 不导出path和request_id
|
||||
}
|
||||
|
||||
class Video_animation(Animation):
|
||||
"""一个视频动画效果"""
|
||||
|
||||
animation_type: Literal["in", "out", "group"]
|
||||
|
||||
def __init__(self, animation_type: Union[Intro_type, Outro_type, Group_animation_type, CapCut_Intro_type, CapCut_Outro_type, CapCut_Group_animation_type],
|
||||
start: int, duration: int):
|
||||
super().__init__(animation_type.value, start, duration)
|
||||
|
||||
if ((isinstance(animation_type, Intro_type) or isinstance(animation_type, CapCut_Intro_type))):
|
||||
self.animation_type = "in"
|
||||
elif isinstance(animation_type, Outro_type) or isinstance(animation_type, CapCut_Outro_type):
|
||||
self.animation_type = "out"
|
||||
elif isinstance(animation_type, Group_animation_type) or isinstance(animation_type, CapCut_Group_animation_type):
|
||||
self.animation_type = "group"
|
||||
|
||||
self.is_video_animation = True
|
||||
|
||||
class Text_animation(Animation):
|
||||
"""一个文本动画效果"""
|
||||
|
||||
animation_type: Literal["in", "out", "loop"]
|
||||
|
||||
def __init__(self, animation_type: Union[Text_intro, Text_outro, Text_loop_anim, CapCut_Text_intro, CapCut_Text_outro, CapCut_Text_loop_anim],
|
||||
start: int, duration: int):
|
||||
super().__init__(animation_type.value, start, duration)
|
||||
|
||||
if (isinstance(animation_type, Text_intro) or isinstance(animation_type, CapCut_Text_intro)):
|
||||
self.animation_type = "in"
|
||||
elif (isinstance(animation_type, Text_outro) or isinstance(animation_type, CapCut_Text_outro)):
|
||||
self.animation_type = "out"
|
||||
elif (isinstance(animation_type, Text_loop_anim) or isinstance(animation_type, CapCut_Text_loop_anim)):
|
||||
self.animation_type = "loop"
|
||||
|
||||
self.is_video_animation = False
|
||||
|
||||
class Segment_animations:
|
||||
"""附加于某素材上的一系列动画
|
||||
|
||||
对视频片段:入场、出场或组合动画;对文本片段:入场、出场或循环动画"""
|
||||
|
||||
animation_id: str
|
||||
"""系列动画的全局id, 自动生成"""
|
||||
|
||||
animations: List[Animation]
|
||||
"""动画列表"""
|
||||
|
||||
def __init__(self):
|
||||
self.animation_id = uuid.uuid4().hex
|
||||
self.animations = []
|
||||
|
||||
def get_animation_trange(self, animation_type: Literal["in", "out", "group", "loop"]) -> Optional[Timerange]:
|
||||
"""获取指定类型的动画的时间范围"""
|
||||
for animation in self.animations:
|
||||
if animation.animation_type == animation_type:
|
||||
return Timerange(animation.start, animation.duration)
|
||||
return None
|
||||
|
||||
def add_animation(self, animation: Union[Video_animation, Text_animation]) -> None:
|
||||
# 不允许添加超过一个同类型的动画(如两个入场动画)
|
||||
if animation.animation_type in [ani.animation_type for ani in self.animations]:
|
||||
raise ValueError(f"当前片段已存在类型为 '{animation.animation_type}' 的动画")
|
||||
|
||||
if isinstance(animation, Video_animation):
|
||||
# 不允许组合动画与出入场动画同时出现
|
||||
if any(ani.animation_type == "group" for ani in self.animations):
|
||||
raise ValueError("当前片段已存在组合动画, 此时不能添加其它动画")
|
||||
if animation.animation_type == "group" and len(self.animations) > 0:
|
||||
raise ValueError("当前片段已存在动画时, 不能添加组合动画")
|
||||
elif isinstance(animation, Text_animation):
|
||||
if any(ani.animation_type == "loop" for ani in self.animations):
|
||||
raise ValueError("当前片段已存在循环动画, 若希望同时使用循环动画和入出场动画, 请先添加出入场动画再添加循环动画")
|
||||
|
||||
self.animations.append(animation)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"id": self.animation_id,
|
||||
"type": "sticker_animation",
|
||||
"multi_language_current": "none",
|
||||
"animations": [animation.export_json() for animation in self.animations]
|
||||
}
|
||||
233
pyJianYingDraft/audio_segment.py
Normal file
233
pyJianYingDraft/audio_segment.py
Normal file
@@ -0,0 +1,233 @@
|
||||
"""定义音频片段及其相关类
|
||||
|
||||
包含淡入淡出效果、音频特效等相关类
|
||||
"""
|
||||
|
||||
import uuid
|
||||
from copy import deepcopy
|
||||
|
||||
from typing import Optional, Literal, Union
|
||||
from typing import Dict, List, Any
|
||||
|
||||
from pyJianYingDraft.metadata.capcut_audio_effect_meta import CapCut_Speech_to_song_effect_type, CapCut_Voice_characters_effect_type, CapCut_Voice_filters_effect_type
|
||||
|
||||
from .time_util import tim, Timerange
|
||||
from .segment import Media_segment
|
||||
from .local_materials import Audio_material
|
||||
from .keyframe import Keyframe_property, Keyframe_list
|
||||
|
||||
from .metadata import Effect_param_instance
|
||||
from .metadata import Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type
|
||||
|
||||
class Audio_fade:
|
||||
"""音频淡入淡出效果"""
|
||||
|
||||
fade_id: str
|
||||
"""淡入淡出效果的全局id, 自动生成"""
|
||||
|
||||
in_duration: int
|
||||
"""淡入时长, 单位为微秒"""
|
||||
out_duration: int
|
||||
"""淡出时长, 单位为微秒"""
|
||||
|
||||
def __init__(self, in_duration: int, out_duration: int):
|
||||
"""根据给定的淡入/淡出时长构造一个淡入淡出效果"""
|
||||
|
||||
self.fade_id = uuid.uuid4().hex
|
||||
self.in_duration = in_duration
|
||||
self.out_duration = out_duration
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"id": self.fade_id,
|
||||
"fade_in_duration": self.in_duration,
|
||||
"fade_out_duration": self.out_duration,
|
||||
"fade_type": 0,
|
||||
"type": "audio_fade"
|
||||
}
|
||||
|
||||
class Audio_effect:
|
||||
"""音频特效对象"""
|
||||
|
||||
name: str
|
||||
"""特效名称"""
|
||||
effect_id: str
|
||||
"""特效全局id, 由程序自动生成"""
|
||||
resource_id: str
|
||||
"""资源id, 由剪映本身提供"""
|
||||
|
||||
category_id: Literal["sound_effect", "tone", "speech_to_song"]
|
||||
category_name: Literal["场景音", "音色", "声音成曲"]
|
||||
|
||||
audio_adjust_params: List[Effect_param_instance]
|
||||
|
||||
def __init__(self, effect_meta: Union[Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type, CapCut_Voice_filters_effect_type, CapCut_Voice_characters_effect_type, CapCut_Speech_to_song_effect_type],
|
||||
params: Optional[List[Optional[float]]] = None):
|
||||
"""根据给定的音效元数据及参数列表构造一个音频特效对象, params的范围是0~100"""
|
||||
|
||||
self.name = effect_meta.value.name
|
||||
self.effect_id = uuid.uuid4().hex
|
||||
self.resource_id = effect_meta.value.resource_id
|
||||
self.audio_adjust_params = []
|
||||
|
||||
if isinstance(effect_meta, Audio_scene_effect_type):
|
||||
self.category_id = "sound_effect"
|
||||
self.category_name = "场景音"
|
||||
elif isinstance(effect_meta, Tone_effect_type):
|
||||
self.category_id = "tone"
|
||||
self.category_name = "音色"
|
||||
elif isinstance(effect_meta, Speech_to_song_type):
|
||||
self.category_id = "speech_to_song"
|
||||
self.category_name = "声音成曲"
|
||||
elif isinstance(effect_meta, CapCut_Voice_filters_effect_type):
|
||||
self.category_id = "sound_effect"
|
||||
self.category_name = "Voice filters"
|
||||
elif isinstance(effect_meta, CapCut_Voice_characters_effect_type):
|
||||
self.category_id = "tone"
|
||||
self.category_name = "Voice characters"
|
||||
elif isinstance(effect_meta, CapCut_Speech_to_song_effect_type):
|
||||
self.category_id = "speech_to_song"
|
||||
self.category_name = "Speech to song"
|
||||
else:
|
||||
raise TypeError("不支持的元数据类型 %s" % type(effect_meta))
|
||||
|
||||
self.audio_adjust_params = effect_meta.value.parse_params(params)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"audio_adjust_params": [param.export_json() for param in self.audio_adjust_params],
|
||||
"category_id": self.category_id,
|
||||
"category_name": self.category_name,
|
||||
"id": self.effect_id,
|
||||
"is_ugc": False,
|
||||
"name": self.name,
|
||||
"production_path": "",
|
||||
"resource_id": self.resource_id,
|
||||
"speaker_id": "",
|
||||
"sub_type": 1,
|
||||
"time_range": {"duration": 0, "start": 0}, # 似乎并未用到
|
||||
"type": "audio_effect"
|
||||
# 不导出path和constant_material_id
|
||||
}
|
||||
|
||||
class Audio_segment(Media_segment):
|
||||
"""安放在轨道上的一个音频片段"""
|
||||
|
||||
material_instance: Audio_material
|
||||
"""音频素材实例"""
|
||||
|
||||
fade: Optional[Audio_fade]
|
||||
"""音频淡入淡出效果, 可能为空
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
|
||||
effects: List[Audio_effect]
|
||||
"""音频特效列表
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
|
||||
def __init__(self, material: Audio_material, target_timerange: Timerange, *,
|
||||
source_timerange: Optional[Timerange] = None, speed: Optional[float] = None, volume: float = 1.0):
|
||||
"""利用给定的音频素材构建一个轨道片段, 并指定其时间信息及播放速度/音量
|
||||
|
||||
Args:
|
||||
material (`Audio_material`): 素材实例
|
||||
target_timerange (`Timerange`): 片段在轨道上的目标时间范围
|
||||
source_timerange (`Timerange`, optional): 截取的素材片段的时间范围, 默认从开头根据`speed`截取与`target_timerange`等长的一部分
|
||||
speed (`float`, optional): 播放速度, 默认为1.0. 此项与`source_timerange`同时指定时, 将覆盖`target_timerange`中的时长
|
||||
volume (`float`, optional): 音量, 默认为1.0
|
||||
|
||||
Raises:
|
||||
`ValueError`: 指定的或计算出的`source_timerange`超出了素材的时长范围
|
||||
"""
|
||||
if source_timerange is not None and speed is not None:
|
||||
target_timerange = Timerange(target_timerange.start, round(source_timerange.duration / speed))
|
||||
elif source_timerange is not None and speed is None:
|
||||
speed = source_timerange.duration / target_timerange.duration
|
||||
else: # source_timerange is None
|
||||
speed = speed if speed is not None else 1.0
|
||||
source_timerange = Timerange(0, round(target_timerange.duration * speed))
|
||||
|
||||
# if source_timerange.end > material.duration:
|
||||
# raise ValueError(f"截取的素材时间范围 {source_timerange} 超出了素材时长({material.duration})")
|
||||
|
||||
super().__init__(material.material_id, source_timerange, target_timerange, speed, volume)
|
||||
|
||||
self.material_instance = deepcopy(material)
|
||||
self.fade = None
|
||||
self.effects = []
|
||||
|
||||
def add_effect(self, effect_type: Union[Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type, CapCut_Voice_filters_effect_type, CapCut_Voice_characters_effect_type, CapCut_Speech_to_song_effect_type],
|
||||
params: Optional[List[Optional[float]]] = None,
|
||||
effect_id: Optional[str] = None) -> "Audio_segment":
|
||||
"""为音频片段添加一个作用于整个片段的音频效果, 目前"声音成曲"效果不能自动被剪映所识别
|
||||
|
||||
Args:
|
||||
effect_type (`Audio_scene_effect_type` | `Tone_effect_type` | `Speech_to_song_type`): 音效类型, 一类音效只能添加一个.
|
||||
params (`List[Optional[float]]`, optional): 音效参数列表, 参数列表中未提供或为None的项使用默认值.
|
||||
参数取值范围(0~100)与剪映中一致. 某个特效类型有何参数以及具体参数顺序以枚举类成员的annotation为准.
|
||||
effect_id (`str`, optional): 音效的ID, 如果不提供则自动生成.
|
||||
|
||||
Raises:
|
||||
`ValueError`: 试图添加一个已经存在的音效类型、提供的参数数量超过了该音效类型的参数数量, 或参数值超出范围.
|
||||
"""
|
||||
if params is not None and len(params) > len(effect_type.value.params):
|
||||
raise ValueError("为音频效果 %s 传入了过多的参数" % effect_type.value.name)
|
||||
self.material_instance.has_audio_effect = True # 添加这行代码
|
||||
effect_inst = Audio_effect(effect_type, params)
|
||||
if effect_id is not None:
|
||||
effect_inst.effect_id = effect_id
|
||||
if effect_inst.category_id in [eff.category_id for eff in self.effects]:
|
||||
raise ValueError("当前音频片段已经有此类型 (%s) 的音效了" % effect_inst.category_name)
|
||||
self.effects.append(effect_inst)
|
||||
self.extra_material_refs.append(effect_inst.effect_id)
|
||||
|
||||
return self
|
||||
|
||||
def add_fade(self, in_duration: Union[str, int], out_duration: Union[str, int]) -> "Audio_segment":
|
||||
"""为音频片段添加淡入淡出效果
|
||||
|
||||
Args:
|
||||
in_duration (`int` or `str`): 音频淡入时长, 单位为微秒, 若为字符串则会调用`tim()`函数进行解析
|
||||
out_duration (`int` or `str`): 音频淡出时长, 单位为微秒, 若为字符串则会调用`tim()`函数进行解析
|
||||
|
||||
Raises:
|
||||
`ValueError`: 当前片段已存在淡入淡出效果
|
||||
"""
|
||||
if self.fade is not None:
|
||||
raise ValueError("当前片段已存在淡入淡出效果")
|
||||
|
||||
if isinstance(in_duration, str): in_duration = tim(in_duration)
|
||||
if isinstance(out_duration, str): out_duration = tim(out_duration)
|
||||
|
||||
self.fade = Audio_fade(in_duration, out_duration)
|
||||
self.extra_material_refs.append(self.fade.fade_id)
|
||||
|
||||
return self
|
||||
|
||||
def add_keyframe(self, time_offset: int, volume: float) -> "Audio_segment":
|
||||
"""为音频片段创建一个*控制音量*的关键帧, 并自动加入到关键帧列表中
|
||||
|
||||
Args:
|
||||
time_offset (`int`): 关键帧的时间偏移量, 单位为微秒
|
||||
volume (`float`): 音量在`time_offset`处的值
|
||||
"""
|
||||
_property = Keyframe_property.volume
|
||||
for kf_list in self.common_keyframes:
|
||||
if kf_list.keyframe_property == _property:
|
||||
kf_list.add_keyframe(time_offset, volume)
|
||||
return self
|
||||
kf_list = Keyframe_list(_property)
|
||||
kf_list.add_keyframe(time_offset, volume)
|
||||
self.common_keyframes.append(kf_list)
|
||||
return self
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
json_dict = super().export_json()
|
||||
json_dict.update({
|
||||
"clip": None,
|
||||
"hdr_settings": None
|
||||
})
|
||||
return json_dict
|
||||
119
pyJianYingDraft/draft_content_template.json
Normal file
119
pyJianYingDraft/draft_content_template.json
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"canvas_config": {
|
||||
"height": 1080,
|
||||
"ratio": "original",
|
||||
"width": 1920
|
||||
},
|
||||
"color_space": 0,
|
||||
"config": {
|
||||
"adjust_max_index": 1,
|
||||
"attachment_info": [],
|
||||
"combination_max_index": 1,
|
||||
"export_range": null,
|
||||
"extract_audio_last_index": 1,
|
||||
"lyrics_recognition_id": "",
|
||||
"lyrics_sync": true,
|
||||
"lyrics_taskinfo": [],
|
||||
"maintrack_adsorb": true,
|
||||
"material_save_mode": 0,
|
||||
"multi_language_current": "none",
|
||||
"multi_language_list": [],
|
||||
"multi_language_main": "none",
|
||||
"multi_language_mode": "none",
|
||||
"original_sound_last_index": 1,
|
||||
"record_audio_last_index": 1,
|
||||
"sticker_max_index": 1,
|
||||
"subtitle_keywords_config": null,
|
||||
"subtitle_recognition_id": "",
|
||||
"subtitle_sync": true,
|
||||
"subtitle_taskinfo": [],
|
||||
"system_font_list": [],
|
||||
"video_mute": false,
|
||||
"zoom_info_params": null
|
||||
},
|
||||
"cover": null,
|
||||
"create_time": 0,
|
||||
"duration": 0,
|
||||
"extra_info": null,
|
||||
"fps": 30.0,
|
||||
"free_render_index_mode_on": false,
|
||||
"group_container": null,
|
||||
"id": "91E08AC5-22FB-47e2-9AA0-7DC300FAEA2B",
|
||||
"keyframe_graph_list": [],
|
||||
"keyframes": {
|
||||
"adjusts": [],
|
||||
"audios": [],
|
||||
"effects": [],
|
||||
"filters": [],
|
||||
"handwrites": [],
|
||||
"stickers": [],
|
||||
"texts": [],
|
||||
"videos": []
|
||||
},
|
||||
"last_modified_platform": {
|
||||
"app_id": 3704,
|
||||
"app_source": "lv",
|
||||
"app_version": "5.9.0",
|
||||
"os": "windows"
|
||||
},
|
||||
"materials": {
|
||||
"ai_translates": [],
|
||||
"audio_balances": [],
|
||||
"audio_effects": [],
|
||||
"audio_fades": [],
|
||||
"audio_track_indexes": [],
|
||||
"audios": [],
|
||||
"beats": [],
|
||||
"canvases": [],
|
||||
"chromas": [],
|
||||
"color_curves": [],
|
||||
"digital_humans": [],
|
||||
"drafts": [],
|
||||
"effects": [],
|
||||
"flowers": [],
|
||||
"green_screens": [],
|
||||
"handwrites": [],
|
||||
"hsl": [],
|
||||
"images": [],
|
||||
"log_color_wheels": [],
|
||||
"loudnesses": [],
|
||||
"manual_deformations": [],
|
||||
"masks": [],
|
||||
"material_animations": [],
|
||||
"material_colors": [],
|
||||
"multi_language_refs": [],
|
||||
"placeholders": [],
|
||||
"plugin_effects": [],
|
||||
"primary_color_wheels": [],
|
||||
"realtime_denoises": [],
|
||||
"shapes": [],
|
||||
"smart_crops": [],
|
||||
"smart_relights": [],
|
||||
"sound_channel_mappings": [],
|
||||
"speeds": [],
|
||||
"stickers": [],
|
||||
"tail_leaders": [],
|
||||
"text_templates": [],
|
||||
"texts": [],
|
||||
"time_marks": [],
|
||||
"transitions": [],
|
||||
"video_effects": [],
|
||||
"video_trackings": [],
|
||||
"videos": [],
|
||||
"vocal_beautifys": [],
|
||||
"vocal_separations": []
|
||||
},
|
||||
"mutable_config": null,
|
||||
"name": "",
|
||||
"new_version": "110.0.0",
|
||||
"relationships": [],
|
||||
"render_index_track_mode_on": false,
|
||||
"retouch_cover": null,
|
||||
"source": "default",
|
||||
"static_cover_image_path": "",
|
||||
"time_marks": null,
|
||||
"tracks": [
|
||||
],
|
||||
"update_time": 0,
|
||||
"version": 360000
|
||||
}
|
||||
112
pyJianYingDraft/draft_folder.py
Normal file
112
pyJianYingDraft/draft_folder.py
Normal file
@@ -0,0 +1,112 @@
|
||||
"""草稿文件夹管理器"""
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from typing import List
|
||||
|
||||
from .script_file import Script_file
|
||||
|
||||
class Draft_folder:
|
||||
"""管理一个文件夹及其内的一系列草稿"""
|
||||
|
||||
folder_path: str
|
||||
"""根路径"""
|
||||
|
||||
def __init__(self, folder_path: str):
|
||||
"""初始化草稿文件夹管理器
|
||||
|
||||
Args:
|
||||
folder_path (`str`): 包含若干草稿的文件夹, 一般取剪映保存草稿的位置即可
|
||||
|
||||
Raises:
|
||||
`FileNotFoundError`: 路径不存在
|
||||
"""
|
||||
self.folder_path = folder_path
|
||||
|
||||
if not os.path.exists(self.folder_path):
|
||||
raise FileNotFoundError(f"根文件夹 {self.folder_path} 不存在")
|
||||
|
||||
def list_drafts(self) -> List[str]:
|
||||
"""列出文件夹中所有草稿的名称
|
||||
|
||||
注意: 本函数只是如实地列出子文件夹的名称, 并不检查它们是否符合草稿的格式
|
||||
"""
|
||||
return [f for f in os.listdir(self.folder_path) if os.path.isdir(os.path.join(self.folder_path, f))]
|
||||
|
||||
def remove(self, draft_name: str) -> None:
|
||||
"""删除指定名称的草稿
|
||||
|
||||
Args:
|
||||
draft_name (`str`): 草稿名称, 即相应文件夹名称
|
||||
|
||||
Raises:
|
||||
`FileNotFoundError`: 对应的草稿不存在
|
||||
"""
|
||||
draft_path = os.path.join(self.folder_path, draft_name)
|
||||
if not os.path.exists(draft_path):
|
||||
raise FileNotFoundError(f"草稿文件夹 {draft_name} 不存在")
|
||||
|
||||
shutil.rmtree(draft_path)
|
||||
|
||||
def inspect_material(self, draft_name: str) -> None:
|
||||
"""输出指定名称草稿中的贴纸素材元数据
|
||||
|
||||
Args:
|
||||
draft_name (`str`): 草稿名称, 即相应文件夹名称
|
||||
|
||||
Raises:
|
||||
`FileNotFoundError`: 对应的草稿不存在
|
||||
"""
|
||||
draft_path = os.path.join(self.folder_path, draft_name)
|
||||
if not os.path.exists(draft_path):
|
||||
raise FileNotFoundError(f"草稿文件夹 {draft_name} 不存在")
|
||||
|
||||
script_file = self.load_template(draft_name)
|
||||
script_file.inspect_material()
|
||||
|
||||
def load_template(self, draft_name: str) -> Script_file:
|
||||
"""在文件夹中打开一个草稿作为模板, 并在其上进行编辑
|
||||
|
||||
Args:
|
||||
draft_name (`str`): 草稿名称, 即相应文件夹名称
|
||||
|
||||
Returns:
|
||||
`Script_file`: 以模板模式打开的草稿对象
|
||||
|
||||
Raises:
|
||||
`FileNotFoundError`: 对应的草稿不存在
|
||||
"""
|
||||
draft_path = os.path.join(self.folder_path, draft_name)
|
||||
if not os.path.exists(draft_path):
|
||||
raise FileNotFoundError(f"草稿文件夹 {draft_name} 不存在")
|
||||
|
||||
return Script_file.load_template(os.path.join(draft_path, "draft_info.json"))
|
||||
|
||||
def duplicate_as_template(self, template_name: str, new_draft_name: str, allow_replace: bool = False) -> Script_file:
|
||||
"""复制一份给定的草稿, 并在复制出的新草稿上进行编辑
|
||||
|
||||
Args:
|
||||
template_name (`str`): 原草稿名称
|
||||
new_draft_name (`str`): 新草稿名称
|
||||
allow_replace (`bool`, optional): 是否允许覆盖与`new_draft_name`重名的草稿. 默认为否.
|
||||
|
||||
Returns:
|
||||
`Script_file`: 以模板模式打开的**复制后的**草稿对象
|
||||
|
||||
Raises:
|
||||
`FileNotFoundError`: 原始草稿不存在
|
||||
`FileExistsError`: 已存在与`new_draft_name`重名的草稿, 但不允许覆盖.
|
||||
"""
|
||||
template_path = os.path.join(self.folder_path, template_name)
|
||||
new_draft_path = os.path.join(self.folder_path, new_draft_name)
|
||||
if not os.path.exists(template_path):
|
||||
raise FileNotFoundError(f"模板草稿 {template_name} 不存在")
|
||||
if os.path.exists(new_draft_path) and not allow_replace:
|
||||
raise FileExistsError(f"新草稿 {new_draft_name} 已存在且不允许覆盖")
|
||||
|
||||
# 复制草稿文件夹
|
||||
shutil.copytree(template_path, new_draft_path, dirs_exist_ok=allow_replace)
|
||||
|
||||
# 打开草稿
|
||||
return self.load_template(new_draft_name)
|
||||
36
pyJianYingDraft/effect_segment.py
Normal file
36
pyJianYingDraft/effect_segment.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""定义特效/滤镜片段类"""
|
||||
|
||||
from typing import Union, Optional, List
|
||||
|
||||
from .time_util import Timerange
|
||||
from .segment import Base_segment
|
||||
from .video_segment import Video_effect, Filter
|
||||
|
||||
from .metadata import Video_scene_effect_type, Video_character_effect_type, Filter_type
|
||||
|
||||
class Effect_segment(Base_segment):
|
||||
"""放置在独立特效轨道上的特效片段"""
|
||||
|
||||
effect_inst: Video_effect
|
||||
"""相应的特效素材
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
|
||||
def __init__(self, effect_type: Union[Video_scene_effect_type, Video_character_effect_type],
|
||||
target_timerange: Timerange, params: Optional[List[Optional[float]]] = None):
|
||||
self.effect_inst = Video_effect(effect_type, params, apply_target_type=2) # 作用域为全局
|
||||
super().__init__(self.effect_inst.global_id, target_timerange)
|
||||
|
||||
class Filter_segment(Base_segment):
|
||||
"""放置在独立滤镜轨道上的滤镜片段"""
|
||||
|
||||
material: Filter
|
||||
"""相应的滤镜素材
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
|
||||
def __init__(self, meta: Filter_type, target_timerange: Timerange, intensity: float):
|
||||
self.material = Filter(meta.value, intensity)
|
||||
super().__init__(self.material.global_id, target_timerange)
|
||||
23
pyJianYingDraft/exceptions.py
Normal file
23
pyJianYingDraft/exceptions.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""自定义异常类"""
|
||||
|
||||
class TrackNotFound(NameError):
|
||||
"""未找到满足条件的轨道"""
|
||||
class AmbiguousTrack(ValueError):
|
||||
"""找到多个满足条件的轨道"""
|
||||
class SegmentOverlap(ValueError):
|
||||
"""新片段与已有的轨道片段重叠"""
|
||||
|
||||
class MaterialNotFound(NameError):
|
||||
"""未找到满足条件的素材"""
|
||||
class AmbiguousMaterial(ValueError):
|
||||
"""找到多个满足条件的素材"""
|
||||
|
||||
class ExtensionFailed(ValueError):
|
||||
"""替换素材时延伸片段失败"""
|
||||
|
||||
class DraftNotFound(NameError):
|
||||
"""未找到草稿"""
|
||||
class AutomationError(Exception):
|
||||
"""自动化操作失败"""
|
||||
class ExportTimeout(Exception):
|
||||
"""导出超时"""
|
||||
443
pyJianYingDraft/jianying_controller.py
Normal file
443
pyJianYingDraft/jianying_controller.py
Normal file
@@ -0,0 +1,443 @@
|
||||
"""剪映自动化控制,主要与自动导出有关"""
|
||||
|
||||
import time
|
||||
import shutil
|
||||
from process_controller import ProcessController
|
||||
import uiautomation as uia
|
||||
import re
|
||||
import os
|
||||
from logging.handlers import RotatingFileHandler
|
||||
import logging # 引入 logging 模块
|
||||
|
||||
from enum import Enum
|
||||
from typing import Optional, Literal, Callable
|
||||
|
||||
from . import exceptions
|
||||
from .exceptions import AutomationError
|
||||
|
||||
# --- 配置日志记录器 ---
|
||||
logger = logging.getLogger('flask_video_generator') # 为您的Flask应用定义一个特定的logger名称
|
||||
logger.setLevel(logging.INFO) # 设置最低记录级别
|
||||
|
||||
# 创建一个格式化器
|
||||
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
||||
|
||||
# 创建一个控制台处理器
|
||||
console_handler = logging.StreamHandler()
|
||||
console_handler.setLevel(logging.INFO)
|
||||
console_handler.setFormatter(formatter)
|
||||
logger.addHandler(console_handler)
|
||||
|
||||
# 创建一个文件处理器,并设置文件轮换
|
||||
log_dir = 'logs' # 定义日志文件存放的目录
|
||||
if not os.path.exists(log_dir):
|
||||
os.makedirs(log_dir)
|
||||
log_file_path = os.path.join(log_dir, 'flask_video_generator.log') # 日志文件名
|
||||
|
||||
file_handler = RotatingFileHandler(log_file_path, backupCount=5, encoding='utf-8') # 5MB per file, keep 5 backups
|
||||
file_handler.setLevel(logging.INFO)
|
||||
file_handler.setFormatter(formatter)
|
||||
logger.addHandler(file_handler)
|
||||
|
||||
logger.info("Flask 应用日志系统初始化完成。")
|
||||
|
||||
class Export_resolution(Enum):
|
||||
"""导出分辨率"""
|
||||
RES_4K = "4K"
|
||||
RES_2K = "2K"
|
||||
RES_1080P = "1080P"
|
||||
RES_720P = "720P"
|
||||
RES_480P = "480P"
|
||||
|
||||
class Export_framerate(Enum):
|
||||
"""导出帧率"""
|
||||
FR_24 = "24fps"
|
||||
FR_25 = "25fps"
|
||||
FR_30 = "30fps"
|
||||
FR_50 = "50fps"
|
||||
FR_60 = "60fps"
|
||||
|
||||
class ControlFinder:
|
||||
"""控件查找器,封装部分与控件查找相关的逻辑"""
|
||||
|
||||
@staticmethod
|
||||
def desc_matcher(target_desc: str, depth: int = 2, exact: bool = False) -> Callable[[uia.Control, int], bool]:
|
||||
"""根据full_description查找控件的匹配器"""
|
||||
target_desc = target_desc.lower()
|
||||
def matcher(control: uia.Control, _depth: int) -> bool:
|
||||
if _depth != depth:
|
||||
return False
|
||||
full_desc: str = control.GetPropertyValue(30159).lower()
|
||||
return (target_desc == full_desc) if exact else (target_desc in full_desc)
|
||||
return matcher
|
||||
|
||||
@staticmethod
|
||||
def class_name_matcher(class_name: str, depth: int = 1, exact: bool = False) -> Callable[[uia.Control, int], bool]:
|
||||
"""根据ClassName查找控件的匹配器"""
|
||||
class_name = class_name.lower()
|
||||
def matcher(control: uia.Control, _depth: int) -> bool:
|
||||
if _depth != depth:
|
||||
return False
|
||||
curr_class_name: str = control.ClassName.lower()
|
||||
return (class_name == curr_class_name) if exact else (class_name in curr_class_name)
|
||||
return matcher
|
||||
|
||||
class Jianying_controller:
|
||||
"""剪映控制器"""
|
||||
|
||||
app: uia.WindowControl
|
||||
"""剪映窗口"""
|
||||
app_status: Literal["home", "edit", "pre_export"]
|
||||
export_progress: dict = {"status": "idle", "percent": 0.0, "message": "", "start_time": 0}
|
||||
"""导出进度信息"""
|
||||
|
||||
def __init__(self):
|
||||
"""初始化剪映控制器, 此时剪映应该处于目录页"""
|
||||
logger.info("Initializing Jianying_controller...")
|
||||
self.get_window()
|
||||
self.export_progress = {"status": "idle", "percent": 0.0, "message": "", "start_time": 0}
|
||||
logger.info("Jianying_controller initialized successfully.")
|
||||
|
||||
def get_export_progress(self) -> dict:
|
||||
"""获取当前导出进度
|
||||
|
||||
Returns:
|
||||
dict: 包含以下字段的字典
|
||||
- status: 当前状态,可能的值有 "idle"(空闲), "exporting"(导出中), "finished"(已完成), "error"(出错)
|
||||
- percent: 导出进度百分比,0-100的浮点数
|
||||
- message: 进度消息
|
||||
- start_time: 开始导出的时间戳
|
||||
- elapsed: 已经过的时间(秒)
|
||||
"""
|
||||
if self.export_progress["status"] != "idle":
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
return self.export_progress
|
||||
|
||||
def export_draft(self, draft_name: str, output_path: Optional[str] = None, *,
|
||||
resolution: Optional[Export_resolution] = None,
|
||||
framerate: Optional[Export_framerate] = None,
|
||||
timeout: float = 1200) -> None:
|
||||
"""导出指定的剪映草稿, **目前仅支持剪映6及以下版本**
|
||||
|
||||
**注意: 需要确认有导出草稿的权限(不使用VIP功能或已开通VIP), 否则可能陷入死循环**
|
||||
|
||||
Args:
|
||||
draft_name (`str`): 要导出的剪映草稿名称
|
||||
output_path (`str`, optional): 导出路径, 支持指向文件夹或直接指向文件, 不指定则使用剪映默认路径.
|
||||
resolution (`Export_resolution`, optional): 导出分辨率, 默认不改变剪映导出窗口中的设置.
|
||||
framerate (`Export_framerate`, optional): 导出帧率, 默认不改变剪映导出窗口中的设置.
|
||||
timeout (`float`, optional): 导出超时时间(秒), 默认为20分钟.
|
||||
|
||||
Raises:
|
||||
`DraftNotFound`: 未找到指定名称的剪映草稿
|
||||
`AutomationError`: 剪映操作失败
|
||||
"""
|
||||
logger.info(f"Starting export for draft: '{draft_name}' to '{output_path or 'default path'}' with resolution: {resolution}, framerate: {framerate}")
|
||||
self.export_progress["status"] = "exporting"
|
||||
self.export_progress["percent"] = 0.0
|
||||
self.export_progress["message"] = "开始导出"
|
||||
self.export_progress["start_time"] = time.time()
|
||||
self.export_progress["elapsed"] = 0
|
||||
|
||||
logger.info("Attempting to switch to home page.")
|
||||
self.get_window()
|
||||
self.switch_to_home()
|
||||
logger.info("Successfully switched to home page.")
|
||||
|
||||
self.export_progress["status"] = "exporting"
|
||||
self.export_progress["percent"] = 5.0
|
||||
self.export_progress["message"] = "正在导出"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
|
||||
logger.info(f"Clicking draft: '{draft_name}'")
|
||||
# 点击对应草稿
|
||||
draft_name_text = self.app.TextControl(
|
||||
searchDepth=2,
|
||||
Compare=ControlFinder.desc_matcher(f"HomePageDraftTitle:{draft_name}", exact=True)
|
||||
)
|
||||
if not draft_name_text.Exists(0):
|
||||
error_msg = f"DraftNotFound: No Jianying draft named '{draft_name}' found."
|
||||
logger.error(error_msg)
|
||||
self.export_progress["status"] = "error"
|
||||
self.export_progress["percent"] = 100.0
|
||||
self.export_progress["message"] = f"未找到名为{draft_name}的剪映草稿"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
raise exceptions.DraftNotFound(f"未找到名为{draft_name}的剪映草稿")
|
||||
draft_btn = draft_name_text.GetParentControl()
|
||||
if draft_btn is None:
|
||||
error_msg = f"AutomationError: Could not find parent control for draft title '{draft_name}'."
|
||||
logger.error(error_msg)
|
||||
self.export_progress["status"] = "error"
|
||||
self.export_progress["percent"] = 100.0
|
||||
self.export_progress["message"] = f"自动化操作失败,无法点击草稿'{draft_name}'"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
raise AutomationError(error_msg)
|
||||
|
||||
draft_btn.Click(simulateMove=False)
|
||||
logger.info(f"Clicked on draft: '{draft_name}'.")
|
||||
|
||||
self.export_progress["status"] = "exporting"
|
||||
self.export_progress["percent"] = 10.0
|
||||
self.export_progress["message"] = "正在导出"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
|
||||
logger.info(f"Waiting for edit window for draft: '{draft_name}' (timeout: 180s)")
|
||||
# 等待编辑窗口加载,最多等待180秒
|
||||
wait_start_time = time.time()
|
||||
while time.time() - wait_start_time < 180:
|
||||
try:
|
||||
self.get_window() # 尝试获取最新的窗口句柄和状态
|
||||
except AutomationError as e:
|
||||
logger.debug(f"Failed to get window during edit window wait: {e}. Retrying...")
|
||||
time.sleep(1)
|
||||
continue
|
||||
|
||||
# 检查是否出现显卡运行环境提示框,如果出现则点击"暂不启用"
|
||||
try:
|
||||
disable_btn = self.app.TextControl(searchDepth=3, Compare=ControlFinder.desc_matcher("暂不启用"))
|
||||
if disable_btn.Exists(0):
|
||||
disable_btn.Click(simulateMove=False)
|
||||
logger.info("Clicked '暂不启用' for graphics environment prompt.")
|
||||
time.sleep(1)
|
||||
except Exception as e:
|
||||
logger.debug(f"No '暂不启用' button found or error during click: {e}")
|
||||
|
||||
# 检查是否已进入编辑窗口
|
||||
time.sleep(1)
|
||||
export_btn = self.app.TextControl(searchDepth=2, Compare=ControlFinder.desc_matcher("MainWindowTitleBarExportBtn"))
|
||||
if export_btn.Exists(0):
|
||||
time.sleep(1)
|
||||
break
|
||||
time.sleep(1)
|
||||
else:
|
||||
error_msg = f"AutomationError: Waiting for edit window timed out (180 seconds) for draft '{draft_name}'."
|
||||
logger.error(error_msg)
|
||||
self.export_progress["status"] = "error"
|
||||
self.export_progress["percent"] = 100.0
|
||||
self.export_progress["message"] = "编辑超时(180秒)"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
raise AutomationError("等待进入编辑窗口超时(180秒)")
|
||||
self.export_progress["status"] = "exporting"
|
||||
self.export_progress["percent"] = 15.0
|
||||
self.export_progress["message"] = "正在导出"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
|
||||
# 点击导出按钮
|
||||
export_btn.Click(simulateMove=False)
|
||||
|
||||
logger.info(f"Waiting for export settings window (timeout: 180s) for draft: '{draft_name}'")
|
||||
# 等待导出窗口加载,最多等待180秒
|
||||
wait_start_time = time.time()
|
||||
while time.time() - wait_start_time < 180:
|
||||
try:
|
||||
self.get_window()
|
||||
except:
|
||||
time.sleep(1)
|
||||
continue
|
||||
# 检查是否已进入导出窗口
|
||||
export_path_sib = self.app.TextControl(searchDepth=2, Compare=ControlFinder.desc_matcher("ExportPath"))
|
||||
if export_path_sib.Exists(0):
|
||||
time.sleep(1) # 额外等待确保UI稳定
|
||||
break
|
||||
time.sleep(1)
|
||||
else:
|
||||
self.export_progress["status"] = "error"
|
||||
self.export_progress["percent"] = 100.0
|
||||
self.export_progress["message"] = "导出超时(180秒)"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
raise AutomationError("等待进入导出窗口超时(180秒)")
|
||||
self.export_progress["status"] = "exporting"
|
||||
self.export_progress["percent"] = 20.0
|
||||
self.export_progress["message"] = "正在导出"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
|
||||
# 获取原始导出路径(带后缀名)
|
||||
export_path_text = export_path_sib.GetSiblingControl(lambda ctrl: True)
|
||||
assert export_path_text is not None
|
||||
export_path = export_path_text.GetPropertyValue(30159)
|
||||
|
||||
logger.info(f"Attempting to set resolution: {resolution.value if resolution else 'unchanged'}, framerate: {framerate.value if framerate else 'unchanged'} for '{draft_name}'")
|
||||
# 设置分辨率
|
||||
if resolution is not None:
|
||||
retry_count = 0
|
||||
max_retries = 3
|
||||
while retry_count < max_retries:
|
||||
try:
|
||||
setting_group = self.app.GroupControl(searchDepth=1,
|
||||
Compare=ControlFinder.class_name_matcher("PanelSettingsGroup_QMLTYPE"))
|
||||
if not setting_group.Exists(0):
|
||||
raise AutomationError("未找到导出设置组")
|
||||
resolution_btn = setting_group.TextControl(searchDepth=2, Compare=ControlFinder.desc_matcher("ExportSharpnessInput"))
|
||||
if not resolution_btn.Exists(0.5):
|
||||
raise AutomationError("未找到导出分辨率下拉框")
|
||||
resolution_btn.Click(simulateMove=False)
|
||||
time.sleep(0.5)
|
||||
resolution_item = self.app.TextControl(
|
||||
searchDepth=2, Compare=ControlFinder.desc_matcher(resolution.value)
|
||||
)
|
||||
if not resolution_item.Exists(0.5):
|
||||
raise AutomationError(f"未找到{resolution.value}分辨率选项")
|
||||
resolution_item.Click(simulateMove=False)
|
||||
time.sleep(0.5)
|
||||
break # 设置成功,跳出循环
|
||||
except AutomationError as e:
|
||||
retry_count += 1
|
||||
if retry_count >= max_retries:
|
||||
raise # 重试次数用完,抛出异常
|
||||
time.sleep(1) # 延迟1秒后重试
|
||||
|
||||
# 设置帧率
|
||||
if framerate is not None:
|
||||
retry_count = 0
|
||||
max_retries = 3
|
||||
while retry_count < max_retries:
|
||||
try:
|
||||
setting_group = self.app.GroupControl(searchDepth=1,
|
||||
Compare=ControlFinder.class_name_matcher("PanelSettingsGroup_QMLTYPE"))
|
||||
if not setting_group.Exists(0):
|
||||
raise AutomationError("未找到导出设置组")
|
||||
framerate_btn = setting_group.TextControl(searchDepth=2, Compare=ControlFinder.desc_matcher("FrameRateInput"))
|
||||
if not framerate_btn.Exists(0.5):
|
||||
raise AutomationError("未找到导出帧率下拉框")
|
||||
framerate_btn.Click(simulateMove=False)
|
||||
time.sleep(0.5)
|
||||
framerate_item = self.app.TextControl(
|
||||
searchDepth=2, Compare=ControlFinder.desc_matcher(framerate.value)
|
||||
)
|
||||
if not framerate_item.Exists(0.5):
|
||||
raise AutomationError(f"未找到{framerate.value}帧率选项")
|
||||
framerate_item.Click(simulateMove=False)
|
||||
time.sleep(0.5)
|
||||
break # 设置成功,跳出循环
|
||||
except AutomationError as e:
|
||||
retry_count += 1
|
||||
if retry_count >= max_retries:
|
||||
raise # 重试次数用完,抛出异常
|
||||
time.sleep(1) # 延迟1秒后重试
|
||||
|
||||
logger.info(f"Clicking final export button for draft: '{draft_name}'")
|
||||
# 点击导出
|
||||
export_btn = self.app.TextControl(searchDepth=2, Compare=ControlFinder.desc_matcher("ExportOkBtn", exact=True))
|
||||
if not export_btn.Exists(0):
|
||||
raise AutomationError("未在导出窗口中找到导出按钮")
|
||||
export_btn.Click(simulateMove=False)
|
||||
time.sleep(5)
|
||||
|
||||
# 等待导出完成
|
||||
st = time.time()
|
||||
while True:
|
||||
# self.get_window()
|
||||
if self.app_status != "pre_export": continue
|
||||
|
||||
# 查找导出成功按钮
|
||||
succeed_close_btn = self.app.TextControl(searchDepth=2, Compare=ControlFinder.desc_matcher("ExportSucceedCloseBtn"))
|
||||
if succeed_close_btn.Exists(0):
|
||||
self.export_progress["status"] = "finished"
|
||||
self.export_progress["percent"] = 100
|
||||
self.export_progress["message"] = "导出完成"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
succeed_close_btn.Click(simulateMove=False)
|
||||
break
|
||||
|
||||
# 查找并更新进度百分比
|
||||
try:
|
||||
# 尝试查找所有文本控件,寻找包含百分比的文本
|
||||
text_controls = self.app.GetChildren()
|
||||
for control in text_controls:
|
||||
progress_text = ""
|
||||
# 检查控件名称
|
||||
if hasattr(control, "Name") and control.Name and "%" in control.Name:
|
||||
progress_text = control.Name
|
||||
# 检查控件描述
|
||||
elif hasattr(control, "GetPropertyValue"):
|
||||
desc = control.GetPropertyValue(30159) if hasattr(control, "GetPropertyValue") else ""
|
||||
if desc and isinstance(desc, str) and "%" in desc:
|
||||
progress_text = desc
|
||||
|
||||
if progress_text:
|
||||
# 提取百分比数字,支持小数点
|
||||
percent_match = re.search(r'(\d+\.?\d*)%', progress_text)
|
||||
print("progress_text is " + progress_text)
|
||||
print("percent_match is ", percent_match)
|
||||
if percent_match:
|
||||
percent = float(percent_match.group(1)) # 使用float而不是int
|
||||
print("percent is ", percent)
|
||||
self.export_progress["percent"] = percent * 0.8 + 20
|
||||
self.export_progress["message"] = "正在导出"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
break
|
||||
except Exception as e:
|
||||
self.export_progress["message"] = f"获取进度时出错: {e}"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
|
||||
if time.time() - st > timeout:
|
||||
self.export_progress["status"] = "error"
|
||||
self.export_progress["message"] = f"导出超时{timeout}秒"
|
||||
self.export_progress["elapsed"] = time.time() - self.export_progress["start_time"]
|
||||
raise AutomationError("导出超时, 时限为%d秒" % timeout)
|
||||
|
||||
time.sleep(1)
|
||||
time.sleep(2)
|
||||
|
||||
# 复制导出的文件到指定目录
|
||||
if output_path is not None:
|
||||
shutil.move(export_path, output_path)
|
||||
|
||||
logger.info(f"导出 {draft_name} 至 {output_path} 完成")
|
||||
|
||||
# 回到目录页
|
||||
logger.info("back to home page")
|
||||
try:
|
||||
self.get_window()
|
||||
self.switch_to_home()
|
||||
except Exception as e:
|
||||
logger.warning(f"back to home 失败: {str(e)}, 杀进程重启")
|
||||
ProcessController.kill_jianying()
|
||||
|
||||
if not ProcessController.restart_jianying():
|
||||
logger.critical("Failed to restart JianYing application. Aborting.")
|
||||
raise Exception("无法重启剪映程序")
|
||||
|
||||
time.sleep(2) # 等待进程启动
|
||||
ProcessController.kill_jianying_detector()
|
||||
|
||||
|
||||
def switch_to_home(self) -> None:
|
||||
"""切换到剪映主页"""
|
||||
if self.app_status == "home":
|
||||
return
|
||||
if self.app_status != "edit":
|
||||
raise AutomationError("仅支持从编辑模式切换到主页")
|
||||
close_btn = self.app.GroupControl(searchDepth=1, ClassName="TitleBarButton", foundIndex=3)
|
||||
close_btn.Click(simulateMove=False)
|
||||
time.sleep(2)
|
||||
self.get_window()
|
||||
|
||||
def get_window(self) -> None:
|
||||
"""寻找剪映窗口并置顶"""
|
||||
if hasattr(self, "app") and self.app.Exists(0):
|
||||
self.app.SetTopmost(False)
|
||||
|
||||
self.app = uia.WindowControl(searchDepth=1, Compare=self.__jianying_window_cmp)
|
||||
if not self.app.Exists(0):
|
||||
raise AutomationError("剪映窗口未找到")
|
||||
|
||||
# 寻找可能存在的导出窗口
|
||||
export_window = self.app.WindowControl(searchDepth=1, Name="导出")
|
||||
if export_window.Exists(0):
|
||||
self.app = export_window
|
||||
self.app_status = "pre_export"
|
||||
|
||||
self.app.SetActive()
|
||||
self.app.SetTopmost()
|
||||
|
||||
def __jianying_window_cmp(self, control: uia.WindowControl, depth: int) -> bool:
|
||||
if control.Name != "剪映专业版":
|
||||
return False
|
||||
if "HomePage".lower() in control.ClassName.lower():
|
||||
self.app_status = "home"
|
||||
return True
|
||||
if "MainWindow".lower() in control.ClassName.lower():
|
||||
self.app_status = "edit"
|
||||
return True
|
||||
return False
|
||||
318
pyJianYingDraft/jianying_ui_inspector.py
Normal file
318
pyJianYingDraft/jianying_ui_inspector.py
Normal file
@@ -0,0 +1,318 @@
|
||||
import uiautomation as auto
|
||||
import time
|
||||
import json
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
class JianYingUIInspector:
|
||||
def __init__(self):
|
||||
self.jianying_window = None
|
||||
|
||||
def find_jianying_window(self) -> bool:
|
||||
"""查找剪映窗口"""
|
||||
# 尝试多种可能的窗口名称
|
||||
window_names = [
|
||||
"剪映",
|
||||
"JianYing",
|
||||
"CapCut",
|
||||
"剪映专业版"
|
||||
]
|
||||
|
||||
for name in window_names:
|
||||
try:
|
||||
# 按窗口标题查找
|
||||
window = auto.WindowControl(searchDepth=1, Name=name)
|
||||
if window.Exists(0, 0):
|
||||
self.jianying_window = window
|
||||
print(f"找到剪映窗口: {name}")
|
||||
return True
|
||||
|
||||
# 按类名查找(如果知道的话)
|
||||
window = auto.WindowControl(searchDepth=1, ClassName="Qt5QWindowIcon")
|
||||
if window.Exists(0, 0) and name.lower() in window.Name.lower():
|
||||
self.jianying_window = window
|
||||
print(f"找到剪映窗口: {window.Name}")
|
||||
return True
|
||||
except Exception as e:
|
||||
continue
|
||||
|
||||
# 如果按名称找不到,尝试遍历所有窗口
|
||||
print("按名称未找到,正在遍历所有窗口...")
|
||||
for window in auto.GetRootControl().GetChildren():
|
||||
if window.ControlType == auto.ControlType.WindowControl:
|
||||
window_title = window.Name
|
||||
if any(keyword in window_title for keyword in ["剪映", "JianYing", "CapCut"]):
|
||||
self.jianying_window = window
|
||||
print(f"找到剪映窗口: {window_title}")
|
||||
return True
|
||||
|
||||
print("未找到剪映窗口,请确保剪映正在运行")
|
||||
return False
|
||||
|
||||
def get_control_info(self, control) -> Dict:
|
||||
"""获取控件的详细信息"""
|
||||
try:
|
||||
info = {
|
||||
"Name": control.Name,
|
||||
"ControlType": control.ControlTypeName,
|
||||
"ClassName": getattr(control, 'ClassName', ''),
|
||||
"AutomationId": getattr(control, 'AutomationId', ''),
|
||||
"BoundingRectangle": {
|
||||
"left": control.BoundingRectangle.left,
|
||||
"top": control.BoundingRectangle.top,
|
||||
"right": control.BoundingRectangle.right,
|
||||
"bottom": control.BoundingRectangle.bottom,
|
||||
"width": control.BoundingRectangle.width(),
|
||||
"height": control.BoundingRectangle.height()
|
||||
},
|
||||
"IsEnabled": control.IsEnabled,
|
||||
"IsVisible": getattr(control, 'IsOffscreen', True) == False,
|
||||
"ProcessId": getattr(control, 'ProcessId', 0)
|
||||
}
|
||||
|
||||
# 获取FullDescription属性 (属性ID: 30159)
|
||||
try:
|
||||
if hasattr(control, 'GetCurrentPropertyValue'):
|
||||
full_description = control.GetCurrentPropertyValue(30159)
|
||||
info["FullDescription"] = full_description or ""
|
||||
else:
|
||||
info["FullDescription"] = ""
|
||||
except Exception as e:
|
||||
info["FullDescription"] = ""
|
||||
info["FullDescriptionError"] = str(e)
|
||||
|
||||
# 获取文本内容的多种方式
|
||||
text_content = ""
|
||||
|
||||
# 方式1: 通过Value属性获取
|
||||
try:
|
||||
if hasattr(control, 'GetValuePattern'):
|
||||
value_pattern = control.GetValuePattern()
|
||||
if value_pattern:
|
||||
text_content = value_pattern.Value
|
||||
except:
|
||||
pass
|
||||
|
||||
# 方式2: 通过Text属性获取
|
||||
try:
|
||||
if hasattr(control, 'GetTextPattern'):
|
||||
text_pattern = control.GetTextPattern()
|
||||
if text_pattern:
|
||||
text_content = text_pattern.DocumentRange.GetText(-1)
|
||||
except:
|
||||
pass
|
||||
|
||||
# 方式3: 直接通过属性获取
|
||||
try:
|
||||
if not text_content and hasattr(control, 'CurrentValue'):
|
||||
text_content = str(control.CurrentValue)
|
||||
except:
|
||||
pass
|
||||
|
||||
# 方式4: 通过LegacyIAccessible获取
|
||||
try:
|
||||
if not text_content and hasattr(control, 'GetLegacyIAccessiblePattern'):
|
||||
legacy_pattern = control.GetLegacyIAccessiblePattern()
|
||||
if legacy_pattern:
|
||||
text_content = legacy_pattern.CurrentValue or legacy_pattern.CurrentName
|
||||
except:
|
||||
pass
|
||||
|
||||
# 方式5: 对于QML控件,尝试获取特定属性
|
||||
try:
|
||||
if not text_content and "QQuickText" in info["ClassName"]:
|
||||
# QML Text控件可能需要特殊处理
|
||||
if hasattr(control, 'GetCurrentPropertyValue'):
|
||||
# 尝试获取Text属性
|
||||
text_content = control.GetCurrentPropertyValue(auto.PropertyId.ValueValueProperty)
|
||||
except:
|
||||
pass
|
||||
|
||||
info["TextContent"] = text_content or ""
|
||||
info["HasText"] = bool(text_content)
|
||||
|
||||
# 原有的其他属性获取
|
||||
try:
|
||||
info["Value"] = control.GetValuePattern().Value if hasattr(control, 'GetValuePattern') else ""
|
||||
except:
|
||||
info["Value"] = ""
|
||||
|
||||
try:
|
||||
info["IsSelected"] = control.GetSelectionItemPattern().IsSelected if hasattr(control, 'GetSelectionItemPattern') else False
|
||||
except:
|
||||
info["IsSelected"] = False
|
||||
|
||||
return info
|
||||
except Exception as e:
|
||||
return {"Error": str(e), "Name": "获取信息失败"}
|
||||
|
||||
def build_ui_tree(self, control, max_depth: int = 10, current_depth: int = 0) -> Dict:
|
||||
"""递归构建UI元素树"""
|
||||
if current_depth >= max_depth:
|
||||
return {"MaxDepthReached": True}
|
||||
|
||||
node = self.get_control_info(control)
|
||||
node["Depth"] = current_depth
|
||||
node["Children"] = []
|
||||
|
||||
try:
|
||||
children = control.GetChildren()
|
||||
for child in children:
|
||||
if child.Exists(0, 0): # 检查子控件是否存在
|
||||
child_node = self.build_ui_tree(child, max_depth, current_depth + 1)
|
||||
node["Children"].append(child_node)
|
||||
except Exception as e:
|
||||
node["ChildrenError"] = str(e)
|
||||
|
||||
return node
|
||||
|
||||
def print_ui_tree(self, node: Dict, indent: str = ""):
|
||||
"""打印UI树结构"""
|
||||
control_type = node.get("ControlType", "Unknown")
|
||||
name = node.get("Name", "")
|
||||
class_name = node.get("ClassName", "")
|
||||
automation_id = node.get("AutomationId", "")
|
||||
full_description = node.get("FullDescription", "")
|
||||
|
||||
# 构建显示文本
|
||||
display_parts = [control_type]
|
||||
if name:
|
||||
display_parts.append(f'Name="{name}"')
|
||||
if class_name:
|
||||
display_parts.append(f'Class="{class_name}"')
|
||||
if automation_id:
|
||||
display_parts.append(f'Id="{automation_id}"')
|
||||
if full_description:
|
||||
# 限制FullDescription显示长度,避免输出过长
|
||||
desc_display = full_description[:100] + "..." if len(full_description) > 100 else full_description
|
||||
display_parts.append(f'FullDesc="{desc_display}"')
|
||||
|
||||
display_text = " ".join(display_parts)
|
||||
|
||||
# 添加位置信息
|
||||
if "BoundingRectangle" in node:
|
||||
rect = node["BoundingRectangle"]
|
||||
display_text += f" [{rect['left']},{rect['top']},{rect['width']}x{rect['height']}]"
|
||||
|
||||
print(f"{indent}{display_text}")
|
||||
|
||||
# 递归打印子节点
|
||||
for child in node.get("Children", []):
|
||||
self.print_ui_tree(child, indent + " ")
|
||||
|
||||
def save_ui_tree_to_file(self, tree: Dict, filename: str = "jianying_ui_tree.json"):
|
||||
"""保存UI树到文件"""
|
||||
try:
|
||||
with open(filename, 'w', encoding='utf-8') as f:
|
||||
json.dump(tree, f, ensure_ascii=False, indent=2)
|
||||
print(f"UI树已保存到: {filename}")
|
||||
except Exception as e:
|
||||
print(f"保存文件失败: {e}")
|
||||
|
||||
def find_elements_by_type(self, tree: Dict, control_type: str) -> List[Dict]:
|
||||
"""按控件类型查找元素"""
|
||||
results = []
|
||||
|
||||
if tree.get("ControlType") == control_type:
|
||||
results.append(tree)
|
||||
|
||||
for child in tree.get("Children", []):
|
||||
results.extend(self.find_elements_by_type(child, control_type))
|
||||
|
||||
return results
|
||||
|
||||
def find_elements_by_name(self, tree: Dict, name: str) -> List[Dict]:
|
||||
"""按名称查找元素"""
|
||||
results = []
|
||||
|
||||
if name.lower() in tree.get("Name", "").lower():
|
||||
results.append(tree)
|
||||
|
||||
for child in tree.get("Children", []):
|
||||
results.extend(self.find_elements_by_name(child, name))
|
||||
|
||||
return results
|
||||
|
||||
def find_text_controls(self, tree: Dict) -> List[Dict]:
|
||||
"""查找所有包含文本的控件"""
|
||||
results = []
|
||||
|
||||
if tree.get("HasText") and tree.get("TextContent"):
|
||||
results.append({
|
||||
"ControlType": tree.get("ControlType"),
|
||||
"Name": tree.get("Name"),
|
||||
"ClassName": tree.get("ClassName"),
|
||||
"TextContent": tree.get("TextContent"),
|
||||
"BoundingRectangle": tree.get("BoundingRectangle")
|
||||
})
|
||||
|
||||
for child in tree.get("Children", []):
|
||||
results.extend(self.find_text_controls(child))
|
||||
|
||||
return results
|
||||
|
||||
def inspect_jianying_ui(self, max_depth: int = 8, save_to_file: bool = True):
|
||||
"""检查剪映UI并显示元素树"""
|
||||
print("正在查找剪映窗口...")
|
||||
|
||||
if not self.find_jianying_window():
|
||||
return None
|
||||
|
||||
print(f"窗口信息: {self.jianying_window.Name}")
|
||||
print(f"窗口位置: {self.jianying_window.BoundingRectangle}")
|
||||
print("\n正在构建UI元素树...")
|
||||
|
||||
# 构建UI树
|
||||
ui_tree = self.build_ui_tree(self.jianying_window, max_depth)
|
||||
|
||||
print("\n=== 剪映UI元素树 ===")
|
||||
self.print_ui_tree(ui_tree)
|
||||
|
||||
if save_to_file:
|
||||
self.save_ui_tree_to_file(ui_tree)
|
||||
|
||||
return ui_tree
|
||||
|
||||
def list_all_windows(self):
|
||||
"""列出所有窗口,帮助调试"""
|
||||
print("当前所有窗口:")
|
||||
for window in auto.GetRootControl().GetChildren():
|
||||
if window.ControlType == auto.ControlType.WindowControl:
|
||||
try:
|
||||
print(f"- {window.Name} (PID: {getattr(window, 'ProcessId', 'Unknown')})")
|
||||
except:
|
||||
print(f"- 无法获取窗口信息")
|
||||
|
||||
def main():
|
||||
"""主函数"""
|
||||
inspector = JianYingUIInspector()
|
||||
|
||||
# 如果找不到剪映窗口,先列出所有窗口
|
||||
if not inspector.find_jianying_window():
|
||||
print("\n列出所有窗口以供参考:")
|
||||
inspector.list_all_windows()
|
||||
return
|
||||
|
||||
# 检查UI
|
||||
ui_tree = inspector.inspect_jianying_ui(max_depth=6, save_to_file=True)
|
||||
|
||||
if ui_tree:
|
||||
# 示例:查找所有按钮
|
||||
buttons = inspector.find_elements_by_type(ui_tree, "ButtonControl")
|
||||
print(f"\n找到 {len(buttons)} 个按钮控件")
|
||||
|
||||
# 示例:查找包含"导出"的元素
|
||||
export_elements = inspector.find_elements_by_name(ui_tree, "导出")
|
||||
if export_elements:
|
||||
print(f"\n找到 {len(export_elements)} 个包含'导出'的元素:")
|
||||
for elem in export_elements:
|
||||
print(f" - {elem.get('ControlType')}: {elem.get('Name')}")
|
||||
|
||||
# 新增:查找所有包含文本的控件
|
||||
text_controls = inspector.find_text_controls(ui_tree)
|
||||
if text_controls:
|
||||
print(f"\n找到 {len(text_controls)} 个包含文本的控件:")
|
||||
for ctrl in text_controls:
|
||||
print(f" - {ctrl['ControlType']}: '{ctrl['TextContent']}'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
94
pyJianYingDraft/keyframe.py
Normal file
94
pyJianYingDraft/keyframe.py
Normal file
@@ -0,0 +1,94 @@
|
||||
import uuid
|
||||
|
||||
from enum import Enum
|
||||
from typing import Dict, List, Any
|
||||
|
||||
class Keyframe:
|
||||
"""一个关键帧(关键点), 目前只支持线性插值"""
|
||||
|
||||
kf_id: str
|
||||
"""关键帧全局id, 自动生成"""
|
||||
time_offset: int
|
||||
"""相对于素材起始点的时间偏移量"""
|
||||
values: List[float]
|
||||
"""关键帧的值, 似乎一般只有一个元素"""
|
||||
|
||||
def __init__(self, time_offset: int, value: float):
|
||||
"""给定时间偏移量及关键值, 初始化关键帧"""
|
||||
self.kf_id = uuid.uuid4().hex
|
||||
|
||||
self.time_offset = time_offset
|
||||
self.values = [value]
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
# 默认值
|
||||
"curveType": "Line",
|
||||
"graphID": "",
|
||||
"left_control": {"x": 0.0, "y": 0.0},
|
||||
"right_control": {"x": 0.0, "y": 0.0},
|
||||
# 自定义属性
|
||||
"id": self.kf_id,
|
||||
"time_offset": self.time_offset,
|
||||
"values": self.values
|
||||
}
|
||||
|
||||
class Keyframe_property(Enum):
|
||||
"""关键帧所控制的属性类型"""
|
||||
|
||||
position_x = "KFTypePositionX"
|
||||
"""右移为正, 此处的数值应该为`剪映中显示的值` / `草稿宽度`, 也即单位是半个画布宽"""
|
||||
position_y = "KFTypePositionY"
|
||||
"""上移为正, 此处的数值应该为`剪映中显示的值` / `草稿高度`, 也即单位是半个画布高"""
|
||||
rotation = "KFTypeRotation"
|
||||
"""顺时针旋转的**角度**"""
|
||||
|
||||
scale_x = "KFTypeScaleX"
|
||||
"""单独控制X轴缩放比例(1.0为不缩放), 与`uniform_scale`互斥"""
|
||||
scale_y = "KFTypeScaleY"
|
||||
"""单独控制Y轴缩放比例(1.0为不缩放), 与`uniform_scale`互斥"""
|
||||
uniform_scale = "UNIFORM_SCALE"
|
||||
"""同时控制X轴及Y轴缩放比例(1.0为不缩放), 与`scale_x`和`scale_y`互斥"""
|
||||
|
||||
alpha = "KFTypeAlpha"
|
||||
"""不透明度, 1.0为完全不透明, 仅对`Video_segment`有效"""
|
||||
saturation = "KFTypeSaturation"
|
||||
"""饱和度, 0.0为原始饱和度, 范围为-1.0到1.0, 仅对`Video_segment`有效"""
|
||||
contrast = "KFTypeContrast"
|
||||
"""对比度, 0.0为原始对比度, 范围为-1.0到1.0, 仅对`Video_segment`有效"""
|
||||
brightness = "KFTypeBrightness"
|
||||
"""亮度, 0.0为原始亮度, 范围为-1.0到1.0, 仅对`Video_segment`有效"""
|
||||
|
||||
volume = "KFTypeVolume"
|
||||
"""音量, 1.0为原始音量, 仅对`Audio_segment`和`Video_segment`有效"""
|
||||
|
||||
class Keyframe_list:
|
||||
"""关键帧列表, 记录与某个特定属性相关的一系列关键帧"""
|
||||
|
||||
list_id: str
|
||||
"""关键帧列表全局id, 自动生成"""
|
||||
keyframe_property: Keyframe_property
|
||||
"""关键帧对应的属性"""
|
||||
keyframes: List[Keyframe]
|
||||
"""关键帧列表"""
|
||||
|
||||
def __init__(self, keyframe_property: Keyframe_property):
|
||||
"""为给定的关键帧属性初始化关键帧列表"""
|
||||
self.list_id = uuid.uuid4().hex
|
||||
|
||||
self.keyframe_property = keyframe_property
|
||||
self.keyframes = []
|
||||
|
||||
def add_keyframe(self, time_offset: int, value: float):
|
||||
"""给定时间偏移量及关键值, 向此关键帧列表中添加一个关键帧"""
|
||||
keyframe = Keyframe(time_offset, value)
|
||||
self.keyframes.append(keyframe)
|
||||
self.keyframes.sort(key=lambda x: x.time_offset)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"id": self.list_id,
|
||||
"keyframe_list": [kf.export_json() for kf in self.keyframes],
|
||||
"material_id": "",
|
||||
"property_type": self.keyframe_property.value
|
||||
}
|
||||
450
pyJianYingDraft/local_materials.py
Normal file
450
pyJianYingDraft/local_materials.py
Normal file
@@ -0,0 +1,450 @@
|
||||
import os
|
||||
import uuid
|
||||
import subprocess
|
||||
import json
|
||||
from typing import Optional, Literal
|
||||
from typing import Dict, Any
|
||||
import imageio.v2 as imageio
|
||||
|
||||
class Crop_settings:
|
||||
"""素材的裁剪设置, 各属性均在0-1之间, 注意素材的坐标原点在左上角"""
|
||||
|
||||
upper_left_x: float
|
||||
upper_left_y: float
|
||||
upper_right_x: float
|
||||
upper_right_y: float
|
||||
lower_left_x: float
|
||||
lower_left_y: float
|
||||
lower_right_x: float
|
||||
lower_right_y: float
|
||||
|
||||
def __init__(self, *, upper_left_x: float = 0.0, upper_left_y: float = 0.0,
|
||||
upper_right_x: float = 1.0, upper_right_y: float = 0.0,
|
||||
lower_left_x: float = 0.0, lower_left_y: float = 1.0,
|
||||
lower_right_x: float = 1.0, lower_right_y: float = 1.0):
|
||||
"""初始化裁剪设置, 默认参数表示不裁剪"""
|
||||
self.upper_left_x = upper_left_x
|
||||
self.upper_left_y = upper_left_y
|
||||
self.upper_right_x = upper_right_x
|
||||
self.upper_right_y = upper_right_y
|
||||
self.lower_left_x = lower_left_x
|
||||
self.lower_left_y = lower_left_y
|
||||
self.lower_right_x = lower_right_x
|
||||
self.lower_right_y = lower_right_y
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"upper_left_x": self.upper_left_x,
|
||||
"upper_left_y": self.upper_left_y,
|
||||
"upper_right_x": self.upper_right_x,
|
||||
"upper_right_y": self.upper_right_y,
|
||||
"lower_left_x": self.lower_left_x,
|
||||
"lower_left_y": self.lower_left_y,
|
||||
"lower_right_x": self.lower_right_x,
|
||||
"lower_right_y": self.lower_right_y
|
||||
}
|
||||
|
||||
class Video_material:
|
||||
"""本地视频素材(视频或图片), 一份素材可以在多个片段中使用"""
|
||||
|
||||
material_id: str
|
||||
"""素材全局id, 自动生成"""
|
||||
local_material_id: str
|
||||
"""素材本地id, 意义暂不明确"""
|
||||
material_name: str
|
||||
"""素材名称"""
|
||||
path: str
|
||||
"""素材文件路径"""
|
||||
remote_url: Optional[str] = None
|
||||
"""远程URL地址"""
|
||||
duration: int
|
||||
"""素材时长, 单位为微秒"""
|
||||
height: int
|
||||
"""素材高度"""
|
||||
width: int
|
||||
"""素材宽度"""
|
||||
crop_settings: Crop_settings
|
||||
"""素材裁剪设置"""
|
||||
material_type: Literal["video", "photo"]
|
||||
"""素材类型: 视频或图片"""
|
||||
replace_path: Optional[str] = None
|
||||
"""替换路径, 如果设置了这个值, 在导出json时会用这个路径替代原始path"""
|
||||
|
||||
def __init__(self, material_type: Literal["video", "photo"],
|
||||
path: Optional[str] = None,
|
||||
replace_path: Optional[str] = None,
|
||||
material_name: Optional[str] = None,
|
||||
crop_settings: Crop_settings = Crop_settings(),
|
||||
remote_url: Optional[str] = None,
|
||||
duration: Optional[float] = None,
|
||||
width: Optional[int] = None,
|
||||
height: Optional[int] = None):
|
||||
"""从指定位置加载视频(或图片)素材
|
||||
|
||||
Args:
|
||||
path (`str`, optional): 素材文件路径, 支持mp4, mov, avi等常见视频文件及jpg, jpeg, png等图片文件.
|
||||
replace_path (`str`, optional): 替换路径,用于导出JSON时替代原始path.
|
||||
material_type (`Literal["video", "photo"]`, optional): 素材类型,如果指定则优先使用该值.
|
||||
material_name (`str`, optional): 素材名称, 如果不指定, 默认使用文件名作为素材名称.
|
||||
crop_settings (`Crop_settings`, optional): 素材裁剪设置, 默认不裁剪.
|
||||
remote_url (`str`, optional): 远程URL地址.
|
||||
duration (`float`, optional): 音频时长(秒),如果提供则跳过ffprobe检测.
|
||||
width (`int`, optional): 素材宽度, 如果不指定, 则使用ffprobe获取.
|
||||
height (`int`, optional): 素材高度, 如果不指定, 则使用ffprobe获取.
|
||||
|
||||
Raises:
|
||||
`ValueError`: 不支持的素材文件类型或缺少必要参数.
|
||||
`FileNotFoundError`: 素材文件不存在.
|
||||
"""
|
||||
# 确保至少提供了path或remote_url
|
||||
if not path and not remote_url:
|
||||
raise ValueError("必须提供 path 或 remote_url 中的至少一个参数")
|
||||
|
||||
# 处理远程URL情况
|
||||
if remote_url:
|
||||
if not material_name:
|
||||
raise ValueError("使用 remote_url 参数时必须指定 material_name")
|
||||
self.remote_url = remote_url
|
||||
self.path = "" # 远程资源没有本地路径
|
||||
else:
|
||||
# 处理本地文件情况
|
||||
path = os.path.abspath(path)
|
||||
if not os.path.exists(path):
|
||||
raise FileNotFoundError(f"找不到 {path}")
|
||||
self.path = path
|
||||
self.remote_url = None
|
||||
|
||||
# 设置素材名称
|
||||
self.material_name = material_name if material_name else os.path.basename(path)
|
||||
self.material_id = uuid.uuid3(uuid.NAMESPACE_DNS, self.material_name).hex
|
||||
self.replace_path = replace_path
|
||||
self.crop_settings = crop_settings
|
||||
self.local_material_id = ""
|
||||
self.material_type = material_type
|
||||
|
||||
# 如果是photo类型,跳过ffprobe获取媒体信息的逻辑
|
||||
if material_type == "photo":
|
||||
self.material_type = "photo"
|
||||
self.duration = 10800000000 # 静态图片默认3小时
|
||||
# 使用imageio获取图片宽高
|
||||
try:
|
||||
# img = imageio.imread(self.remote_url)
|
||||
# self.height, self.width = img.shape[:2]
|
||||
# 使用默认宽高,在下载的时候才会获取真实宽高
|
||||
self.width = 0
|
||||
self.height = 0
|
||||
except Exception as e:
|
||||
# 如果获取失败,使用默认值
|
||||
self.width = 1920
|
||||
self.height = 1080
|
||||
return
|
||||
|
||||
|
||||
# 如果外部提供了duration,直接使用,跳过ffprobe检测
|
||||
if duration is not None and width is not None and height is not None:
|
||||
self.duration = int(float(duration) * 1e6) # 转换为微秒
|
||||
self.width = width
|
||||
self.height = height
|
||||
return # 直接返回,跳过后续的ffprobe检测
|
||||
|
||||
# 如果没有提供duration,则使用ffprobe获取
|
||||
try:
|
||||
# 使用ffprobe获取媒体信息
|
||||
media_path = self.path if self.path else self.remote_url
|
||||
command = [
|
||||
'ffprobe',
|
||||
'-v', 'error',
|
||||
'-select_streams', 'v:0', # 选择第一个视频流
|
||||
'-show_entries', 'stream=width,height,duration,codec_type', # 添加codec_type
|
||||
'-show_entries', 'format=duration,format_name', # 添加format_name
|
||||
'-of', 'json',
|
||||
media_path
|
||||
]
|
||||
result = subprocess.check_output(command, stderr=subprocess.STDOUT)
|
||||
result_str = result.decode('utf-8')
|
||||
# 查找JSON开始位置(第一个'{')
|
||||
json_start = result_str.find('{')
|
||||
if json_start != -1:
|
||||
json_str = result_str[json_start:]
|
||||
info = json.loads(json_str)
|
||||
else:
|
||||
raise ValueError(f"无法在输出中找到JSON数据: {result_str}")
|
||||
|
||||
if 'streams' in info and len(info['streams']) > 0:
|
||||
stream = info['streams'][0]
|
||||
self.width = int(stream.get('width', 0))
|
||||
self.height = int(stream.get('height', 0))
|
||||
|
||||
# 如果指定了material_type,则优先使用指定的类型
|
||||
if material_type is not None:
|
||||
self.material_type = material_type
|
||||
else:
|
||||
# 通过format_name和codec_type判断是否是动态视频
|
||||
format_name = info.get('format', {}).get('format_name', '').lower()
|
||||
codec_type = stream.get('codec_type', '').lower()
|
||||
|
||||
# 检查是否是GIF或其他动态视频
|
||||
if 'gif' in format_name or (codec_type == 'video' and stream.get('duration') is not None):
|
||||
self.material_type = "video"
|
||||
else:
|
||||
self.material_type = "photo"
|
||||
|
||||
# 设置持续时间
|
||||
if self.material_type == "video":
|
||||
# 优先使用流的duration,如果没有则使用格式的duration
|
||||
duration = stream.get('duration') or info['format'].get('duration', '0')
|
||||
self.duration = int(float(duration) * 1e6) # 转换为微秒
|
||||
else:
|
||||
self.duration = 10800000000 # 静态图片默认3小时
|
||||
else:
|
||||
raise ValueError(f"无法获取媒体文件 {media_path} 的流信息")
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise ValueError(f"处理文件 {media_path} 时出错: {e.output.decode('utf-8')}")
|
||||
except json.JSONDecodeError as e:
|
||||
raise ValueError(f"解析媒体信息时出错: {e}")
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: Dict[str, Any]) -> "Video_material":
|
||||
"""从字典创建视频素材对象
|
||||
|
||||
Args:
|
||||
data (Dict[str, Any]): 包含素材信息的字典
|
||||
|
||||
Returns:
|
||||
Video_material: 新创建的视频素材对象
|
||||
"""
|
||||
# 创建实例但不调用__init__
|
||||
instance = cls.__new__(cls)
|
||||
|
||||
# 设置基本属性
|
||||
instance.material_id = data["id"]
|
||||
instance.local_material_id = data.get("local_material_id", "")
|
||||
instance.material_name = data["material_name"]
|
||||
instance.path = data["path"]
|
||||
instance.duration = data["duration"]
|
||||
instance.height = data["height"]
|
||||
instance.width = data["width"]
|
||||
instance.material_type = data["type"]
|
||||
instance.replace_path = None # 默认不设置替换路径
|
||||
|
||||
# 设置裁剪设置
|
||||
crop_data = data.get("crop", {})
|
||||
instance.crop_settings = Crop_settings(
|
||||
upper_left_x=crop_data.get("upper_left_x", 0.0),
|
||||
upper_left_y=crop_data.get("upper_left_y", 0.0),
|
||||
upper_right_x=crop_data.get("upper_right_x", 1.0),
|
||||
upper_right_y=crop_data.get("upper_right_y", 0.0),
|
||||
lower_left_x=crop_data.get("lower_left_x", 0.0),
|
||||
lower_left_y=crop_data.get("lower_left_y", 1.0),
|
||||
lower_right_x=crop_data.get("lower_right_x", 1.0),
|
||||
lower_right_y=crop_data.get("lower_right_y", 1.0)
|
||||
)
|
||||
|
||||
return instance
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
video_material_json = {
|
||||
"audio_fade": None,
|
||||
"category_id": "",
|
||||
"category_name": "local",
|
||||
"check_flag": 63487,
|
||||
"crop": self.crop_settings.export_json(),
|
||||
"crop_ratio": "free",
|
||||
"crop_scale": 1.0,
|
||||
"duration": self.duration,
|
||||
"height": self.height,
|
||||
"id": self.material_id,
|
||||
"local_material_id": self.local_material_id,
|
||||
"material_id": self.material_id,
|
||||
"material_name": self.material_name,
|
||||
"media_path": "",
|
||||
"path": self.replace_path if self.replace_path is not None else self.path,
|
||||
"remote_url": self.remote_url,
|
||||
"type": self.material_type,
|
||||
"width": self.width
|
||||
}
|
||||
return video_material_json
|
||||
|
||||
class Audio_material:
|
||||
"""本地音频素材"""
|
||||
|
||||
material_id: str
|
||||
"""素材全局id, 自动生成"""
|
||||
material_name: str
|
||||
"""素材名称"""
|
||||
path: str
|
||||
"""素材文件路径"""
|
||||
remote_url: Optional[str] = None
|
||||
"""远程URL地址"""
|
||||
replace_path: Optional[str] = None
|
||||
"""替换路径, 如果设置了这个值, 在导出json时会用这个路径替代原始path"""
|
||||
|
||||
has_audio_effect: bool = False
|
||||
"""是否有音频效果"""
|
||||
|
||||
duration: int
|
||||
"""素材时长, 单位为微秒"""
|
||||
|
||||
def __init__(self, path: Optional[str] = None, replace_path = None, material_name: Optional[str] = None,
|
||||
remote_url: Optional[str] = None, duration: Optional[float] = None):
|
||||
"""从指定位置加载音频素材, 注意视频文件不应该作为音频素材使用
|
||||
|
||||
Args:
|
||||
path (`str`, optional): 素材文件路径, 支持mp3, wav等常见音频文件.
|
||||
material_name (`str`, optional): 素材名称, 如果不指定, 默认使用URL中的文件名作为素材名称.
|
||||
remote_url (`str`, optional): 远程URL地址.
|
||||
duration (`float`, optional): 音频时长(秒),如果提供则跳过ffprobe检测.
|
||||
|
||||
Raises:
|
||||
`ValueError`: 不支持的素材文件类型或缺少必要参数.
|
||||
"""
|
||||
if not path and not remote_url:
|
||||
raise ValueError("必须提供 path 或 remote_url 中的至少一个参数")
|
||||
|
||||
if path:
|
||||
path = os.path.abspath(path)
|
||||
if not os.path.exists(path):
|
||||
raise FileNotFoundError(f"找不到 {path}")
|
||||
|
||||
# 从URL中获取文件名作为material_name
|
||||
if not material_name and remote_url:
|
||||
original_filename = os.path.basename(remote_url.split('?')[0]) # 修复:使用remote_url而不是audio_url
|
||||
name_without_ext = os.path.splitext(original_filename)[0] # 获取不带扩展名的文件名
|
||||
material_name = f"{name_without_ext}.mp3" # 使用原始文件名+时间戳+固定mp3扩展名
|
||||
|
||||
self.material_name = material_name if material_name else (os.path.basename(path) if path else "unknown")
|
||||
self.material_id = uuid.uuid3(uuid.NAMESPACE_DNS, self.material_name).hex
|
||||
self.path = path if path else ""
|
||||
self.replace_path = replace_path
|
||||
self.remote_url = remote_url
|
||||
|
||||
# 如果外部提供了duration,直接使用,跳过ffprobe检测
|
||||
if duration is not None:
|
||||
self.duration = int(float(duration) * 1e6) # 转换为微秒
|
||||
return # 直接返回,跳过后续的ffprobe检测
|
||||
|
||||
# 如果没有提供duration,则使用ffprobe获取
|
||||
self.duration = 0 # 初始化为0,如果有path则后续会更新
|
||||
|
||||
try:
|
||||
# 使用ffprobe获取音频信息
|
||||
command = [
|
||||
'ffprobe',
|
||||
'-v', 'error',
|
||||
'-select_streams', 'a:0', # 选择第一个音频流
|
||||
'-show_entries', 'stream=duration',
|
||||
'-show_entries', 'format=duration',
|
||||
'-of', 'json',
|
||||
path if path else remote_url
|
||||
]
|
||||
result = subprocess.check_output(command, stderr=subprocess.STDOUT)
|
||||
result_str = result.decode('utf-8')
|
||||
# 查找JSON开始位置(第一个'{')
|
||||
json_start = result_str.find('{')
|
||||
if json_start != -1:
|
||||
json_str = result_str[json_start:]
|
||||
info = json.loads(json_str)
|
||||
else:
|
||||
raise ValueError(f"无法在输出中找到JSON数据: {result_str}")
|
||||
|
||||
# 检查是否有视频流
|
||||
video_command = [
|
||||
'ffprobe',
|
||||
'-v', 'error',
|
||||
'-select_streams', 'v:0',
|
||||
'-show_entries', 'stream=codec_type',
|
||||
'-of', 'json',
|
||||
path if path else remote_url
|
||||
]
|
||||
video_result = subprocess.check_output(video_command, stderr=subprocess.STDOUT)
|
||||
video_result_str = video_result.decode('utf-8')
|
||||
# 查找JSON开始位置(第一个'{')
|
||||
video_json_start = video_result_str.find('{')
|
||||
if video_json_start != -1:
|
||||
video_json_str = video_result_str[video_json_start:]
|
||||
video_info = json.loads(video_json_str)
|
||||
else:
|
||||
print(f"无法在输出中找到JSON数据: {video_result_str}")
|
||||
|
||||
if 'streams' in video_info and len(video_info['streams']) > 0:
|
||||
raise ValueError("音频素材不应包含视频轨道")
|
||||
|
||||
# 检查音频流
|
||||
if 'streams' in info and len(info['streams']) > 0:
|
||||
stream = info['streams'][0]
|
||||
# 优先使用流的duration,如果没有则使用格式的duration
|
||||
duration_value = stream.get('duration') or info['format'].get('duration', '0')
|
||||
self.duration = int(float(duration_value) * 1e6) # 转换为微秒
|
||||
else:
|
||||
raise ValueError(f"给定的素材文件 {path} 没有音频轨道")
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise ValueError(f"处理文件 {path} 时出错: {e.output.decode('utf-8')}")
|
||||
except json.JSONDecodeError as e:
|
||||
raise ValueError(f"解析媒体信息时出错: {e}")
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: Dict[str, Any]) -> "Audio_material":
|
||||
"""从字典创建音频素材对象
|
||||
|
||||
Args:
|
||||
data (Dict[str, Any]): 包含素材信息的字典
|
||||
|
||||
Returns:
|
||||
Audio_material: 新创建的音频素材对象
|
||||
"""
|
||||
# 创建实例但不调用__init__
|
||||
instance = cls.__new__(cls)
|
||||
|
||||
# 设置基本属性
|
||||
instance.material_id = data["id"]
|
||||
instance.material_name = data["name"] # 注意这里是name而不是material_name
|
||||
instance.path = data["path"]
|
||||
instance.duration = data["duration"]
|
||||
instance.replace_path = None # 默认不设置替换路径
|
||||
instance.remote_url = data.get("remote_url")
|
||||
|
||||
return instance
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"app_id": 0,
|
||||
"category_id": "",
|
||||
"category_name": "local",
|
||||
"check_flag": 3 if hasattr(self, 'has_audio_effect') and self.has_audio_effect else 1,
|
||||
"copyright_limit_type": "none",
|
||||
"duration": self.duration,
|
||||
"effect_id": "",
|
||||
"formula_id": "",
|
||||
"id": self.material_id,
|
||||
"intensifies_path": "",
|
||||
"is_ai_clone_tone": False,
|
||||
"is_text_edit_overdub": False,
|
||||
"is_ugc": False,
|
||||
"local_material_id": self.material_id,
|
||||
"music_id": self.material_id,
|
||||
"name": self.material_name,
|
||||
"path": self.replace_path if self.replace_path is not None else self.path,
|
||||
"remote_url": self.remote_url,
|
||||
"query": "",
|
||||
"request_id": "",
|
||||
"resource_id": "",
|
||||
"search_id": "",
|
||||
"source_from": "",
|
||||
"source_platform": 0,
|
||||
"team_id": "",
|
||||
"text_id": "",
|
||||
"tone_category_id": "",
|
||||
"tone_category_name": "",
|
||||
"tone_effect_id": "",
|
||||
"tone_effect_name": "",
|
||||
"tone_platform": "",
|
||||
"tone_second_category_id": "",
|
||||
"tone_second_category_name": "",
|
||||
"tone_speaker": "",
|
||||
"tone_type": "",
|
||||
"type": "extract_music",
|
||||
"video_id": "",
|
||||
"wave_points": []
|
||||
}
|
||||
52
pyJianYingDraft/metadata/__init__.py
Normal file
52
pyJianYingDraft/metadata/__init__.py
Normal file
@@ -0,0 +1,52 @@
|
||||
"""记录各种特效/音效/滤镜等的元数据"""
|
||||
|
||||
from .effect_meta import Effect_meta, Effect_param_instance
|
||||
|
||||
from .font_meta import Font_type
|
||||
from .mask_meta import Mask_type, Mask_meta
|
||||
from .capcut_mask_meta import CapCut_Mask_type
|
||||
from .filter_meta import Filter_type
|
||||
from .transition_meta import Transition_type
|
||||
from .capcut_transition_meta import CapCut_Transition_type
|
||||
from .animation_meta import Intro_type, Outro_type, Group_animation_type
|
||||
from .capcut_animation_meta import CapCut_Intro_type, CapCut_Outro_type, CapCut_Group_animation_type
|
||||
from .animation_meta import Text_intro, Text_outro, Text_loop_anim
|
||||
from .capcut_text_animation_meta import CapCut_Text_intro, CapCut_Text_outro, CapCut_Text_loop_anim
|
||||
from .audio_effect_meta import Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type
|
||||
from .capcut_audio_effect_meta import CapCut_Voice_filters_effect_type, CapCut_Voice_characters_effect_type, CapCut_Speech_to_song_effect_type
|
||||
from .video_effect_meta import Video_scene_effect_type, Video_character_effect_type
|
||||
from .capcut_effect_meta import CapCut_Video_scene_effect_type, CapCut_Video_character_effect_type
|
||||
|
||||
__all__ = [
|
||||
"Effect_meta",
|
||||
"Effect_param_instance",
|
||||
"Mask_type",
|
||||
"Mask_meta",
|
||||
"CapCut_Mask_type",
|
||||
"Filter_type",
|
||||
"Font_type",
|
||||
"Transition_type",
|
||||
"CapCut_Transition_type",
|
||||
"Intro_type",
|
||||
"Outro_type",
|
||||
"Group_animation_type",
|
||||
"CapCut_Intro_type",
|
||||
"CapCut_Outro_type",
|
||||
"CapCut_Group_animation_type",
|
||||
"Text_intro",
|
||||
"Text_outro",
|
||||
"Text_loop_anim",
|
||||
"CapCut_Text_intro",
|
||||
"CapCut_Text_outro",
|
||||
"CapCut_Text_loop_anim",
|
||||
"Audio_scene_effect_type",
|
||||
"Tone_effect_type",
|
||||
"Speech_to_song_type",
|
||||
"CapCut_Voice_filters_effect_type",
|
||||
"CapCut_Voice_characters_effect_type",
|
||||
"CapCut_Speech_to_song_effect_type",
|
||||
"Video_scene_effect_type",
|
||||
"Video_character_effect_type",
|
||||
"CapCut_Video_scene_effect_type",
|
||||
"CapCut_Video_character_effect_type"
|
||||
]
|
||||
689
pyJianYingDraft/metadata/animation_meta.py
Normal file
689
pyJianYingDraft/metadata/animation_meta.py
Normal file
@@ -0,0 +1,689 @@
|
||||
from .effect_meta import Effect_enum
|
||||
|
||||
class Animation_meta:
|
||||
title: str
|
||||
is_vip: bool
|
||||
duration: int
|
||||
"""效果默认时长, 单位为微秒"""
|
||||
|
||||
resource_id: str
|
||||
effect_id: str
|
||||
md5: str
|
||||
|
||||
def __init__(self, title: str, is_vip: bool, duration: float, resource_id: str, effect_id: str, md5: str):
|
||||
self.title = title
|
||||
self.is_vip = is_vip
|
||||
self.duration = int(round(duration * 1e6))
|
||||
self.resource_id = resource_id
|
||||
self.effect_id = effect_id
|
||||
self.md5 = md5
|
||||
|
||||
class Intro_type(Effect_enum):
|
||||
"""剪映自带的视频/图片入场动画类型"""
|
||||
|
||||
# 免费入场动画
|
||||
缩小 = Animation_meta("缩小", False, 0.500, "6798332584276267527", "624755", "7e0e6b55704b7fc20588fee77058e95c")
|
||||
渐显 = Animation_meta("渐显", False, 0.500, "6798320778182922760", "624705", "af863de1e359fd4f54bb78f2e2749e1f")
|
||||
放大 = Animation_meta("放大", False, 0.500, "6798332733694153230", "624751", "028a77e121c22a4dd130a46a0ed90714")
|
||||
旋转 = Animation_meta("旋转", False, 0.500, "6798334070653719054", "624731", "b3018b8ae12d4a9421d81a3b263b7e88")
|
||||
Kira游动 = Animation_meta("Kira游动", False, 2.267, "7311984593387655731", "34176967", "05daa2cb2b53e1830a0e657ede749daf")
|
||||
抖动下降 = Animation_meta("抖动下降", False, 0.500, "6991764455931515422", "1206320", "9b04ce5965c78218e918f043cf12a879")
|
||||
镜像翻转 = Animation_meta("镜像翻转", False, 0.500, "6797338697625768455", "646003", "55ec076a5d62f7e80655e60c43f68f80")
|
||||
旋转开幕 = Animation_meta("旋转开幕", False, 1.000, "7186944542409495099", "8295043", "407822a27a67612c3caa3e4223aa32d3")
|
||||
折叠开幕 = Animation_meta("折叠开幕", False, 1.500, "7239273897491698232", "14506065", "17e0225f852c0798063d82440ca54185")
|
||||
漩涡旋转 = Animation_meta("漩涡旋转", False, 0.500, "6782010677520241165", "703281", "6e922bdebed1d87f9a63ba285a5dd792")
|
||||
跳转开幕 = Animation_meta("跳转开幕", False, 0.733, "7279999334001676857", "23185431", "817876a62d2d05e4eef9ac4cfa9c70fe")
|
||||
轻微抖动 = Animation_meta("轻微抖动", False, 0.500, "6739418227031413256", "431664", "7ec99bda70fa6922395d65235991f9e5")
|
||||
轻微抖动_II = Animation_meta("轻微抖动 II", False, 0.500, "6739418677910704651", "431650", "8e29ab0a86dac5719300064821e8b63d")
|
||||
轻微抖动_III= Animation_meta("轻微抖动 III", False, 0.500, "6781683302672634382", "503136", "8482055860ab20c23102d78aa3486a7a")
|
||||
上下抖动 = Animation_meta("上下抖动", False, 0.500, "6739418390030455300", "431652", "bff95de5e1e4803ea64a52632bcfb361")
|
||||
左右抖动 = Animation_meta("左右抖动", False, 0.500, "6739418540421419524", "431654", "7572d7461e38d73c578aa8e4dca7163a")
|
||||
斜切 = Animation_meta("斜切", False, 0.700, "7210657307938525751", "10696371", "a385761197d457f4599d231421045230")
|
||||
钟摆 = Animation_meta("钟摆", False, 0.500, "6803260897117606414", "636115", "6b9d17389864da0a68d347365023849a")
|
||||
雨刷 = Animation_meta("雨刷", False, 0.500, "6802871256849846791", "634681", "0a8846e691446c6b2f583086567579a5")
|
||||
雨刷_II = Animation_meta("雨刷 II", False, 0.500, "6805748897768542727", "640101", "f67c2ccd81956813d5b1303625bed354")
|
||||
向上转入 = Animation_meta("向上转入", False, 0.500, "6808401616564130312", "645307", "0247c3715de210fa89a4fc9f2f03b63c")
|
||||
向上转入_II = Animation_meta("向上转入 II", False, 0.500, "6818747060649464327", "701961", "c66f550e7ab2de4ef4eb1ee7e7002fa3")
|
||||
向左转入 = Animation_meta("向左转入", False, 0.500, "6816560956647150093", "699157", "aca9db228bf685cd9f02eb966252846e")
|
||||
向右转入 = Animation_meta("向右转入", False, 0.500, "6805019065761927694", "638825", "c447b8637ba24ae1111b087e8d5a5739")
|
||||
向上滑动 = Animation_meta("向上滑动", False, 0.500, "6798333487523828238", "624739", "9598ba5dd6e4ce29c7c3ffded39fb3b9")
|
||||
向下滑动 = Animation_meta("向下滑动", False, 0.500, "6798333705401143816", "624735", "d34d52d5386e20de654b0fff9ea9704f")
|
||||
向左滑动 = Animation_meta("向左滑动", False, 0.500, "6798332871267324423", "624747", "dcae7883ea619dac2661a5f21795cc9f")
|
||||
向右滑动 = Animation_meta("向右滑动", False, 0.500, "6798333076469453320", "624743", "e3e2dad87aff58e7944fac67661b56b2")
|
||||
向下甩入 = Animation_meta("向下甩入", False, 0.500, "6739338374441603598", "431638", "afb5afec3c42fa627a007ff609c83792")
|
||||
向右甩入 = Animation_meta("向右甩入", False, 0.500, "6739338727866241539", "431636", "228f76b86355e74087a9a80647236b88")
|
||||
向左上甩入 = Animation_meta("向左上甩入", False, 0.500, "6740122563692728844", "431648", "aa97897803351debd46c9182132c64c5")
|
||||
向右上甩入 = Animation_meta("向右上甩入", False, 0.500, "6740122731418751495", "431644", "12ae5b6cc0b2bff43e958d5ca2d574fe")
|
||||
向左下甩入 = Animation_meta("向左下甩入", False, 0.500, "6739395445346275853", "431642", "269d5e19ed83faa5f5c72a1401e4564b")
|
||||
向右下甩入 = Animation_meta("向右下甩入", False, 0.500, "6739395718223499787", "431640", "f821a402edb042a9d68d825cb804ac6e")
|
||||
动感放大 = Animation_meta("动感放大", False, 0.500, "6740867832570974733", "431662", "3d880239a1fa70fbaedcc7fd20794e22")
|
||||
动感缩小 = Animation_meta("动感缩小", False, 0.500, "6740868384637850120", "431658", "8357dd30914ef6ba1ba89dd12a83dc3e")
|
||||
轻微放大 = Animation_meta("轻微放大", False, 0.500, "6800268825611735559", "629085", "f6c8209ef7142fff6cf9c68573216371")
|
||||
|
||||
# 付费入场动画
|
||||
快速翻页 = Animation_meta("快速翻页", True, 0.167, "7296381392340914715", "27878991", "6e1d71ff694a87526f9c5bb2c01c927d")
|
||||
荧光爆闪 = Animation_meta("荧光爆闪", True, 1.000, "7347948517471556096", "51992419", "84d6cfae125a71855b500604748f1e19")
|
||||
十字震动 = Animation_meta("十字震动", True, 0.800, "7352824361625063987", "54686020", "33d4a2ff79aa2fb88fadd45aee1998e9")
|
||||
爱心碰撞 = Animation_meta("爱心碰撞", True, 2.667, "7327872475453198848", "41910725", "119e873890708ee4817c9778dcb20b69")
|
||||
冲撞 = Animation_meta("冲撞", True, 2.000, "7215530662986519096", "11320895", "aeadb248c06d074a2d98f425a57999f0")
|
||||
闪屏 = Animation_meta("闪屏", True, 1.200, "7242155802209817147", "14904085", "c2f368ce853ab863a12c686bb99bb41e")
|
||||
扫描 = Animation_meta("扫描", True, 0.600, "7312335732721324554", "34385508", "191401f0b79c28d7569dfc356ba827b6")
|
||||
震动波纹 = Animation_meta("震动波纹", True, 1.500, "7307196313148330547", "31806105", "95760b6f7efe0016546e38852a981f49")
|
||||
分屏翻转 = Animation_meta("分屏翻转", True, 0.700, "7257782721575916088", "18711457", "013f6255cb0672198f26962bff3f788b")
|
||||
立体翻转 = Animation_meta("立体翻转", True, 1.100, "7346505124820292150", "51089258", "bad88fa72b42b3c12099c31654575952")
|
||||
马赛克 = Animation_meta("马赛克", True, 1.000, "7282703408383922745", "23885083", "273c4952c915c9250f0b9edadac34148")
|
||||
_2024 = Animation_meta("2024", True, 1.500, "7309774750677471794", "33056565", "d68370ce25f28ec80d9c0bb7e51e2324")
|
||||
多层环形 = Animation_meta("多层环形", True, 2.000, "7329444938960081460", "42686363", "54801ad31b13853ad1e3ccf945e89973")
|
||||
弹力分割 = Animation_meta("弹力分割", True, 1.060, "7267827357627454013", "35994464", "9f5878effce0a857900a4f050ea52318")
|
||||
弹近 = Animation_meta("弹近", True, 1.500, "7314144465944318502", "35289246", "30c62d3ccb969173e5fa43511894116b")
|
||||
画出爱心 = Animation_meta("画出爱心", True, 1.600, "7248901535894082105", "16211481", "6e5cdc1e7ece582da904ac520440e88a")
|
||||
发光矩形 = Animation_meta("发光矩形", True, 1.033, "7346511208171704841", "51093680", "64852509d7cb2a578469b3438b94df52")
|
||||
空间扭曲 = Animation_meta("空间扭曲", True, 1.160, "7298688232294715931", "28693486", "da3a08519a9315e3625173b71a4d8ee3")
|
||||
四屏转换 = Animation_meta("四屏转换", True, 1.000, "7341283787143123507", "48492378", "fdd9abc8f2abadc0ae6e909779f282e6")
|
||||
展开 = Animation_meta("展开", True, 0.500, "7221413342257091133", "12088589", "553acdb325d76533d6ecbd6d621d9b9e")
|
||||
划水 = Animation_meta("划水", True, 0.800, "7226632607939695161", "12811781", "57a259c58a4daddacc897c75ec9c10a4")
|
||||
色散波纹 = Animation_meta("色散波纹", True, 0.830, "7299029942870741542", "28824874", "2ce459ce040280d7c4f36ab78a3612e5")
|
||||
模糊聚焦 = Animation_meta("模糊聚焦", True, 1.200, "7337937899704291866", "46838778", "38841ccaef6186af6d516eeea116b3c6")
|
||||
圆形开幕 = Animation_meta("圆形开幕", True, 0.900, "7218210014949806647", "11680735", "2c171ce2c85042bb518cbdc08ced9709")
|
||||
聚合 = Animation_meta("聚合", True, 2.000, "7303524763589153306", "30391788", "c3293067129322c884d0865b99cb11bd")
|
||||
砸出波纹 = Animation_meta("砸出波纹", True, 1.560, "7255594501694034490", "18159482", "644483b024fc852955dd807da067d8e9")
|
||||
向下甩动 = Animation_meta("向下甩动", True, 1.400, "7338320641306661410", "47050546", "060ee66b7f59d3d2c8064be5ae32171c")
|
||||
向上滚动 = Animation_meta("向上滚动", True, 1.000, "7312341574988337690", "34388476", "14e7c85bfa04ecbacc1e63ee386840b7")
|
||||
拼图 = Animation_meta("拼图", True, 1.067, "7369889381357720102", "64963350", "4b721a1559eb3451d6cc358468537c49")
|
||||
向上闪入 = Animation_meta("向上闪入", True, 0.700, "7273389803532456504", "21816946", "ecaffca7c7e1d7744fa296a29f65b366")
|
||||
交错开幕 = Animation_meta("交错开幕", True, 1.100, "7280797339042714169", "23387955", "123322fa9ce7c37f0c2c35819f00b524")
|
||||
便利贴 = Animation_meta("便利贴", True, 0.900, "7379456870265655859", "70486392", "06613663efa8ef29beadf8746019c823")
|
||||
侧滑 = Animation_meta("侧滑", True, 0.600, "7239559299196785209", "14524393", "c67d95e820752346af44e2cb515c0115")
|
||||
横向模糊 = Animation_meta("横向模糊", True, 0.500, "7301896031673782835", "29805902", "b8b953ad94b16c47601af887d4ccc8c9")
|
||||
闪现 = Animation_meta("闪现", True, 0.440, "7210363235906622012", "10668047", "6a680c49cd11a05f3eb0e5a3fed165f7")
|
||||
水墨 = Animation_meta("水墨", True, 2.433, "7321672946466951731", "39180627", "7e5d11c796a2e1bec5feb486e647e60b")
|
||||
交叉震动 = Animation_meta("交叉震动", True, 0.833, "7222990639984546360", "12309329", "cde910202607be12ac747e2e76316e7f")
|
||||
抖动横移 = Animation_meta("抖动横移", True, 0.567, "7265946978792510010", "20437845", "e4951e1d7abcdbd4e8bf1cf33430def7")
|
||||
抖动变焦 = Animation_meta("抖动变焦", True, 0.800, "7156911481563386381", "5414507", "04365018fdc27b7e1175b709a739f800")
|
||||
斜向拉丝 = Animation_meta("斜向拉丝", True, 0.667, "7360531434487943743", "58777551", "60ba474a0460cb7e999830c02943e977")
|
||||
拉丝滑入 = Animation_meta("拉丝滑入", True, 0.500, "7112725640901562887", "3179668", "913b99e9012d50f629c59a31e030b143")
|
||||
果冻_I = Animation_meta("果冻 I", True, 0.800, "7171640017574433294", "6725401", "4ef7f9da6b1331109620381229d55429")
|
||||
果冻_II = Animation_meta("果冻 II", True, 0.800, "7171690870788329992", "6732061", "01d346b0f37b87c25c17a53309189432")
|
||||
烟雾弹 = Animation_meta("烟雾弹", True, 1.200, "7226641244938572346", "12815013", "8c5e4642b824c252b5a556bbbcbae767")
|
||||
震波 = Animation_meta("震波", True, 0.800, "7115301367786246692", "3297068", "8aaccb8f112aa3cacd80fa79fcc1690f")
|
||||
震波_II = Animation_meta("震波 II", True, 0.833, "7211042099737662009", "10744265", "f8f236cd1279af3680bcc71dda889d97")
|
||||
震波_III = Animation_meta("震波 III", True, 1.700, "7288985830578721336", "25545977", "3be0a1f04cf38bf05ed301ebaeb47ef8")
|
||||
旋转圆球 = Animation_meta("旋转圆球", True, 0.800, "7380298290140549647", "70989966", "19b93b0edea19a73d2cf7f818ace3265")
|
||||
转圈圈 = Animation_meta("转圈圈", True, 0.800, "7246643852411408952", "15726741", "f2c920e366c3c733f1d86a8473aff310")
|
||||
曝光放射 = Animation_meta("曝光放射", True, 0.800, "7158737452939612703", "5529363", "09df65728356189436974e08c42bc578")
|
||||
玻璃聚集 = Animation_meta("玻璃聚集", True, 1.700, "7340265236101861915", "48072242", "68c8e8f1eba4f4b2e3d35472f8b4822c")
|
||||
分屏横移 = Animation_meta("分屏横移", True, 1.000, "7257878167023522365", "18746326", "dcadf2284399fe6200f77fad9a1ec41a")
|
||||
流金 = Animation_meta("流金", True, 1.500, "7322367212142989850", "39438403", "6654a74eb923c201fe18765f18d4b367")
|
||||
心形放大 = Animation_meta("心形放大", True, 1.500, "7042968847070007844", "1487080", "3bb1bb084e5ebf25e67fc078d3c6a119")
|
||||
老电视 = Animation_meta("老电视", True, 1.400, "7290754106417746491", "26091602", "4cbe6bdc6da704e481a40f44266cee0b")
|
||||
脉冲 = Animation_meta("脉冲", True, 0.900, "7379909514847326732", "70764198", "ae7fac0214409e340db6a600e97303da")
|
||||
能量立方 = Animation_meta("能量立方", True, 1.333, "7359472053998588425", "58285135", "301b4ffff8510c87b7174161b2642ca3")
|
||||
波纹弹动 = Animation_meta("波纹弹动", True, 1.200, "7345731405663441460", "50640360", "b29c4c4dbac023b27bac5d32e642f6bb")
|
||||
|
||||
class Outro_type(Effect_enum):
|
||||
"""剪映自带的视频/图片出场动画类型"""
|
||||
|
||||
# 免费
|
||||
向上转出 = Animation_meta("向上转出", False, 0.500, "6818747115934585357", "701963", "7f57dd9488a89da902a998018adafdf5")
|
||||
向上转出_II = Animation_meta("向上转出 II", False, 0.500, "6818747169017696781", "701965", "0d37319fa4b20f2584ac32294f48a554")
|
||||
跳转闭幕 = Animation_meta("跳转闭幕", False, 0.733, "7280420767378969143", "23302677", "82992a12a8ae1227579be0f66d87d75f")
|
||||
镜像翻转 = Animation_meta("镜像翻转", False, 0.500, "6738353628215513613", "645999", "a24594428fdd0c8078b74659fc1f2679")
|
||||
旋转闭幕 = Animation_meta("旋转闭幕", False, 1.000, "6942482728335970823", "1221132", "b235b8a2a8647a211494856315cde2a9")
|
||||
漩涡旋转 = Animation_meta("漩涡旋转", False, 0.500, "6778418947361346061", "634701", "2f239d1240bc871d05ce582ba201b085")
|
||||
向上滑动 = Animation_meta("向上滑动", False, 0.500, "6798333612958683656", "624737", "1b4343c92c2545a50216b85e2a08a6ee")
|
||||
向下滑动 = Animation_meta("向下滑动", False, 0.500, "6798333787986989576", "624733", "9eced44ba9f495d053661ebd552088bb")
|
||||
向左滑动 = Animation_meta("向左滑动", False, 0.500, "6798332972098392584", "624745", "771fc844822cea60f0623ecff4f4b88a")
|
||||
向右滑动 = Animation_meta("向右滑动", False, 0.500, "6798333350487527950", "624741", "d1dcd128f35a8ad365847355f28e259b")
|
||||
折叠闭幕 = Animation_meta("折叠闭幕", False, 1.500, "7239273967310082621", "14506017", "f750b9b6c7a756dfdd6785cde5d24d00")
|
||||
轻微放大 = Animation_meta("轻微放大", False, 0.500, "6800268611807089166", "629083", "b2a1271b065aa9e6351bfd64ff7d4eea")
|
||||
Kira游动 = Animation_meta("Kira游动", False, 2.267, "7312343337199997450", "34389264", "2cefeb684db271dc288ec225f0854264")
|
||||
缩小 = Animation_meta("缩小", False, 0.500, "6798332648814023181", "624753", "509c5edb2131a88070bf699ad0852e4f")
|
||||
放大 = Animation_meta("放大", False, 0.500, "6798332801864176142", "624749", "01497dc221d288e623a10cac94a5ceca")
|
||||
旋转 = Animation_meta("旋转", False, 0.500, "6798334141323547143", "624729", "44e26ad0221385965730ae69d947d790")
|
||||
斜切 = Animation_meta("斜切", False, 0.700, "7210659943051956797", "10697199", "93fd7d9c4f059c26cd3681dd512c20ed")
|
||||
|
||||
# 付费
|
||||
渐隐 = Animation_meta("渐隐", False, 0.500, "6798320902548230669", "624707", "808a065a2319cc6d1d53d9bec791ac6e")
|
||||
空间扭曲 = Animation_meta("空间扭曲", True, 0.930, "7298918355841323529", "28775864", "04c885b1dbbcf51bcc01e4df931bff72")
|
||||
弹远 = Animation_meta("弹远", True, 1.200, "7314925770181186075", "35749432", "310e6755e6441af5d3405bc80a3be26d")
|
||||
四屏转换 = Animation_meta("四屏转换", True, 0.900, "7341284613165158921", "48492502", "cf7d3bd0e7973868861d1e466cb238eb")
|
||||
分屏翻转 = Animation_meta("分屏翻转", True, 0.560, "7259341241031070268", "19063130", "392b91fd262e9b95e1dcd18274297393")
|
||||
冲撞 = Animation_meta("冲撞", True, 0.767, "7215555273501446716", "11325221", "16e01aa5454653bc89d3b1d8e86ce3a2")
|
||||
旋转圆球 = Animation_meta("旋转圆球", True, 0.800, "7381753028732260916", "71750513", "e824e3d74a50eba64dd87ac11b9bbfb8")
|
||||
砸出波纹 = Animation_meta("砸出波纹", True, 1.366, "7255599483226952249", "18161234", "87e9baa63de40d76f862bb8aa4349de3")
|
||||
交叉震动 = Animation_meta("交叉震动", True, 0.466, "7223227564670587452", "12330095", "3a711c053dcadb7856d19778f72a58c1")
|
||||
能量立方 = Animation_meta("能量立方", True, 1.133, "7361364150229930506", "59265410", "f6c5b98ea69f3b2c3265bb3249973250")
|
||||
横向模糊 = Animation_meta("横向模糊", True, 0.500, "7301943351320777267", "29824130", "294f0f8ecbe4b4a8b8f2c01f579739f1")
|
||||
多层环形 = Animation_meta("多层环形", True, 1.633, "7329445038604161536", "42686393", "c684bdf866bada10acb647e5339397a3")
|
||||
斜向拉丝 = Animation_meta("斜向拉丝", True, 0.500, "7360531353458184715", "58777523", "71a267bc37d3dc0afa3aaae12ec995e7")
|
||||
分屏横移 = Animation_meta("分屏横移", True, 0.880, "7257879855063110205", "18746674", "7382c7210c95548bfc88486be3964284")
|
||||
_2024 = Animation_meta("2024", True, 1.000, "7311958876406944266", "34158075", "93bcb64554588e6f3a0a4ffffa0bb3b5")
|
||||
扫描 = Animation_meta("扫描", True, 0.633, "7316816362305753609", "36871694", "a89a479b5228737e62ccd7e77059315f")
|
||||
曝光放射 = Animation_meta("曝光放射", True, 0.500, "7158753896624558628", "5529791", "70911371ae8ec475600c4e30c9db8994")
|
||||
色散波纹 = Animation_meta("色散波纹", True, 0.767, "7305961286762762790", "31248281", "5477505f844e9bad12dc9074631564b1")
|
||||
马赛克 = Animation_meta("马赛克", True, 1.000, "7283415427328250405", "24073041", "6be9c2fd05f76e3902a9967139706468")
|
||||
十字震动 = Animation_meta("十字震动", True, 0.533, "7352824282289803814", "54685998", "969e17d5d65494d0b10b9111d66802d8")
|
||||
震动波纹 = Animation_meta("震动波纹", True, 1.500, "7307196476340310554", "31806349", "cdb162bc674e495b24d38a2cf4bd04b6")
|
||||
弹力分割 = Animation_meta("弹力分割", True, 1.060, "7343902820808004123", "49678364", "62adcd0cd61c98d0640e657e63b0be8a")
|
||||
震波_III = Animation_meta("震波 III", True, 0.733, "7289005562124046907", "25555607", "59a06bc5a9bfe9c395d45f05ae38435a")
|
||||
立体翻转 = Animation_meta("立体翻转", True, 1.100, "7351333213068857892", "53792520", "82f13f68eb475cfaabaf2a674b50ac8a")
|
||||
流金 = Animation_meta("流金", True, 1.133, "7322857522648322586", "39682247", "646fc008978735fbf5b5d3cde382fc22")
|
||||
划水 = Animation_meta("划水", True, 0.800, "7226632692354257445", "12811717", "f30ab9f83934eafedb4ee01a3d87a995")
|
||||
发光矩形 = Animation_meta("发光矩形", True, 1.133, "7346510998771077659", "51093596", "ccac330a683da920a9638b597ce1f869")
|
||||
玻璃爆开 = Animation_meta("玻璃爆开", True, 0.733, "7347865496508699170", "51922869", "620f6fe34184e1f3cc2284d830c3d1e8")
|
||||
转圈圈 = Animation_meta("转圈圈", True, 0.800, "7246706359381529125", "15754757", "c03fc00075c5b7e53f8bdc0c6f5c360f")
|
||||
烟雾弹 = Animation_meta("烟雾弹", True, 0.900, "7229149181762343484", "13090999", "e70e26e7aa770d0deedca54e3eac0323")
|
||||
闪现 = Animation_meta("闪现", True, 0.250, "7186978468087730749", "8303609", "f170e9020eaf5a6f6180c6fd30775400")
|
||||
圆形闭幕 = Animation_meta("圆形闭幕", True, 0.900, "7218210114052821561", "11680737", "0acd6d992db52febb66a63a3cfc6ea00")
|
||||
飘散 = Animation_meta("飘散", True, 2.000, "7305957010518839846", "31245441", "286553fb78795b8044746938e4327d5e")
|
||||
闪屏 = Animation_meta("闪屏", True, 0.833, "7243999104114627132", "15215961", "e4ef6b01ae37409046d089c73cd16702")
|
||||
老电视 = Animation_meta("老电视", True, 1.600, "7283429462924857914", "24079477", "50d67778f791d56b12ab5c6da30c37b6")
|
||||
向上闪出 = Animation_meta("向上闪出", True, 0.700, "7273389599978689079", "21816912", "4e39075df8d20d1d938c5bf23b2604fb")
|
||||
交错闭幕 = Animation_meta("交错闭幕", True, 1.100, "7280797214186672701", "23387942", "1804a8bb6a3eb61c8e5720428d4648e7")
|
||||
心形缩小 = Animation_meta("心形缩小", True, 1.000, "7034346969086562824", "1463778", "677ec2564241df326a921fa9dc58bd81")
|
||||
水墨 = Animation_meta("水墨", True, 2.033, "7322073757080621606", "39326538", "32664ec43aa94c7861104f4e4d401113")
|
||||
折叠 = Animation_meta("折叠", True, 0.300, "7221420528148419133", "12091673", "7968ce8b7391c3725f2b7667d0e0f80a")
|
||||
画出爱心 = Animation_meta("画出爱心", True, 1.100, "7248951676420231735", "16231427", "ad5c127255cc8f2c941f7406f8a36f19")
|
||||
侧滑 = Animation_meta("侧滑", True, 0.400, "7239559574095663671", "14524385", "1a661b1d0728177d889353174bfb0bf8")
|
||||
抖动横移 = Animation_meta("抖动横移", True, 0.400, "7265946879060349477", "20437843", "bcebbe81fc2243a3685ab8e550e3415f")
|
||||
便利贴 = Animation_meta("便利贴", True, 0.800, "7379884133268328996", "70741835", "ce8f5846f77edba5099b042ef7b6958b")
|
||||
拼图 = Animation_meta("拼图", True, 1.100, "7369889275233440265", "64963293", "9e1b296804c2f10ce26fcf727d1dd9af")
|
||||
向下甩动 = Animation_meta("向下甩动", True, 1.000, "7338638617322983976", "47191669", "178fe900252c316f5301d805a735ce8e")
|
||||
脉冲 = Animation_meta("脉冲", True, 0.800, "7379909625870553654", "70764127", "f916cc354e9c5b80698d612397a0c4f7")
|
||||
向上滚动 = Animation_meta("向上滚动", True, 1.000, "7312341715220697650", "34388502", "92d44450f8557fc1d8d93eb6cbe2a832")
|
||||
拉丝滑出 = Animation_meta("拉丝滑出", True, 0.500, "7114172789287817758", "3240292", "e3018d5ee625a58fdeaa5ccd75d0e2e2")
|
||||
波纹弹动 = Animation_meta("波纹弹动", True, 1.200, "7345803511390540288", "50691424", "660ff84eabd735769a72978914e8e82d")
|
||||
快速翻页 = Animation_meta("快速翻页", True, 0.200, "7296416099606729225", "27895223", "00b26549833daf565f2660d0abcb0462")
|
||||
荧光爆闪 = Animation_meta("荧光爆闪", True, 0.800, "7347994415576650255", "52020801", "6558ab016ce06546d3c380b43480baab")
|
||||
模糊聚焦 = Animation_meta("模糊聚焦", True, 0.833, "7338742568592609801", "47267179", "2cf9380884a5e9853ecdbb4869b01b0e")
|
||||
抖动变焦 = Animation_meta("抖动变焦", True, 0.500, "7153942002696983047", "5188733", "6e14698c240bfa454836d26eaa44d3bc")
|
||||
爱心碰撞 = Animation_meta("爱心碰撞", True, 2.300, "7328249133079204352", "42112174", "1cf69aac7b9478f5628413aada8c0707")
|
||||
|
||||
class Group_animation_type(Effect_enum):
|
||||
"""剪映自带的视频/图片组合动画类型, 组合动画一般与视频片段等长"""
|
||||
|
||||
# 免费
|
||||
三分割 = Animation_meta("三分割", False, 0.500, "6873360856541827591", "922958", "8eec0e58254ae6906c085ffc36570d6f")
|
||||
三分割_II = Animation_meta("三分割 II", False, 0.500, "6873360923646497293", "922957", "42db12dd4ef8bdc4098ba3fd321c1de9")
|
||||
上下分割 = Animation_meta("上下分割", False, 0.500, "6875935836177699335", "931224", "18312916ab04e01f4aa11f58075a86bb")
|
||||
上下分割_II = Animation_meta("上下分割 II", False, 0.500, "6875935919661126157", "3144548", "2b773c5e2856fac177f9ce4b39a87b74")
|
||||
上升旋转 = Animation_meta("上升旋转", False, 0.500, "6813965595915063815", "691841", "45d026e340219c0caae01e8c9e0260ba")
|
||||
下降向右 = Animation_meta("下降向右", False, 0.500, "6781683518222111239", "503140", "545ed5bde7166e5e18aa5e4ba9662348")
|
||||
下降向左 = Animation_meta("下降向左", False, 0.500, "6759351225772151303", "446392", "2ba01976cbb05f3a22bea55ee5fcf3c3")
|
||||
中间分割 = Animation_meta("中间分割", False, 0.500, "6856970350270353928", "871868", "39118319d1910ecf60eae3e8c0871e6e")
|
||||
中间分割_II = Animation_meta("中间分割 II", False, 0.500, "6856970411352003080", "871867", "d35d05906c0ffe288964f33d96cbbe14")
|
||||
叠叠乐 = Animation_meta("叠叠乐", False, 0.500, "6836319728038842894", "872824", "63c0c0634a0c5f99ec74f839421018b0")
|
||||
叠叠乐_II = Animation_meta("叠叠乐 II", False, 0.500, "6836319649844433415", "872826", "464c1a4bb1176029ffa3f1b6b7ae25be")
|
||||
叠叠乐_III = Animation_meta("叠叠乐 III", False, 0.500, "6836319781004513805", "872828", "8c55f6c4f5abf7d41e55a77fc8f5fdad")
|
||||
叠叠乐_IV = Animation_meta("叠叠乐 IV", False, 0.500, "6836319828656001550", "872830", "1b59e3f39c921c7b45f2cfa2daa6c71d")
|
||||
叠叠乐_V = Animation_meta("叠叠乐 V", False, 0.500, "6836319888827486728", "872834", "9d5c1a042586999b720b9c4582f15256")
|
||||
叠叠乐_Ⅵ = Animation_meta("叠叠乐 Ⅵ", False, 0.500, "6839582631345000967", "872836", "1c05ec01a8c9e8fc640a7b095ccf361d")
|
||||
右拉镜 = Animation_meta("右拉镜", False, 0.500, "6772415374165021191", "471347", "0be1223dd51448374c28708e46c2f068")
|
||||
向右下降 = Animation_meta("向右下降", False, 0.500, "6781683438396117517", "503138", "8941aec6123fd5424c3514402e3de777")
|
||||
向右缩小 = Animation_meta("向右缩小", False, 0.500, "6772415063216099848", "471341", "3367a84172585bcfeaf4c3bb2e16bb79")
|
||||
向左下降 = Animation_meta("向左下降", False, 0.500, "6760223716392571395", "447588", "c764dfbf9f82b935b807bc4420af4821")
|
||||
向左缩小 = Animation_meta("向左缩小", False, 0.500, "6772415148423385607", "471343", "90c156e54a3a2c68ff282f17197e8403")
|
||||
哈哈镜 = Animation_meta("哈哈镜", False, 0.500, "6832226792556728846", "748348", "eee5d8c1dd9be05badb8fecc9ec7b977")
|
||||
哈哈镜_II = Animation_meta("哈哈镜 II", False, 0.500, "6832226909875606029", "748350", "87fce972209bc94afafbdaff1a806c00")
|
||||
四格滑动 = Animation_meta("四格滑动", False, 0.500, "6883727868451361293", "945730", "591071275e1a96b5a82ff9c95e47d23e")
|
||||
四格翻转 = Animation_meta("四格翻转", False, 0.500, "6865578846393995784", "1362932", "88c1ed96cfa3f182a341c27adc7edfdb")
|
||||
四格转动 = Animation_meta("四格转动", False, 0.500, "6891835548688716302", "957940", "d6b09575f3c468b2c9b15ad3e149bad7")
|
||||
四格转动_II = Animation_meta("四格转动 II", False, 0.500, "6891835601067184653", "957939", "696b72074b5476f6912d2f75c9ac923f")
|
||||
回弹伸缩 = Animation_meta("回弹伸缩", False, 0.500, "6795425591014199822", "530249", "b55a407d406d39c8c34dd69178fa6699")
|
||||
夹心饼干 = Animation_meta("夹心饼干", False, 0.500, "6868146033247916558", "1362936", "23091e7d56610c4253a186488657cd30")
|
||||
夹心饼干_II = Animation_meta("夹心饼干 II", False, 0.500, "6868146123710665223", "1362934", "09b29b56757a17ad7ca31a57eb8b5726")
|
||||
小火车 = Animation_meta("小火车", False, 0.500, "6860405888784536072", "885144", "d80771b2b33136a2b531f13bad536e08")
|
||||
小火车_II = Animation_meta("小火车 II", False, 0.500, "6860406007160377863", "885143", "60609f186f005e47d27b29aa040dcc39")
|
||||
小火车_III = Animation_meta("小火车 III", False, 0.500, "6860406091700769293", "885142", "e41a0312ec6ca0932ba92c163f4ad4f9")
|
||||
小火车_IV = Animation_meta("小火车 IV", False, 0.500, "6860406196130550286", "885141", "e5ef14b6031eba52e9be8ff9092e093b")
|
||||
小陀螺 = Animation_meta("小陀螺", False, 0.500, "6874487656969933325", "923592", "720beb8cd875bc9bb10b63515d9ac2d6")
|
||||
小陀螺_II = Animation_meta("小陀螺 II", False, 0.500, "6874487735059485198", "923591", "95c42369d9e1d09e3b2d453ac0906245")
|
||||
左右分割 = Animation_meta("左右分割", False, 0.500, "6886282872680878599", "948476", "3744ef4eef4fadb4630dc0674169c3d0")
|
||||
左右分割_II = Animation_meta("左右分割 II", False, 0.500, "6886282936048423431", "948475", "9b880a7edbe927fd0da9a0f94829740f")
|
||||
左拉镜 = Animation_meta("左拉镜", False, 0.500, "6772415248973435395", "471345", "49104c483b8eaa891e71e7a2b20c3c41")
|
||||
弹入旋转 = Animation_meta("弹入旋转", False, 0.500, "6810286558826992136", "669963", "8c3498b2994796590e6d21d319a459e4")
|
||||
形变右缩 = Animation_meta("形变右缩", False, 0.500, "6851395907804467720", "813139", "79bfe1364728f28383b5a4436d7a801e")
|
||||
形变左缩 = Animation_meta("形变左缩", False, 0.500, "6851395726937690637", "813140", "1455b7f8a6e2970538e97046e6f2922b")
|
||||
形变缩小 = Animation_meta("形变缩小", False, 0.500, "6777260789263766030", "487587", "8fb2439ce140bde6d46e40740ec29a8d")
|
||||
悠悠球 = Animation_meta("悠悠球", False, 0.500, "6821451358101574152", "717346", "900be5954b07d6ef66eb6fec1606e19c")
|
||||
悠悠球_II = Animation_meta("悠悠球 II", False, 0.500, "6821451462904648200", "717348", "210abff7a9bb030bef04e47317783089")
|
||||
手机 = Animation_meta("手机", False, 0.500, "6861892418334102030", "1362928", "55fd386ec6f779110e3b12b89deaa79c")
|
||||
手机_II = Animation_meta("手机 II", False, 0.500, "6862918279183208973", "1362926", "b861f8270870663e5c3f8bbb1fced93a")
|
||||
手机_III = Animation_meta("手机 III", False, 0.500, "6862918366550561294", "1362924", "e056d0f8601d91d70e20e61bd63793f5")
|
||||
扭曲拉伸 = Animation_meta("扭曲拉伸", False, 0.500, "7026278592623415822", "1426278", "ca0a43e525601adf9d14089393610d9c")
|
||||
抖入放大 = Animation_meta("抖入放大", False, 0.500, "6761360765925462536", "450264", "8c01759b6ace838086122b8e2b4fc0aa")
|
||||
拉伸扭曲 = Animation_meta("拉伸扭曲", False, 0.500, "7025952723027628557", "1425496", "39862f9fa5c934d72d36923f2368de4a")
|
||||
放大弹动 = Animation_meta("放大弹动", False, 0.500, "7023931891363353101", "1418682", "18bfc84500372c9a49023c1a77efa6e5")
|
||||
斜转 = Animation_meta("斜转", False, 0.500, "6847734302193488392", "872874", "4cc2597d961bafbd3c7877bc3f75f79a")
|
||||
斜转_II = Animation_meta("斜转 II", False, 0.500, "6847734360636920327", "872876", "b37e163c186d88db144aacd6280c0811")
|
||||
方片转动 = Animation_meta("方片转动", False, 0.500, "6897114113726485000", "968162", "dfc6082d56863c5e700a0a5a17102abc")
|
||||
方片转动_II = Animation_meta("方片转动 II", False, 0.500, "6897114201702011405", "968161", "afdb5e78ddf7d480e78cabb527db9241")
|
||||
旋入晃动 = Animation_meta("旋入晃动", False, 0.500, "6789167874511475207", "519840", "0ee3fc24d73d3d32a666c46c7f574431")
|
||||
旋出渐隐 = Animation_meta("旋出渐隐", False, 0.500, "6824302025698710024", "719940", "13d85c4e8be67525a1e567121aa68170")
|
||||
旋转上升 = Animation_meta("旋转上升", False, 0.500, "6813965670716281352", "691843", "56e36c8a8602ef9d2634b173ba95c75d")
|
||||
旋转伸缩 = Animation_meta("旋转伸缩", False, 0.500, "6795425422046663182", "530247", "131794c7a6f15ecfde066b5e4d4e6f35")
|
||||
旋转回吸 = Animation_meta("旋转回吸", False, 0.500, "6810286613898203661", "669965", "bce87aa9bfbabc1e8c97ed122fa16f49")
|
||||
旋转缩小 = Animation_meta("旋转缩小", False, 0.500, "6759046644462785037", "445858", "3ae63cabefdc45ff05fb30def814c79b")
|
||||
旋转降落 = Animation_meta("旋转降落", False, 0.500, "6759046515521491464", "445856", "8099feb138226b21ec8ae0a64313fa83")
|
||||
晃动旋出 = Animation_meta("晃动旋出", False, 0.500, "6789167998700622350", "519842", "5b25fea3f8bd82496e39be0bb590726c")
|
||||
水晶 = Animation_meta("水晶", False, 0.500, "6857333749718192654", "1362920", "de28fd5ff1c5fa607cc09306a5de1fc9")
|
||||
水晶_II = Animation_meta("水晶 II", False, 0.500, "6857333869541069325", "1362922", "66d0f40fad32ba15e72d6687f12604f8")
|
||||
波动滑出 = Animation_meta("波动滑出", False, 0.500, "7017646605671076359", "1392376", "c546f43ce65a4977ee11010063ee7b50")
|
||||
海盗船 = Animation_meta("海盗船", False, 0.500, "6830302168751280648", "1362866", "271eda8d9ae3ff3435206719f32a6c05")
|
||||
海盗船_II = Animation_meta("海盗船 II", False, 0.500, "6830302282995732999", "1362868", "13f077dc64c6c938dd8e755b0f9529bd")
|
||||
海盗船_III = Animation_meta("海盗船 III", False, 0.500, "6830302335047045639", "1362872", "378d4ce23f6069e6e0752ccd6b201292")
|
||||
海盗船_IV = Animation_meta("海盗船 IV", False, 0.500, "6830302424826122765", "1362870", "8bef9d70f593dfa3566ba04e8c19316b")
|
||||
滑入波动 = Animation_meta("滑入波动", False, 0.500, "7023747922718102023", "1418546", "7c4a80c235da2050b672f66a0a9e54b3")
|
||||
滑滑梯 = Animation_meta("滑滑梯", False, 0.500, "6828829568879563271", "741020", "45a18cb8ead63a3b6a87731adf6ac79e")
|
||||
滑滑梯_II = Animation_meta("滑滑梯 II", False, 0.500, "6828829741013799432", "741022", "9c669766b045f246772095114c5ef594")
|
||||
百叶窗 = Animation_meta("百叶窗", False, 0.500, "6771299961171612174", "467361", "f6f38be419308a9134467d26829576af")
|
||||
百叶窗_II = Animation_meta("百叶窗 II", False, 0.500, "6782101071402635790", "506768", "9812eeaceca9d8a1adba077c8c35c06b")
|
||||
碎块滑动 = Animation_meta("碎块滑动", False, 0.500, "6778405418969338382", "490068", "218746bfacd737cf075912452a10100d")
|
||||
碎块滑动_II = Animation_meta("碎块滑动 II", False, 0.500, "6778300107113632269", "489860", "1abb69885123e9c59fe5f872c586d17a")
|
||||
立方体 = Animation_meta("立方体", False, 0.500, "6837352063496622599", "872856", "71ae450afeb88ae2620473ab790acf0e")
|
||||
立方体_II = Animation_meta("立方体 II", False, 0.500, "6834812485023830535", "872858", "efc0e23b864f5fcfbaa77723044c4957")
|
||||
立方体_III = Animation_meta("立方体 III", False, 0.500, "6834812541118452237", "872860", "dfc2e372bc454764f0b355904542e228")
|
||||
立方体_IV = Animation_meta("立方体 IV", False, 0.500, "6841793140949520910", "872864", "c66bf1692fe1e6bd6dd2e49eddfcd0c0")
|
||||
立方体_V = Animation_meta("立方体 V", False, 0.500, "6841793224663634446", "873096", "e3935dbcaf28be18a598eebb8fb79161")
|
||||
绕圈圈 = Animation_meta("绕圈圈", False, 0.500, "6850287838441771534", "872868", "98bfd8ca3177b85246b18502832232f0")
|
||||
绕圈圈_II = Animation_meta("绕圈圈 II", False, 0.500, "6850287920255865357", "872872", "10eaa3db7b761a9846764a53912d7c77")
|
||||
绕圈圈_III = Animation_meta("绕圈圈 III", False, 0.500, "6854782718975152653", "872918", "c2e7ff02916f19a13ada361abddb8f98")
|
||||
绕圈圈_IV = Animation_meta("绕圈圈 IV", False, 0.500, "6854782786553778695", "872920", "1e7d503bcf05a17f175759e5c6cfbe7b")
|
||||
缩小弹动 = Animation_meta("缩小弹动", False, 0.500, "7017689072978104869", "1392530", "bca5ca47f6f33268fb1de55fa8946519")
|
||||
缩小旋转 = Animation_meta("缩小旋转", False, 0.500, "6760119657429996046", "447318", "b5791968245b8246c3e87e4d9816cd3b")
|
||||
缩小转出 = Animation_meta("缩小转出", False, 0.500, "6805018974070247950", "638823", "08ab26276c336b284d07b336d5c32aad")
|
||||
缩放 = Animation_meta("缩放", False, 0.500, "6759078592740594184", "446078", "091f668bbb6406305614f9de55bf4aa6")
|
||||
缩放_II = Animation_meta("缩放 II", False, 0.500, "6779083172429697544", "493000", "bb460b0c6a3c424618718276b25a812b")
|
||||
翻转 = Animation_meta("翻转", False, 0.500, "6843309964732142094", "872838", "5f153d35f1c3098fef8325badc40c5e8")
|
||||
翻转_II = Animation_meta("翻转 II", False, 0.500, "6843310029689328135", "872840", "befc44f24a2747201d1d75e6a29753ce")
|
||||
翻转_III = Animation_meta("翻转 III", False, 0.500, "6843310084743762446", "872842", "b8167fc9e9deb2f638788bfc7539ed7f")
|
||||
翻转_IV = Animation_meta("翻转 IV", False, 0.500, "6843310129736061447", "872844", "9636ccab84e8f2c357812a38b785f6e0")
|
||||
翻转_V = Animation_meta("翻转 V", False, 0.500, "6843310237902967304", "872848", "4d27983b5b2899b46334d3fd999bc7d8")
|
||||
翻转_VI = Animation_meta("翻转 VI", False, 0.500, "6843310299991249421", "872850", "8807b174b58ee897667c08e6bee1a4f8")
|
||||
荡秋千 = Animation_meta("荡秋千", False, 0.500, "6811007755785081357", "680643", "565256202d17fda9af7f56e27d099543")
|
||||
荡秋千_II = Animation_meta("荡秋千 II", False, 0.500, "6811007833069326862", "680645", "212f5f11d11ee19690df59a096b7c3f8")
|
||||
转入转出 = Animation_meta("转入转出", False, 0.500, "6805012562174808590", "638793", "3d26d9df896b72d5ac3926828afcd791")
|
||||
转入转出_II = Animation_meta("转入转出 II", False, 0.500, "6818747242258633224", "701967", "ec4ed56911472b95462e4b0b8ac6a103")
|
||||
转圈圈 = Animation_meta("转圈圈", False, 0.500, "6829129745226011144", "741502", "40d9b656e338f39f8eb2a7d27a85e036")
|
||||
过山车 = Animation_meta("过山车", False, 0.500, "6870060878234915342", "911862", "64e30d2e2577f6a95313ed806807baa7")
|
||||
过山车_II = Animation_meta("过山车 II", False, 0.500, "6870060932928639501", "911861", "240042ee2b35aaa7f30b6e0c03e9ac4c")
|
||||
降落旋转 = Animation_meta("降落旋转", False, 0.500, "6759075297091392007", "446076", "c5c1d37924b58b5c1e5355db14e72372")
|
||||
魔方 = Animation_meta("魔方", False, 0.500, "6870060995365048840", "1362938", "b104d21e0f1b7eb044946f6bf0be1133")
|
||||
魔方_II = Animation_meta("魔方 II", False, 0.500, "6870061049559650829", "1362940", "53bc750124a30d746adbf44151116fde")
|
||||
|
||||
# 付费
|
||||
分身 = Animation_meta("分身", True, 0.500, "6883761132645913096", "945872", "de31f6d54856f05a0824eab7afac58e7")
|
||||
分身_II = Animation_meta("分身 II", True, 0.500, "6883761226950644231", "945871", "22ce9336e5716a87d6a2a980f6b84e78")
|
||||
动感摇晃I = Animation_meta("动感摇晃I", True, 0.500, "7173927429394666020", "6983415", "ceb6b5bf10aab23f1066481cefd5adfb")
|
||||
动感摇晃II = Animation_meta("动感摇晃II", True, 100.000, "7175103054956466744", "7129471", "4e88c30adc92ca2809d285ab67276467")
|
||||
四格滑动_II = Animation_meta("四格滑动 II", True, 0.500, "6883727923845534216", "945729", "e8d17f7948b2805f284d82d6a6992302")
|
||||
四格翻转_II = Animation_meta("四格翻转 II", True, 0.500, "6865579178599649806", "1362930", "840aa022c0a9b3b6b4876dd7084372b7")
|
||||
回忆旋转 = Animation_meta("回忆旋转", True, 0.500, "7186961278022193722", "8300599", "fa3c068a56733a2149d5c0d03560aad8")
|
||||
坠落 = Animation_meta("坠落", True, 0.500, "7235902373971890747", "14020637", "0049e2c104b1ae46dbf717ea73b71234")
|
||||
弹动冲屏 = Animation_meta("弹动冲屏", True, 0.500, "7200308690904158778", "9491799", "cc01a66ec4b316b7342fe8fd5cfe5e87")
|
||||
波动吸收 = Animation_meta("波动吸收", True, 0.500, "7107468232390349349", "2786424", "ddbc0f962c69263480e6d188bf2f4b63")
|
||||
波动放大 = Animation_meta("波动放大", True, 0.500, "7111631619768717860", "3113716", "90f87e49deba3845d73b5855dc3fa442")
|
||||
相框滑动 = Animation_meta("相框滑动", True, 0.500, "7206139216038728248", "10166295", "517a71d78782ebc9a9718acfb865fba9")
|
||||
红酒摇晃 = Animation_meta("红酒摇晃", True, 0.800, "6903771548436402702", "1417022", "95d79896a437524c4f94dc2902bb3b6c")
|
||||
跳跳糖 = Animation_meta("跳跳糖", True, 0.700, "7199944821098680890", "9432783", "fc4e0cc6a2f2c775659fa9493cff9fe8")
|
||||
闪光放大 = Animation_meta("闪光放大", True, 0.500, "7166437469909422623", "6210029", "a6495ac2010a3caae003517edcc1d5bc")
|
||||
闪光放大_II = Animation_meta("闪光放大 II", True, 0.500, "7166437532568130055", "6210033", "90ad69d3ad224c6e7234ad9ba9eb1467")
|
||||
|
||||
class Text_intro(Effect_enum):
|
||||
"""文字入场动画, 默认时长为0.5秒"""
|
||||
|
||||
# 免费
|
||||
冲屏位移 = Animation_meta("冲屏位移", False, 0.0, "7078181271393800711", "1643884", "fd73ffc26a3f02fa6d957a94b590623a")
|
||||
卡拉OK = Animation_meta("卡拉OK", False, 0.0, "6771294855785091588", "1558840", "a6d37c370a463070046c5d9feb0f9dfb")
|
||||
变色输入 = Animation_meta("变色输入", False, 0.0, "7397306443147252233", "77035159", "e0e29d6ea015f0d1d38b4a852a1b6202")
|
||||
右上弹入 = Animation_meta("右上弹入", False, 0.0, "7074854080388010532", "1621978", "932ea0a91ca337bc1fd566aa17cb9aa7")
|
||||
右下擦开 = Animation_meta("右下擦开", False, 0.0, "7088576340361744903", "1715294", "70a3ffbff2b02ede796ee38d95b38db2")
|
||||
向上擦除 = Animation_meta("向上擦除", False, 0.0, "6774625910067827212", "1644272", "ee74a3a8afb2167f4403dee957338afe")
|
||||
向上滑动 = Animation_meta("向上滑动", False, 0.0, "6763470111253729803", "1644267", "22030c473076074288fd01b17d1c6174")
|
||||
向上翻转 = Animation_meta("向上翻转", False, 0.0, "7194703971498332727", "8945307", "0cf2050093a2bbe736ab4b2ee9002dcf")
|
||||
向上重叠 = Animation_meta("向上重叠", False, 0.0, "7077500533040222756", "1639676", "b3ea1be4937b7cd032f1775d98b1f06e")
|
||||
向上露出 = Animation_meta("向上露出", False, 0.0, "7163514358935327268", "5925717", "3786ff3fcc9795eead5fd5629ff7e4e9")
|
||||
向下擦除 = Animation_meta("向下擦除", False, 0.0, "6774626192990409224", "1644273", "bfe1add2d59ee32449a979257d4a3448")
|
||||
向下滑动 = Animation_meta("向下滑动", False, 0.0, "6724921985282871816", "1644268", "f5506a1b5ebcf9d0636d7809bf3cb81a")
|
||||
向下露出 = Animation_meta("向下露出", False, 0.0, "7163514502128865823", "5925716", "a7b05a11c6bdc7010cc4dc7f1d276407")
|
||||
向下飞入 = Animation_meta("向下飞入", False, 0.0, "7088942186561016356", "1719670", "b312472b5a680f49d2d1229cfe07f49d")
|
||||
向右擦除 = Animation_meta("向右擦除", False, 0.0, "6771288500240126478", "1644271", "b4a5ba027822ca3e1c9d83d2f5a58a08")
|
||||
向右滑动 = Animation_meta("向右滑动", False, 0.0, "6724920136056181256", "1644266", "c49f75ef6e0f886e570f68a00f7c1312")
|
||||
向右缓入 = Animation_meta("向右缓入", False, 0.0, "7043778124760224292", "1488722", "2d751bb706b38a030ab7eb3382b2d248")
|
||||
向右集合 = Animation_meta("向右集合", False, 0.0, "7081206983461704199", "1661186", "5a78f1024ecdc9a6b69220eac58a0963")
|
||||
向右露出 = Animation_meta("向右露出", False, 0.0, "7163514730525495839", "5925714", "6f8e0a5cd98c44b79f9ec09b0b913059")
|
||||
向左擦除 = Animation_meta("向左擦除", False, 0.0, "6774626830038077960", "1644270", "4db856992dc60d1220664165d4130042")
|
||||
向左滑动 = Animation_meta("向左滑动", False, 0.0, "6763470195894784525", "1644277", "13c954ed3bc583f87e9f79a2325b8e84")
|
||||
向左露出 = Animation_meta("向左露出", False, 0.0, "7163514612690719269", "5925715", "b4119cf3405c71bc556e1c5562e22d01")
|
||||
圆形扫描 = Animation_meta("圆形扫描", False, 0.0, "6840689010034086407", "1644280", "ac77daf80de65a4beb1164ce44c500c5")
|
||||
复古打字机 = Animation_meta("复古打字机", False, 0.0, "7253888335163167291", "17639720", "a69db3276f15fa2affcd98f2236c873d")
|
||||
居中打字 = Animation_meta("居中打字", False, 0.0, "7265222187286532667", "20303987", "40f484d3b77321b38d53b30d94c2dce1")
|
||||
左上弹入 = Animation_meta("左上弹入", False, 0.0, "7078586233030447629", "1646760", "6467514ec2a8740953d29c3915364a31")
|
||||
左移弹动 = Animation_meta("左移弹动", False, 0.0, "7313890082040058406", "35176342", "c21d4019453137cd76e0d847d5d8af96")
|
||||
开幕 = Animation_meta("开幕", False, 0.0, "6835571502050447879", "1644279", "99a6fdf1f3b43b15b70c31427e09c8a5")
|
||||
弹入 = Animation_meta("弹入", False, 0.0, "6887482184844710413", "1644313", "0533e3aeb2cda562cdd8a86693815443")
|
||||
弹弓 = Animation_meta("弹弓", False, 0.0, "6862897343176380942", "1644305", "f9300b314e5bd7df573063b15a1ab081")
|
||||
弹性伸缩 = Animation_meta("弹性伸缩", False, 0.0, "6872642189260755463", "1644311", "7d23b7a68a1bf21c7692a35ffa6ddcdc")
|
||||
弹簧 = Animation_meta("弹簧", False, 0.0, "6884154692398486023", "1644312", "34d74f1bf451dac1a23158380a5be322")
|
||||
彩色映射 = Animation_meta("彩色映射", False, 0.0, "7039655272222036516", "1476514", "46f37098540b9250abdad9bb1282ec83")
|
||||
打字机_I = Animation_meta("打字机 I", False, 0.0, "6724920249654710791", "1644275", "7c7cfe92aa22a8e131c94d20f44e97df")
|
||||
打字机_II = Animation_meta("打字机 II", False, 0.0, "6724920636403094028", "1644276", "42996c18d556c4de18cc3dc2c7387158")
|
||||
打字机_III = Animation_meta("打字机 III", False, 0.0, "6724920521462387207", "1644335", "1b21dfb54b0ccd50e50f383f01d0a193")
|
||||
打字机IV = Animation_meta("打字机IV", False, 0.0, "7237409385092223525", "14235879", "6828d67634e66ace1e76c4eb7cc2f8e6")
|
||||
扭曲模糊 = Animation_meta("扭曲模糊", False, 0.0, "7089261793406620197", "1722114", "40a9fd02e81930bc0289aeb692c382f6")
|
||||
拖尾 = Animation_meta("拖尾", False, 0.0, "7244102915239973432", "15259479", "40884dac1fc802d207c69b05e2987d4d")
|
||||
收拢 = Animation_meta("收拢", False, 0.0, "6779879712261935619", "1644261", "b173da2fb68d5f8e7dbb2cc000a50bdd")
|
||||
放大 = Animation_meta("放大", False, 0.0, "6724919499042066958", "1644264", "cf0f072aa31d3884ba90362af063f55a")
|
||||
故障打字机 = Animation_meta("故障打字机", False, 0.0, "6870061463243854350", "1644308", "b4536942105b69e637dabef4c3ebfc6d")
|
||||
旋入 = Animation_meta("旋入", False, 0.0, "6763873859402732039", "1644265", "dc3a54158c51f45a0033a16f5763e047")
|
||||
日出 = Animation_meta("日出", False, 0.0, "6779084126457696776", "1644269", "9e39257e0d8b60598d1c09bb31fbc62a")
|
||||
晕开 = Animation_meta("晕开", False, 0.0, "7088531060341871141", "1714696", "2f7aebf0f525ef21f8b00070c17d2fc2")
|
||||
模糊 = Animation_meta("模糊", False, 0.0, "6923094735116571150", "1644338", "0e57ec99758f1e12636a73c6ec4fb6f5")
|
||||
水墨晕开 = Animation_meta("水墨晕开", False, 0.0, "7278295995362841145", "22734325", "5c970b17e18e3441b917a7bcba4d043b")
|
||||
水平翻转 = Animation_meta("水平翻转", False, 0.0, "7051512227353858590", "1644340", "9403a81925b4886589f745130a67cb05")
|
||||
波浪弹入 = Animation_meta("波浪弹入", False, 0.0, "6917178744775905806", "1644316", "301272b44278c3b5ebe228e8baa8d984")
|
||||
渐显 = Animation_meta("渐显", False, 0.0, "6724916044072227332", "1644304", "40859aa05ff9f3e3a3f0de7bfead1c42")
|
||||
溶解 = Animation_meta("溶解", False, 0.0, "6872642398095151629", "1644310", "162408e430501a31662f901c51476e59")
|
||||
滑动上升 = Animation_meta("滑动上升", False, 0.0, "7275687883011265083", "22226771", "9ab223e5e9a0b9611b04062048173de9")
|
||||
生长 = Animation_meta("生长", False, 0.0, "6869302248103481869", "1644307", "b0f76f716f571ecde209056995e96978")
|
||||
甩出 = Animation_meta("甩出", False, 0.0, "7244102679851438650", "15261071", "97162e8faa56cf163b8f2c1bfd5ad6e0")
|
||||
站起 = Animation_meta("站起", False, 0.0, "7265288917279052344", "20324364", "6f322d7bb7fe6b443197c2bf5d64dd8b")
|
||||
缩小 = Animation_meta("缩小", False, 0.0, "6724921217721045515", "1644263", "0b58ad7d0d7cc93080e7bedfd0caa222")
|
||||
缩小_II = Animation_meta("缩小 II", False, 0.0, "7041836555903701540", "1644341", "ae803da2a5d2292e0f8be3c8ab3b3788")
|
||||
羽化向右擦开= Animation_meta("羽化向右擦开", False, 0.0, "6897084405781631496", "1644314", "d330712b8f96ce33d450489ea6e459a3")
|
||||
羽化向左擦开= Animation_meta("羽化向左擦开", False, 0.0, "6897084292908716557", "1644315", "a4eefe0afe41cd05acd1beb3d2615b23")
|
||||
翻动 = Animation_meta("翻动", False, 0.0, "7308278898330964489", "32283659", "c863f3afe0d73cccc19188d6313b1dae")
|
||||
轻微放大 = Animation_meta("轻微放大", False, 0.0, "6763469998330483213", "1644262", "6f5ec0bb82bfd24a72706e2006c0e806")
|
||||
逐字旋转 = Animation_meta("逐字旋转", False, 0.0, "7111643562676064805", "3114660", "17a78b3b5c193a3e30431946a8cbd696")
|
||||
逐字显影 = Animation_meta("逐字显影", False, 0.0, "7038882772450021896", "1644339", "2f250516dcea1a591656dabc9c40684f")
|
||||
逐字翻转 = Animation_meta("逐字翻转", False, 0.0, "7112241904216969765", "3138860", "cdf2df541dea807f4bcb29ede73dd766")
|
||||
闪动 = Animation_meta("闪动", False, 0.0, "7035902226602136071", "1644322", "8a1581c846a5933e8a90204219504892")
|
||||
随机弹跳 = Animation_meta("随机弹跳", False, 0.0, "7021831463867781662", "1644321", "d49f117c117e7d6b4dcb53bbe9b5ed4a")
|
||||
随机飞入 = Animation_meta("随机飞入", False, 0.0, "6872642542765085191", "1644309", "d9ad3796df2b0881ea144f8dfa44e0b1")
|
||||
|
||||
# 付费
|
||||
乱码故障 = Animation_meta("乱码故障", True, 0.0, "7325648367747338802", "40877554", "00b40103690bfb45e0125592b6ec0f5c")
|
||||
二段缩放 = Animation_meta("二段缩放", True, 0.0, "7238519092997526074", "14394713", "a4cba6840c1bf92bc73bb1bcacf7b76e")
|
||||
便利贴 = Animation_meta("便利贴", True, 0.0, "7307207886843679283", "31819229", "4e9265ea4703be87feaf640d79b23f7c")
|
||||
倒数 = Animation_meta("倒数", True, 0.0, "7314303157360661018", "35401566", "814df0b29746943fe165ae9b16719cc2")
|
||||
兔子弹跳 = Animation_meta("兔子弹跳", True, 0.0, "7187785892382118461", "8398145", "5d157129853f479ea15f75075c1ef070")
|
||||
冰雪飘动 = Animation_meta("冰雪飘动", True, 0.0, "7314291622525538843", "35395178", "69dcdf8547a23b2cc92e566ab5e266ec")
|
||||
发光闪入 = Animation_meta("发光闪入", True, 0.0, "7308272157442707978", "32278776", "bf803f5695c3775cd2e58797c9c8d229")
|
||||
叠影并入 = Animation_meta("叠影并入", True, 0.0, "7259634012774208059", "19101418", "8358578022cd14c6232a99ddee035824")
|
||||
向上弹入 = Animation_meta("向上弹入", True, 0.0, "7123116334677758501", "3704299", "28d9145ead32c23742082a37e511370e")
|
||||
向下溶解 = Animation_meta("向下溶解", True, 0.0, "7028458557058060831", "1644318", "09fde2de891d18c74949e025bc0dca07")
|
||||
向右模糊_II = Animation_meta("向右模糊 II", True, 0.0, "7254503374622560828", "17830700", "6b3c54ef781f16f20204d766b799abec")
|
||||
向左模糊 = Animation_meta("向左模糊", True, 0.0, "7112368349257929230", "3147126", "ee5716b5bf9ef16fd99dd7d2d89dbefc")
|
||||
吸入 = Animation_meta("吸入", True, 0.0, "7120438380453696031", "3576973", "42a0c7e42275986d92a2d3bbe55dd816")
|
||||
呐喊声波 = Animation_meta("呐喊声波", True, 0.0, "7199943069385364005", "9432429", "6f5992c1f47cac9d33468c5e60725d0b")
|
||||
喷绘 = Animation_meta("喷绘", True, 0.0, "7120131223036367367", "3563651", "77633d8638e177488dcce84086018c8a")
|
||||
圆柱体滚动 = Animation_meta("圆柱体滚动", True, 0.0, "7179035729043919397", "7548913", "7ce47010b9b736d12d264cf73f6c294e")
|
||||
圣诞帽弹跳 = Animation_meta("圣诞帽弹跳", True, 0.0, "7169419861158793759", "6492065", "e5de917f45c938a685b73a9e0bb464e1")
|
||||
圣诞树弹跳II= Animation_meta("圣诞树弹跳II", True, 0.0, "7174706243267727930", "7080877", "c9be0fbb72056234cdc5f8e082f32c40")
|
||||
弹入跳动 = Animation_meta("弹入跳动", True, 0.0, "7184797276181631546", "8058189", "18c035845489b1f6c9a4ffcaf0ec1145")
|
||||
弹性伸缩_II = Animation_meta("弹性伸缩 II", True, 0.0, "7308272646913790490", "32279178", "9b0bdc149bbc541e93cddaf94b1dcaa0")
|
||||
心动瞬间 = Animation_meta("心动瞬间", True, 0.0, "7332519885999706663", "44271866", "2438d9132c7b04552762ae54066f7d94")
|
||||
慢速放大 = Animation_meta("慢速放大", True, 0.0, "7205177922280231479", "10063675", "33d85f938bd55928fa16bede8cf7a26b")
|
||||
打字光标 = Animation_meta("打字光标", True, 0.0, "7237411357514011192", "14235878", "12196518b89652860631d196d19b6f45")
|
||||
抖动甩入 = Animation_meta("抖动甩入", True, 0.0, "7301945752278798885", "29825712", "8e49d8dde0112aaf071d41e8a56527e1")
|
||||
折叠 = Animation_meta("折叠", True, 0.0, "7125298122011447816", "3779439", "9f65c45595fa8c0002f7f49a61637ff2")
|
||||
描边填充 = Animation_meta("描边填充", True, 0.0, "7308269965453300262", "32278219", "cb8300f18fdf8b9aab7c1eacd33e92c9")
|
||||
放大震动 = Animation_meta("放大震动", True, 0.0, "7267849370727354936", "20801300", "e6f8542e114dcb8b7aea821b1c954941")
|
||||
故障闪动 = Animation_meta("故障闪动", True, 0.0, "7244101806710592057", "15261571", "f0c64727504b3975b4656ee2b10760fb")
|
||||
新年打字机 = Animation_meta("新年打字机", True, 0.0, "7272754730684650045", "21711818", "a5aa35ae2b69f85c944074dfeadd6c89")
|
||||
旋转缩放 = Animation_meta("旋转缩放", True, 0.0, "7243633588493619773", "15140845", "cef0ccebe3406f4c53b64f39825b7bfa")
|
||||
旋转飞入 = Animation_meta("旋转飞入", True, 0.0, "6775803763652301326", "1644274", "21984d5e90731f925fc58a59fef355ee")
|
||||
星光闪闪 = Animation_meta("星光闪闪", True, 0.0, "7309036302962266675", "32665781", "269e1b23d766c0a3c5c9f792dedfd1a9")
|
||||
星光闪闪_II = Animation_meta("星光闪闪 II", True, 0.0, "7319873264375829001", "38428077", "8cddcc9ff610948afbd705259cec8fa9")
|
||||
星星弹跳 = Animation_meta("星星弹跳", True, 0.0, "7307189517562155547", "31799385", "e5a1520dee5dd3700da60c62743111e4")
|
||||
模糊发光 = Animation_meta("模糊发光", True, 0.0, "7301535952101446170", "29690460", "ea9d91ad5b58f1f9a1e95264f77e9a15")
|
||||
模糊滚动 = Animation_meta("模糊滚动", True, 0.0, "7264501462187643450", "20154968", "3eaa7038a9148548a6b2cc6673f77944")
|
||||
模糊缩小 = Animation_meta("模糊缩小", True, 0.0, "7294147761765618186", "27144470", "203197cc1ea7d4e7dfb0f24bd256e9fd")
|
||||
汇聚 = Animation_meta("汇聚", True, 0.0, "6986931575199896094", "5529369", "2774ee332a759084eaa558bad0cb3a44")
|
||||
波浪弹跳 = Animation_meta("波浪弹跳", True, 0.0, "7317536986691015218", "37303562", "e5b79c83b4a12edb15d2389a83c51476")
|
||||
流光扩散 = Animation_meta("流光扩散", True, 0.0, "7314566361642963493", "35505526", "49e6ab3f128387addaba317fb98cbed3")
|
||||
滚入 = Animation_meta("滚入", True, 0.0, "7026674824537707038", "1644320", "d631585b87e866b31fe20fa8d578b7cd")
|
||||
激光雕刻 = Animation_meta("激光雕刻", True, 0.0, "7244102612700631589", "15261101", "affa14b4f89ceb4dd01a69a24b42651f")
|
||||
爱心弹跳 = Animation_meta("爱心弹跳", True, 0.0, "6845191009861636616", "1644337", "711434e690c1a1d7ebca4f13b1712f85")
|
||||
玩雪 = Animation_meta("玩雪", True, 0.0, "7304943429962699290", "30904546", "501ea62f0702ab65569aa0e923bd8182")
|
||||
环绕滑入 = Animation_meta("环绕滑入", True, 0.0, "7261858654561767973", "19562189", "672aae4e963ac36d9b898cb32c964995")
|
||||
生长_II = Animation_meta("生长 II", True, 0.0, "7210312869282320933", "10659499", "562300bfab6b00c4853118b058f429a2")
|
||||
电光 = Animation_meta("电光", True, 0.0, "7296051582246851109", "27769111", "04055d0e0520eb74c7047073e98fcf9a")
|
||||
电光_II = Animation_meta("电光 II", True, 0.0, "7299364098788037171", "28928614", "8c30a310e9ce5bf2b7b5a324c9426b7c")
|
||||
碰碰车 = Animation_meta("碰碰车", True, 0.0, "7338602211041088027", "47157536", "ce6822887e702ad1a4b762e267148e38")
|
||||
空翻 = Animation_meta("空翻", True, 0.0, "6865175746420150792", "1644306", "c16d544824d736ad0be1a5e109aafc04")
|
||||
缤纷冲屏 = Animation_meta("缤纷冲屏", True, 0.0, "7116829842271638053", "3894473", "f6b8859c215e255b61f70cdbcc239b98")
|
||||
缩放_III = Animation_meta("缩放 III", True, 0.0, "7211036012401660473", "10743073", "d625a4ef458b7e8c5928cdf04ab952ac")
|
||||
翻页II = Animation_meta("翻页II", True, 0.0, "7170343439832191519", "6599721", "69d372ee41a3c968e0a7b55382eb23ff")
|
||||
背景滑入 = Animation_meta("背景滑入", True, 0.0, "7306794354255860250", "31601883", "69c170b50c062f8106c01b37682fe19f")
|
||||
色散拖影 = Animation_meta("色散拖影", True, 0.0, "7340513927651922458", "48159236", "422b57c27cfd659d0756303189e11599")
|
||||
螺旋上升 = Animation_meta("螺旋上升", True, 0.0, "6799873891352187406", "1644278", "d3e255df67130866e0d2de42a703637c")
|
||||
跃进 = Animation_meta("跃进", True, 0.0, "7220685840442200634", "11996999", "40bdc1263417f53c712c54cb32438008")
|
||||
跳跳捣蛋鬼 = Animation_meta("跳跳捣蛋鬼", True, 0.0, "7200340219109839419", "9503089", "897a0c194e07ace6813a2eba797ac22f")
|
||||
跳跳糖 = Animation_meta("跳跳糖", True, 0.0, "7329815894933115432", "42866461", "c8ecf2f107002df92dcefec6ea988843")
|
||||
辉光 = Animation_meta("辉光", True, 0.0, "7258179345192063525", "18786330", "cf0046a1d95bfc038ff7982a5dff2abb")
|
||||
辉光扫描 = Animation_meta("辉光扫描", True, 0.0, "7316878401590006323", "36927710", "f9a2c9ae931b916a81f204a1b9c31f7c")
|
||||
逐字弹跳 = Animation_meta("逐字弹跳", True, 0.0, "7197615431673188921", "9195301", "52b151b0021d9fa91a42e65c2a392517")
|
||||
逐字旋入 = Animation_meta("逐字旋入", True, 0.0, "7229520427196879421", "13137035", "9838c6772ddbd48126f30baf74200f99")
|
||||
金粉飘落 = Animation_meta("金粉飘落", True, 0.0, "7330561002922054196", "43242964", "25d1da238cd78c05757f2d6036dec895")
|
||||
镂空跳入 = Animation_meta("镂空跳入", True, 0.0, "7311620091060163082", "33984693", "6acf25a6cbbe3f564b4ff1a8c666a10f")
|
||||
闪烁集合 = Animation_meta("闪烁集合", True, 0.0, "7267886380439573029", "20805754", "6d86be731c4d735a5e612a45b0c8631a")
|
||||
随机上升 = Animation_meta("随机上升", True, 0.0, "7233662263805088314", "13720553", "98142c53838b5a382f79cc2d89e30c04")
|
||||
随机弹跳_II = Animation_meta("随机弹跳 II", True, 0.0, "7114189305781686797", "3241034", "ff0761c602fa5ec8cc31c48ce57ea003")
|
||||
随机打字机 = Animation_meta("随机打字机", True, 0.0, "6926718978064650760", "1644317", "e1f7899554d34dfa3e1e4924f82acc69")
|
||||
随机落下 = Animation_meta("随机落下", True, 0.0, "7231443875406025275", "13416707", "a3aa7aa5991ef3c6a3d83a2e1fc6b748")
|
||||
随机集合 = Animation_meta("随机集合", True, 0.0, "7223959789175312954", "12416139", "4d1fa3b7aac9aeab107743db10372029")
|
||||
雪光模糊 = Animation_meta("雪光模糊", True, 0.0, "7314614905196253705", "35545508", "cb35d22175f67f734290b48bdaf93dd6")
|
||||
音符弹跳 = Animation_meta("音符弹跳", True, 0.0, "6841115718172283406", "1644336", "86c6e9061b14fd43049b6232ffc113fa")
|
||||
顶出 = Animation_meta("顶出", True, 0.0, "7268221856618910264", "20880936", "7fd6da0e6ff8a46276648dc43faa4f95")
|
||||
预览打字 = Animation_meta("预览打字", True, 0.0, "7268152375536259639", "20853726", "964a6cb51a01c0ddeb839010765023a6")
|
||||
飞入 = Animation_meta("飞入", True, 0.0, "7029231035007111710", "1644319", "9980148af0641a8501561320ec8f967b")
|
||||
鼠标点击 = Animation_meta("鼠标点击", True, 0.0, "7350128013637325353", "53149407", "1ba2fbaaeb30f7756ecd92e0121b7ac0")
|
||||
|
||||
class Text_outro(Effect_enum):
|
||||
"""文字出场动画, 默认时长为0.5秒"""
|
||||
|
||||
# 免费
|
||||
右上弹出 = Animation_meta("右上弹出", False, 0.0, "7076006676951732767", "1631524", "7b65a6e8a2ef7015dc780dec3524af60")
|
||||
右下擦除 = Animation_meta("右下擦除", False, 0.0, "7090146831836910110", "1729286", "5e99fcba0a90d5bde52a85e034469aea")
|
||||
向上擦除 = Animation_meta("向上擦除", False, 0.0, "6774625752794010115", "1644609", "d9b04e37f86d6b5cf456f396648e11d4")
|
||||
向上溶解 = Animation_meta("向上溶解", False, 0.0, "7026619708627489293", "1644655", "7422f3de89f894522a0b45f3f2196131")
|
||||
向上滑动 = Animation_meta("向上滑动", False, 0.0, "6763873533115240968", "1644605", "bbec5aa1ddf8df26276b99cfd9996d76")
|
||||
向下擦除 = Animation_meta("向下擦除", False, 0.0, "6774626081791021576", "1644610", "4dafd6a7cbde862044fcbc543ecd818a")
|
||||
向下滑动 = Animation_meta("向下滑动", False, 0.0, "6724919284893487619", "1644606", "4b1190ca81551d872f1d6b0e2ce5db2b")
|
||||
向右擦除 = Animation_meta("向右擦除", False, 0.0, "6783908820176343566", "1644615", "a48325fce55a7a419b351c8a9826c7a0")
|
||||
向右滑动 = Animation_meta("向右滑动", False, 0.0, "6724920744431587853", "1644614", "4026a211f18b0fc6ab9e10d09c8922ba")
|
||||
向右缓出 = Animation_meta("向右缓出", False, 0.0, "7023684632591733284", "1451688", "b64ac446b7d95831919258b5799c6b25")
|
||||
向左擦除 = Animation_meta("向左擦除", False, 0.0, "6774626748177846791", "1644608", "1160d9bcc8a158a65441bcfc9603bd00")
|
||||
向左滑动 = Animation_meta("向左滑动", False, 0.0, "6763873602476446221", "1644613", "a193ecedf73b2b27616ee7da4f599b9b")
|
||||
向左解散 = Animation_meta("向左解散", False, 0.0, "7083752251742753287", "1674332", "46b117e1d9fc552e574958fcde072a53")
|
||||
圆形扫描 = Animation_meta("圆形扫描", False, 0.0, "6840698265277567496", "1644617", "84c8a6772ba3199c3fdba0c171f0f2fc")
|
||||
居中打字 = Animation_meta("居中打字", False, 0.0, "7265222263174074937", "20304017", "39cf0ff875a8825a82377a11e8b89d6a")
|
||||
展开 = Animation_meta("展开", False, 0.0, "6779879836916650509", "1644599", "cc9805cb2f96e99eec6c0f1978b03f70")
|
||||
左上弹出 = Animation_meta("左上弹出", False, 0.0, "7078587337998864926", "1646758", "6cb5717740976cd9e65544d93bb8a8be")
|
||||
左移弹动 = Animation_meta("左移弹动", False, 0.0, "7313890212529050138", "35176386", "26cd4509db97923ac2fb11eca5947750")
|
||||
弹出 = Animation_meta("弹出", False, 0.0, "6887482090351235592", "1644648", "ee214499310cb2a55d2370534fd0c02b")
|
||||
弹弓 = Animation_meta("弹弓", False, 0.0, "6862897350478664200", "1644618", "45f66e1fa1a3b79968b3749275bab10c")
|
||||
弹性伸缩 = Animation_meta("弹性伸缩", False, 0.0, "6872642084977775118", "1644646", "f2882bcfc0abc3b0c53b39649a2c4224")
|
||||
弹簧 = Animation_meta("弹簧", False, 0.0, "6884154487246688776", "1644647", "15c4e6b0a27360bab5d6f5d421bbbe1e")
|
||||
打字机_I = Animation_meta("打字机 I", False, 0.0, "6763469696260903435", "1644611", "628234381485fb1dd576eeb48c85a091")
|
||||
打字机_II = Animation_meta("打字机 II", False, 0.0, "6763469767555682823", "1644612", "83076ce7cda24efdaca9731b112fb097")
|
||||
打字机_III = Animation_meta("打字机 III", False, 0.0, "6763469838368117256", "1644664", "3f77a87e46ee1b50cd0ac207809c4c24")
|
||||
扭曲模糊 = Animation_meta("扭曲模糊", False, 0.0, "7090122015603954189", "1729226", "2e58579b330dbccc4491c5f0a8cf4a8a")
|
||||
拖尾 = Animation_meta("拖尾", False, 0.0, "7244102819731477049", "15260277", "20d1992e9f7b67bedf1811c0811b1e5c")
|
||||
放大 = Animation_meta("放大", False, 0.0, "6724919767200698884", "1644603", "e818fb0699073a734ecead7c2768d827")
|
||||
放大_II = Animation_meta("放大 II", False, 0.0, "7042278078415901192", "1644666", "1d6882ba11b67fff13c98493bc644027")
|
||||
故障打字机 = Animation_meta("故障打字机", False, 0.0, "6870061326698287624", "1644643", "71a23656184bc8438f4fa22425192185")
|
||||
旋出 = Animation_meta("旋出", False, 0.0, "6763873732143354376", "1644604", "ffc35db86b29aee7a0a4342ea5ed059f")
|
||||
日落 = Animation_meta("日落", False, 0.0, "6779084194392838670", "1644607", "662eea25ba7d450d9a91febf43f22f7f")
|
||||
晕开 = Animation_meta("晕开", False, 0.0, "7090059095134179877", "1727994", "3f2770aa65e01746967c8289e193021b")
|
||||
模糊 = Animation_meta("模糊", False, 0.0, "6923094772907250189", "1644652", "72f73d5e9fd970ccee4918008b5a9d9a")
|
||||
水墨晕开 = Animation_meta("水墨晕开", False, 0.0, "7278296130432012857", "22734371", "2705529afbf57f101c042d3a96ca2795")
|
||||
水平翻转 = Animation_meta("水平翻转", False, 0.0, "7052633346936934942", "1644667", "8719853b159397ea64fc2102c61e52e4")
|
||||
波浪弹出 = Animation_meta("波浪弹出", False, 0.0, "6917178803521327630", "1644651", "c60021c62c10eab0aa4f408ed602405c")
|
||||
渐隐 = Animation_meta("渐隐", False, 0.0, "6724919382104871427", "1644600", "11004616098603d847593ce9ede05a62")
|
||||
溶解 = Animation_meta("溶解", False, 0.0, "6872642354898014728", "1644645", "46389f9f5f72e1b58020a0b8293a23b9")
|
||||
滑动下落 = Animation_meta("滑动下落", False, 0.0, "7270726693277405733", "21330850", "fa4aaf84b182425eed4e330ac03ecdbd")
|
||||
生长 = Animation_meta("生长", False, 0.0, "6869302139584254477", "1644642", "e6ae4e1fc5ade7bd8765ef6d918f5f6f")
|
||||
缩小 = Animation_meta("缩小", False, 0.0, "6724921351385125387", "1644602", "6c679c75b88d8c69335c9faefbcd635a")
|
||||
羽化向右擦除= Animation_meta("羽化向右擦除", False, 0.0, "6897085341811872270", "1644649", "9d4c77cbae673b97c629890c6687bc71")
|
||||
羽化向左擦除= Animation_meta("羽化向左擦除", False, 0.0, "6897085246206906893", "1644650", "865d4874f9e21f104881bd3f1f1e02fa")
|
||||
翻动 = Animation_meta("翻动", False, 0.0, "7308279288061497865", "32283993", "07d60e408004cba91944a6fbe3ec570d")
|
||||
躺下 = Animation_meta("躺下", False, 0.0, "7265288999470633509", "20324365", "dc012ae6bfd6482bb0e52d02328016c8")
|
||||
轻微放大 = Animation_meta("轻微放大", False, 0.0, "6763469915518145032", "1644601", "1e293df954586a261a11576481dd8454")
|
||||
闪动 = Animation_meta("闪动", False, 0.0, "7039245189638001183", "1644658", "6b16591d61fa6ee68eef9148dbf0aa31")
|
||||
闭幕 = Animation_meta("闭幕", False, 0.0, "6834511218552607239", "1644616", "02a28db581b74aac8547c2479cb219bc")
|
||||
随机弹跳 = Animation_meta("随机弹跳", False, 0.0, "7026617357300666893", "1644665", "c260caa85b16e7d471ddeb2015cdf3f3")
|
||||
随机飞出 = Animation_meta("随机飞出", False, 0.0, "6872642497013617159", "1644644", "d1292de2cfc57d0ca12fdbafb4e0bca2")
|
||||
|
||||
# 付费
|
||||
二段缩放 = Animation_meta("二段缩放", True, 0.0, "7238519014866031162", "14394793", "bc54fc23dff39b105104f5bb15043ff9")
|
||||
发光闪出 = Animation_meta("发光闪出", True, 0.0, "7308275717505028617", "32281161", "980fe827d603f3785e69854b6e5967a4")
|
||||
叠影并出 = Animation_meta("叠影并出", True, 0.0, "7259634082760364603", "19101496", "1cc4801fbe64f100872abd1d502ac121")
|
||||
向上飞出 = Animation_meta("向上飞出", True, 0.0, "7090139631861109278", "1730928", "3513093fd914fcccfa87cb98a410062e")
|
||||
向下弹出 = Animation_meta("向下弹出", True, 0.0, "7127158940151845390", "3859743", "751b7e005e3ec297f5d3d2c40664f585")
|
||||
向下翻转 = Animation_meta("向下翻转", True, 0.0, "7198395913948107301", "9282213", "860c71ba47b9cf749ac977cb437ae1a8")
|
||||
向左模糊 = Animation_meta("向左模糊", True, 0.0, "7112703727336690189", "3176752", "02ee1da62468714f7b17a671ee61acf0")
|
||||
向左模糊_II = Animation_meta("向左模糊 II", True, 0.0, "7254503584732025381", "17830676", "0374eb3b551fbd0d36c78d3105e6f976")
|
||||
吸出 = Animation_meta("吸出", True, 0.0, "7121986743141667358", "3647465", "27d43c1a8f3bb21f88f25fadfd74e113")
|
||||
喷绘 = Animation_meta("喷绘", True, 0.0, "7120131305303446029", "3563649", "a2efafd9407094f2706c38b5ea2867c0")
|
||||
复古打字机 = Animation_meta("复古打字机", True, 0.0, "7252619798108967484", "17250228", "7739c9b46eb8c9ed7105c7c5c859ea8d")
|
||||
弹出跳动 = Animation_meta("弹出跳动", True, 0.0, "7184797189627974200", "8058215", "dffb8966b47b6eae5fb9ef0e0fe6e6b9")
|
||||
弹性伸缩_II = Animation_meta("弹性伸缩 II", True, 0.0, "7308276711039177225", "32281815", "9b225f4fafa2341876eec98ba91c89ee")
|
||||
打字光标 = Animation_meta("打字光标", True, 0.0, "7237411511755346491", "14235852", "1285f4e58d3989468cc7c7679145e155")
|
||||
打字机IV = Animation_meta("打字机IV", True, 0.0, "7237411448303915557", "14235853", "3f2d4916f48390652f4abaff69742c0b")
|
||||
折叠 = Animation_meta("折叠", True, 0.0, "7124961998919438884", "3769517", "ccce629bcf7f98a8de4d4e1a2228d11a")
|
||||
描边填充 = Animation_meta("描边填充", True, 0.0, "7308273254127374874", "32279531", "9dc334dd67a2ace030c8d0f0d01ecede")
|
||||
收缩震动 = Animation_meta("收缩震动", True, 0.0, "7268214314022998588", "20877442", "c95da61de0632a74d061f03806a8ea9b")
|
||||
故障 = Animation_meta("故障", True, 0.0, "7091567288385540622", "1789138", "b106b2d684134a06b033aa2ba70baea2")
|
||||
故障闪动 = Animation_meta("故障闪动", True, 0.0, "7244102414377161276", "15261509", "ba766fab0ea8b838f1c64973aee2b54b")
|
||||
旋转缩放 = Animation_meta("旋转缩放", True, 0.0, "7243633648237285949", "15140857", "37af568e3f004232b19507b24d5438c1")
|
||||
旋转飞出 = Animation_meta("旋转飞出", True, 0.0, "6775804032318444045", "1644639", "802b2078b18d70ecd073ffacff59c1d8")
|
||||
模糊发光 = Animation_meta("模糊发光", True, 0.0, "7301536173959156274", "29690520", "a21891cf3eff128b2a5190cad5356d69")
|
||||
模糊滚动 = Animation_meta("模糊滚动", True, 0.0, "7264501549240422949", "20154980", "9c07a1d5d75f675d32f8917dc76f7381")
|
||||
波浪弹跳 = Animation_meta("波浪弹跳", True, 0.0, "7317637880799564297", "37396324", "17dc7c4e6498440fcafc56dfbe3fb4fe")
|
||||
消散 = Animation_meta("消散", True, 0.0, "7155790075794559525", "5323563", "21888446c8d15d56c60864985328652b")
|
||||
滚出 = Animation_meta("滚出", True, 0.0, "7023684709737566728", "1644656", "f25af0cdef9584d588584b3765350f64")
|
||||
激光雕刻 = Animation_meta("激光雕刻", True, 0.0, "7244102529573720635", "15261103", "bb0ab89c7396d11d5663b0071296f27d")
|
||||
炸开 = Animation_meta("炸开", True, 0.0, "7142816577971294734", "4577477", "15ced8e31e8d57f8932820fe99f96391")
|
||||
炸开_II = Animation_meta("炸开 II", True, 0.0, "7148309755121898015", "4834739", "bff4571b77bca8598b6ce8ba65d93252")
|
||||
炸开_Ⅲ = Animation_meta("炸开 Ⅲ", True, 0.0, "7308274161992864266", "32280237", "0060b15237436dc553a3a050825d18a6")
|
||||
环绕滑出 = Animation_meta("环绕滑出", True, 0.0, "7261858590808347193", "19562193", "c88f30f314faade1a6e71884234a380b")
|
||||
甩回 = Animation_meta("甩回", True, 0.0, "7244102747698500156", "15261069", "0203e194e3bcf10f7f96fde73dc350f3")
|
||||
空翻 = Animation_meta("空翻", True, 0.0, "6865176065514410503", "1644641", "f578720479df7746fa067199a1e4ea8b")
|
||||
螺旋下降 = Animation_meta("螺旋下降", True, 0.0, "6799874105710481927", "1644640", "e6e1a2239d894b408e41341a6ca578ca")
|
||||
逐字旋出 = Animation_meta("逐字旋出", True, 0.0, "7229520513586958908", "13137113", "3df3f26182ac9c6359be95dfb443d5da")
|
||||
逐字旋转 = Animation_meta("逐字旋转", True, 0.0, "7112021029085516319", "3129838", "ee29d8b9e06a471972f36734c53dbea8")
|
||||
逐字翻转 = Animation_meta("逐字翻转", True, 0.0, "7112274846326723086", "3139394", "ffc81a4b0c44427fbfd60984f7ddcdc2")
|
||||
逐字虚影 = Animation_meta("逐字虚影", True, 0.0, "7034717113130422791", "1644657", "fe2cfbc08c330517caa8b602187ced07")
|
||||
镂空跳出 = Animation_meta("镂空跳出", True, 0.0, "7312331703903588902", "34383204", "f1bb60aeec2ee712e813b3cab75050bc")
|
||||
闪烁散开 = Animation_meta("闪烁散开", True, 0.0, "7268169968204649020", "20860262", "b58f8939e94946a70c35188819a65a78")
|
||||
随机弹跳_II = Animation_meta("随机弹跳 II", True, 0.0, "7114191629346411016", "3241116", "0f0b492622513301a7cd8f30b035a056")
|
||||
随机打字机 = Animation_meta("随机打字机", True, 0.0, "6926719087158497806", "1644653", "9db48fc9916b5b8554ce7262bb90f18f")
|
||||
顶出 = Animation_meta("顶出", True, 0.0, "7268231069768356408", "20882164", "98ad0ec3b5980352e4709158def77960")
|
||||
预览打字 = Animation_meta("预览打字", True, 0.0, "7268216065337856572", "20878188", "360d883bb43dab551defd1e94b9730d6")
|
||||
飞出 = Animation_meta("飞出", True, 0.0, "7029522072724312612", "1644654", "324c695abdd43e1ec3506364fce0a087")
|
||||
|
||||
class Text_loop_anim(Effect_enum):
|
||||
"""文字循环动画
|
||||
|
||||
由于重名而仅保留了其中一项的动画: 心跳, 流光
|
||||
"""
|
||||
|
||||
# 免费
|
||||
VHS = Animation_meta("VHS", False, 0.0, "7399879467457319463", "77851352", "f82d0f25b2cc4f0696dce7d97c7b02be")
|
||||
上弧 = Animation_meta("上弧", False, 0.0, "7075224569421763079", "1626238", "a0362ebaa2f5016487abfab05d47605b")
|
||||
刷屏 = Animation_meta("刷屏", False, 0.0, "7308280358691148315", "32284703", "e92c576feca5efb75feda14004b269c5")
|
||||
发光模糊多行= Animation_meta("发光模糊多行", False, 0.0, "7397688001356108339", "77132594", "ee68176782c8b62a207c04f4a979957a")
|
||||
吹泡泡 = Animation_meta("吹泡泡", False, 0.0, "7045155566003425823", "1644539", "6db3746838af18903d01968e6af07185")
|
||||
吹泡泡_II = Animation_meta("吹泡泡 II", False, 0.0, "7052257626897256968", "1644528", "b378734fd7a0e8ec78e53987823fad79")
|
||||
呐喊 = Animation_meta("呐喊", False, 0.0, "7119024816480326157", "4002167", "04933b5e575c54cbf09c57c5e933f0ec")
|
||||
复古涂鸦 = Animation_meta("复古涂鸦", False, 0.0, "7400234025392017956", "77997810", "4bc57fba68e0cce14e2ea8ab652dabc2")
|
||||
字体变换 = Animation_meta("字体变换", False, 0.0, "7402185694732358170", "78763194", "06c685c00a9c1a7a484c7841ac45742a")
|
||||
弹幕滚动 = Animation_meta("弹幕滚动", False, 0.0, "6790247082155315719", "1644518", "4ca7b3a27da98849561b21c9c6d964fc")
|
||||
彩虹 = Animation_meta("彩虹", False, 0.0, "6908592625406710280", "990096", "fac0ebef55c57c31b3142f5840299b03")
|
||||
彩虹_情人节 = Animation_meta("彩虹-情人节", False, 0.0, "6916820108211917325", "1012617", "c45282c8e30b8639a71345769060f3d5")
|
||||
彩虹_新年 = Animation_meta("彩虹-新年", False, 0.0, "6916820045519655432", "1012618", "dd9fcbbcfc17cad31ab42e886769c66e")
|
||||
彩虹_马卡龙 = Animation_meta("彩虹-马卡龙", False, 0.0, "6921528300573561358", "1022790", "a614b3dd7d4b852f1a126afe4c5ee50f")
|
||||
扫光 = Animation_meta("扫光", False, 0.0, "7051843475892867598", "1520868", "0495742cdb3a26ff28dfabf7f8ef236b")
|
||||
投影颤抖_II = Animation_meta("投影颤抖 II", False, 0.0, "7070332370963927559", "1599696", "673aa54d5519360162ea8ec38986ea1c")
|
||||
折叠 = Animation_meta("折叠", False, 0.0, "7064823078542381581", "1567212", "c9b3ef10e455a3916dbef47a7f711eaa")
|
||||
拼贴纹理 = Animation_meta("拼贴纹理", False, 0.0, "7399983060806013479", "77918388", "922ca4e87c7eed7e60d062c18e928bc6")
|
||||
描边粉笔 = Animation_meta("描边粉笔", False, 0.0, "7399879712140431883", "77851433", "05c3c10997b885c71ed0dd64aff14dd2")
|
||||
摇摆 = Animation_meta("摇摆", False, 0.0, "6724920869363126795", "1644515", "8af4da60a802e3ca6c9fe2184fbe22d0")
|
||||
摇荡 = Animation_meta("摇荡", False, 0.0, "6840710593289130503", "1644523", "61f24344eb8bf86582d6140ad985ef14")
|
||||
故障闪动 = Animation_meta("故障闪动", False, 0.0, "6857714281136263687", "1644524", "51d9ee83fbaf2dfa049885676ec2d5d9")
|
||||
旋转 = Animation_meta("旋转", False, 0.0, "6763900973946507784", "1644510", "151421d4de4d49e65b050cb413482cd5")
|
||||
晃动 = Animation_meta("晃动", False, 0.0, "6790246693674684942", "1644520", "383dabd75d7fe7985d990ebb34d63732")
|
||||
波纹 = Animation_meta("波纹", False, 0.0, "7275663372148806203", "22223033", "929efca6bd35df0718dadf77836cfba7")
|
||||
爆闪 = Animation_meta("爆闪", False, 0.0, "7308279705252139530", "32284413", "61951bd303975761bc99f187bdb8fdab")
|
||||
环绕 = Animation_meta("环绕", False, 0.0, "6980916124976157220", "1644542", "0d14427906b240809f0d9838f35cf95c")
|
||||
翻转 = Animation_meta("翻转", False, 0.0, "6763897586328801805", "1644511", "e4983ce92d02628087780832ef631c7d")
|
||||
色差故障 = Animation_meta("色差故障", False, 0.0, "6835878163575214605", "1644522", "e0295a9f4f19fe21692c405f7c00d1e5")
|
||||
蓝黄滑动 = Animation_meta("蓝黄滑动", False, 0.0, "7398492769628459539", "77383265", "bb717e125d34532ec904d1bc01ec25da")
|
||||
超强晃动 = Animation_meta("超强晃动", False, 0.0, "7065208406633615909", "1568854", "b129b0e6bed4f9835f871848db646763")
|
||||
超强晃动_II = Animation_meta("超强晃动 II", False, 0.0, "7069965879437431303", "1597286", "2b8adf8a719de3e0bcfa10569d364a81")
|
||||
超强波浪 = Animation_meta("超强波浪", False, 0.0, "6857036499389518349", "872098", "87f7332abda9ac46d5dc81f69c48daab")
|
||||
超强波浪_II = Animation_meta("超强波浪 II", False, 0.0, "7065219379687854623", "1568964", "bdd007527d0eda9d64bfbf6aef103e97")
|
||||
跳动 = Animation_meta("跳动", False, 0.0, "6724920002958332420", "1644512", "784250e657b472a46a3b3ce0a838e4f7")
|
||||
轻微跳动 = Animation_meta("轻微跳动", False, 0.0, "6884155832838132231", "1644525", "ac5c4160fae860fd74e5b7ab6d053252")
|
||||
钟摆 = Animation_meta("钟摆", False, 0.0, "6724921579517514248", "1644516", "320b71150105629f7ab1b318716181eb")
|
||||
闪烁 = Animation_meta("闪烁", False, 0.0, "6724921437930394120", "1644514", "6fe3f0fcd14e11e70b7510f42444b86c")
|
||||
雨刷 = Animation_meta("雨刷", False, 0.0, "6799874389669057037", "1644521", "6a4c40e24db5027cb42892d8ade9df38")
|
||||
频闪边框 = Animation_meta("频闪边框", False, 0.0, "7308280718302384690", "32284883", "36184bd37eae10c2d8247fb5bd59c6f2")
|
||||
颤抖 = Animation_meta("颤抖", False, 0.0, "6764189482871689742", "1644509", "82a2b88dc69ce9f9a36f975968649d5b")
|
||||
颤抖_III = Animation_meta("颤抖 III", False, 0.0, "7070036604429013535", "1598082", "c6f744d4c3d208abf97a3af3afe9d356")
|
||||
|
||||
# 付费
|
||||
喷涌 = Animation_meta("喷涌", True, 0.0, "7134190113780666887", "4175399", "76cc53a7bb20385d208c858a13cf06fd")
|
||||
喷绘 = Animation_meta("喷绘", True, 0.0, "7110160318529016350", "2999942", "fbd35399a1880d2637731d20eb619d29")
|
||||
圆形涂鸦 = Animation_meta("圆形涂鸦", True, 0.0, "7276420462131810874", "22362181", "696d3b443b4c6ed8b9f0f28825c08a8c")
|
||||
声波震动 = Animation_meta("声波震动", True, 0.0, "7239526343833031223", "14518651", "9098085cd316045cf912e54a73d845a4")
|
||||
字幕滚动 = Animation_meta("字幕滚动", True, 0.0, "6790246884683289102", "1644519", "9aa4e0d045c61892c2b2e3fdfaf1b093")
|
||||
尾巴摇摆 = Animation_meta("尾巴摇摆", True, 0.0, "7212897307782550053", "10967121", "c1585ff28130b111d0458c6490d20ef2")
|
||||
弹幕 = Animation_meta("弹幕", True, 0.0, "7107592133472686606", "2795622", "8d0a44c1f51ea9cd7a8174f72751d2b7")
|
||||
弹幕_II = Animation_meta("弹幕 II", True, 0.0, "7096375845773644318", "1826548", "11bcd8965488f2c70e27c8dc5112c6cb")
|
||||
强调三遍 = Animation_meta("强调三遍", True, 0.0, "7129767866894651917", "3966601", "e008ee1c0ba1e9beb3fb5bb84b4c0643")
|
||||
彩色切换 = Animation_meta("彩色切换", True, 0.0, "7303430211519910451", "30322872", "e2c7f4ec20555abe1e50c1920e81a0f9")
|
||||
彩色火焰 = Animation_meta("彩色火焰", True, 0.0, "7308278472541999654", "32283417", "94dd9722a4b46d248c5e1d3d4b7c71fb")
|
||||
影像叠加 = Animation_meta("影像叠加", True, 0.0, "7193989785319379515", "8882439", "018a39f66ba7ceb39f4d61e4446624f8")
|
||||
# 心跳 = Animation_meta("心跳", True, 0.0, "6724919955654971918", "1644513", "1b9a454256f041c19f723ba27358740b")
|
||||
心跳 = Animation_meta("心跳", True, 0.0, "7210283971316290085", "10650869", "3c2c6a7f6b8b102e9ae5f918600f83c0")
|
||||
急了 = Animation_meta("急了", True, 0.0, "7134634461588623909", "4200435", "4f01b8c42b2d4a26a89aa528e6cc1544")
|
||||
悸动 = Animation_meta("悸动", True, 0.0, "7229526981807706680", "13139395", "dc1aa28b54954465640c40928fae55f7")
|
||||
情绪加载 = Animation_meta("情绪加载", True, 0.0, "7130142075995034119", "3983735", "6293429c9f4e12407d38089ee43b77cd")
|
||||
扩音器 = Animation_meta("扩音器", True, 0.0, "7277870806552547895", "22619881", "ba24954b91039982fabf75ad533e7ff1")
|
||||
扭动 = Animation_meta("扭动", True, 0.0, "7123093247672455711", "3733565", "5380b570671074788541d13e389daa4f")
|
||||
投影颤抖 = Animation_meta("投影颤抖", True, 0.0, "7070332284934558245", "1599698", "4f4bebc9ab74f05801dca7b9b2ffa047")
|
||||
抖动故障 = Animation_meta("抖动故障", True, 0.0, "7283103017526628921", "23998441", "55749de55fe55fc230a31952790142f3")
|
||||
拉住 = Animation_meta("拉住", True, 0.0, "7221747595884892731", "12135594", "98db2339ea77225948ed8b7f8d72fc36")
|
||||
拉开 = Animation_meta("拉开", True, 0.0, "7223675733606928957", "12390761", "41f672adaa1cdccdb81c8d0b2b1124a4")
|
||||
排队入场 = Animation_meta("排队入场", True, 0.0, "7225496399817740855", "12628547", "0a7a9cb49305092f638d65888f149348")
|
||||
摇摆_I = Animation_meta("摇摆 I", True, 0.0, "6908281696253121038", "1520478", "ea2f688a517d18a9de5912fa09f3bd56")
|
||||
放大缩小 = Animation_meta("放大缩小", True, 0.0, "7224077152587616805", "12453543", "3e1538ad9a9f723238bb922423e20aed")
|
||||
放大镜 = Animation_meta("放大镜", True, 0.0, "7272339163142165050", "21635790", "e9f8437306ec0f948c1eb485f09692a3")
|
||||
文字泛光 = Animation_meta("文字泛光", True, 0.0, "7124226995231134239", "3740251", "879231435782ed4b72f278290070f20a")
|
||||
波浪 = Animation_meta("波浪", True, 0.0, "6724927688047333891", "1644517", "176a075543ef82c04df1dd40d181ac5b")
|
||||
波浪_II = Animation_meta("波浪 II", True, 0.0, "7067046171381862919", "1576246", "62245c9799544b75258689eb1ff222bb")
|
||||
波浪_III = Animation_meta("波浪 III", True, 0.0, "7067812686557352456", "1583302", "8eecb90b305442a4568e2e9ff7151735")
|
||||
# 流光 = Animation_meta("流光", True, 0.0, "7308277700492268042", "32283005", "810cca793722d3736730aadf62d77301")
|
||||
流光 = Animation_meta("流光", True, 0.0, "7181754919827804728", "7776353", "16711992a6719a5c798f8fb138550229")
|
||||
涂鸦手绘 = Animation_meta("涂鸦手绘", True, 0.0, "7276407256965452346", "22361305", "1ae8ceff3f65dd62f36b3eb43baff6b4")
|
||||
涂鸦手绘_II = Animation_meta("涂鸦手绘 II", True, 0.0, "7276407576625943100", "22361304", "f72282b1f43b0d5e59144bbca7fbeda8")
|
||||
渐变拖尾 = Animation_meta("渐变拖尾", True, 0.0, "7308277117622424090", "32282151", "950687cffad02a7b17bc9b672c9585f2")
|
||||
漂浮 = Animation_meta("漂浮", True, 0.0, "7213291988500615738", "11017729", "451fbb332b33ec6ba683dc9d22055810")
|
||||
漩涡 = Animation_meta("漩涡", True, 0.0, "7099419657290912286", "1936778", "416be3d42ae0d037597209d2a2f843c4")
|
||||
环形滚动 = Animation_meta("环形滚动", True, 0.0, "7179135028343870012", "7564487", "e167e03db93ab98c4917ff53f59162c1")
|
||||
环绕_II = Animation_meta("环绕 II", True, 0.0, "7114181846086193701", "3240866", "6df622ca3b91909a8d23ae24f1c2a675")
|
||||
甜甜圈 = Animation_meta("甜甜圈", True, 0.0, "7070415354656199181", "1600378", "23a8cee8851ad7e169a094cee8ca9513")
|
||||
福袋炸开 = Animation_meta("福袋炸开", True, 0.0, "7047088638932292127", "1531460", "2646a21f26faeb4103acacaa74c171f6")
|
||||
空间翻转_I = Animation_meta("空间翻转 I", True, 0.0, "7163896186972148261", "5965291", "24cd6c57edb2d457135c7c24a2b79a02")
|
||||
空间翻转_II = Animation_meta("空间翻转 II", True, 0.0, "7163901901589713444", "5966503", "ce769779dfa1d9c69eb593318bf1bc28")
|
||||
空间翻转_III= Animation_meta("空间翻转 III", True, 0.0, "7163892769176424991", "5964737", "f9c82b94ebd990e6734ddef5ebba68cb")
|
||||
翻页I = Animation_meta("翻页I", True, 0.0, "7168819879183651359", "6443365", "8e4559d96b415b5c1ec0748b8a138f4e")
|
||||
调皮 = Animation_meta("调皮", True, 0.0, "6917143282690560526", "1644527", "b832fcbb8ea3bcc64ddbd70c56166956")
|
||||
逐字放大 = Animation_meta("逐字放大", True, 0.0, "6908592686781960717", "1644526", "4cd5a5c4144a3a713469043722579306")
|
||||
错位 = Animation_meta("错位", True, 0.0, "7243633488249754173", "15140783", "cc869e81ac3b5d769afa6836bab5937b")
|
||||
随机弹跳 = Animation_meta("随机弹跳", True, 0.0, "7045150354672980516", "1644538", "8656e9848f862adf1adfa30c26113a80")
|
||||
颤抖_II = Animation_meta("颤抖 II", True, 0.0, "6986920909927879199", "1446098", "8d180f0ad5ff173a44f9142baeee536c")
|
||||
飘起 = Animation_meta("飘起", True, 0.0, "7211060597352305189", "10749797", "1ab6d9a8761c108da6989633b933647e")
|
||||
367
pyJianYingDraft/metadata/audio_effect_meta.py
Normal file
367
pyJianYingDraft/metadata/audio_effect_meta.py
Normal file
@@ -0,0 +1,367 @@
|
||||
from .effect_meta import Effect_enum
|
||||
from .effect_meta import Effect_meta, Effect_param
|
||||
|
||||
class Tone_effect_type(Effect_enum):
|
||||
"""剪映自带的音频“音色”效果类型"""
|
||||
|
||||
# 免费
|
||||
台湾小哥 = Effect_meta("台湾小哥", False, "7255565276819755576", "18149602", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
圣诞精灵 = Effect_meta("圣诞精灵", False, "7310059412062736946", "33214695", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
圣诞老人 = Effect_meta("圣诞老人", False, "7310059178133819930", "33214489", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
广告男声 = Effect_meta("广告男声", False, "7328088579811316263", "42060748", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
港普男声 = Effect_meta("港普男声", False, "7328087687548637732", "42060743", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
老婆婆 = Effect_meta("老婆婆", False, "7328089253114548799", "42060746", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
解说小帅 = Effect_meta("解说小帅", False, "7332473259369173540", "44254166", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
大叔 = Effect_meta("大叔", False, "7020344898033291790", "2672760", "2509bbd71e127b04a29f52a54e82c53c", [
|
||||
Effect_param("音调", 0.834, 0.000, 1.000),
|
||||
Effect_param("音色", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 音调: 默认0.83, 0.00 ~ 1.00
|
||||
- 音色: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
女生 = Effect_meta("女生", False, "7020345715901600270", "2672757", "0ce1aade5958506c97bffea150772b6e", [
|
||||
Effect_param("音调", 0.834, 0.000, 1.000),
|
||||
Effect_param("音色", 0.334, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 音调: 默认0.83, 0.00 ~ 1.00
|
||||
- 音色: 默认0.33, 0.00 ~ 1.00
|
||||
"""
|
||||
怪物 = Effect_meta("怪物", False, "7020344978794615327", "2672759", "2130ffa21e5980196e014ec0baade179", [
|
||||
Effect_param("音调", 0.650, 0.000, 1.000),
|
||||
Effect_param("音色", 0.780, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 音调: 默认0.65, 0.00 ~ 1.00
|
||||
- 音色: 默认0.78, 0.00 ~ 1.00
|
||||
"""
|
||||
机器人 = Effect_meta("机器人", False, "7018011705414259213", "2672750", "4b87db25aecd2f6f71927930110c4a1e", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
男生 = Effect_meta("男生", False, "7020345085233467917", "2672758", "ffd7a609207fd849efc9f63bf31697b1", [
|
||||
Effect_param("音调", 0.375, 0.000, 1.000),
|
||||
Effect_param("音色", 0.250, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 音调: 默认0.38, 0.00 ~ 1.00
|
||||
- 音色: 默认0.25, 0.00 ~ 1.00
|
||||
"""
|
||||
花栗鼠 = Effect_meta("花栗鼠", False, "7018011553081332231", "2672752", "e30b1922b8300423f21f9f84eff41ced", [
|
||||
Effect_param("音调", 0.500, 0.000, 1.000),
|
||||
Effect_param("音色", 0.500, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 音调: 默认0.50, 0.00 ~ 1.00
|
||||
- 音色: 默认0.50, 0.00 ~ 1.00
|
||||
"""
|
||||
萝莉 = Effect_meta("萝莉", False, "7020345789599715848", "2672756", "00b7ed2ccfe4d6076f78c8d751347a53", [
|
||||
Effect_param("音调", 0.750, 0.000, 1.000),
|
||||
Effect_param("音色", 0.600, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 音调: 默认0.75, 0.00 ~ 1.00
|
||||
- 音色: 默认0.60, 0.00 ~ 1.00
|
||||
"""
|
||||
|
||||
|
||||
# 付费
|
||||
TVB女声 = Effect_meta("TVB女声", True, "7260024060417937978", "19186454", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
东厂公公 = Effect_meta("东厂公公", True, "7328092524612948491", "42060742", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
云龙哥 = Effect_meta("云龙哥", True, "7376558114830553612", "68856989", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
侠客 = Effect_meta("侠客", True, "7328089134331859468", "42060738", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
做作夹子音 = Effect_meta("做作夹子音", True, "7367676929496846911", "63231108", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
八戒 = Effect_meta("八戒", True, "7265891792766112314", "20427371", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
军事解说 = Effect_meta("军事解说", True, "7328092289480266252", "42060734", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
动漫小新 = Effect_meta("动漫小新", True, "7360901047662940708", "58979441", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
动漫海绵 = Effect_meta("动漫海绵", True, "7367676859883983379", "63231109", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
咆哮哥 = Effect_meta("咆哮哥", True, "7332473122605503039", "44254278", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
商务殷语 = Effect_meta("商务殷语", True, "7328085477267870249", "42060747", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
四郎 = Effect_meta("四郎", True, "7250403044414722621", "16627073", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
太白 = Effect_meta("太白", True, "7328091247308968484", "42060736", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
如来佛祖 = Effect_meta("如来佛祖", True, "7376558174049931830", "68856990", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
姜饼人 = Effect_meta("姜饼人", True, "7310059267384414747", "33214539", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
容嬷嬷 = Effect_meta("容嬷嬷", True, "7332472945366798860", "44254320", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
小孩 = Effect_meta("小孩", True, "7262648951948448315", "19716244", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
强势妹 = Effect_meta("强势妹", True, "7328091624427229759", "42060740", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
快板 = Effect_meta("快板", True, "7328088454183522827", "42060741", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
恐怖电影 = Effect_meta("恐怖电影", True, "7325710953247412787", "40932465", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
悬疑解说 = Effect_meta("悬疑解说", True, "7325711304390349362", "40932811", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
懒小羊 = Effect_meta("懒小羊", True, "7332473035116515859", "44254304", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
搞笑解说 = Effect_meta("搞笑解说", True, "7262648842238038584", "19716150", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
文艺女声 = Effect_meta("文艺女声", True, "7379565719991620132", "70562787", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
樱桃丸子 = Effect_meta("樱桃丸子", True, "7325709643332719113", "40931609", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
樱花小哥 = Effect_meta("樱花小哥", True, "7328091741678998055", "42060735", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
武则天 = Effect_meta("武则天", True, "7328088300474864167", "42060744", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
沉稳解说 = Effect_meta("沉稳解说", True, "7367676791164506636", "63231110", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
温柔姐姐 = Effect_meta("温柔姐姐", True, "7379565769190806079", "70562785", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
熊二 = Effect_meta("熊二", True, "7250403222798471740", "16627311", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
猴哥 = Effect_meta("猴哥", True, "7236944659547689531", "14477015", "4f6a1fbc0000e178c724d355efea1d9f", [])
|
||||
甜美悦悦 = Effect_meta("甜美悦悦", True, "7325710673978069530", "40932253", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
生活小妙招 = Effect_meta("生活小妙招", True, "7328092409525441065", "42060737", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
电竞解说 = Effect_meta("电竞解说", True, "7325711893551649330", "40933559", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
电视广告 = Effect_meta("电视广告", True, "7360901109667336743", "58979440", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
紫薇 = Effect_meta("紫薇", True, "7281175506391667257", "23475307", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
舌尖解说 = Effect_meta("舌尖解说", True, "7328091500753982015", "42060739", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
蜡笔小妮 = Effect_meta("蜡笔小妮", True, "7379565670398169619", "70562786", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
语音助手 = Effect_meta("语音助手", True, "7325710335455793714", "40931973", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
那姐 = Effect_meta("那姐", True, "7369177370873303587", "64206631", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
锤子哥 = Effect_meta("锤子哥", True, "7328091348098093580", "42060745", "f554735f65a98cc4da17a1c53ef6a886", [])
|
||||
顾姐 = Effect_meta("顾姐", True, "7250403134923608631", "16627197", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
黛玉 = Effect_meta("黛玉", True, "7255565592093004343", "18149634", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
|
||||
class Audio_scene_effect_type(Effect_enum):
|
||||
"""剪映自带的音频“场景音”效果类型"""
|
||||
|
||||
# 免费
|
||||
_8bit = Effect_meta("8bit", False, "7161319747584266766", "5723961", "8d24238329ea5c250e33ae241d5adae2", [
|
||||
Effect_param("change_voice_param_pitch_shift", 0.500, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 1.000, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch_shift: 默认0.50, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认1.00, 0.00 ~ 1.00
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
低保真 = Effect_meta("低保真", False, "7024390914537689614", "2672762", "7ddbd39a691a66a021f684cab756a89a", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
合成器 = Effect_meta("合成器", False, "7018011500577034759", "2672753", "394efea5922637bcd8288e0fb3c2372e", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
回音 = Effect_meta("回音", False, "7018011608408396325", "5723901", "5377f66109693f2d473df5ea6ec8f791", [
|
||||
Effect_param("change_voice_param_quantity", 0.800, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_strength", 0.762, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_quantity: 默认0.80, 0.00 ~ 1.00
|
||||
- change_voice_param_strength: 默认0.76, 0.00 ~ 1.00
|
||||
"""
|
||||
扩音器 = Effect_meta("扩音器", False, "7018011975514853924", "2672749", "13169f6ab9957ff005d316239bef0045", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
水下 = Effect_meta("水下", False, "7106404450444513806", "2673077", "53956694a8b68b2855faa2adc043b5b1", [
|
||||
Effect_param("深度", 0.500, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 深度: 默认0.50, 0.00 ~ 1.00
|
||||
"""
|
||||
没电了 = Effect_meta("没电了", False, "7018012193769656845", "2672747", "87f91614bac060840ad5a57ef2b0c9ca", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
环绕音 = Effect_meta("环绕音", False, "7161319847819743780", "5723960", "fa9a4cb20d3488bf79e176571d5841f5", [
|
||||
Effect_param("change_voice_param_center_position", 0.500, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_surrounding_frequency", 0.500, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_center_position: 默认0.50, 0.00 ~ 1.00
|
||||
- change_voice_param_surrounding_frequency: 默认0.50, 0.00 ~ 1.00
|
||||
"""
|
||||
电音 = Effect_meta("电音", False, "7018011438379700773", "2672754", "d893a319d5175d9f09f70ddef1f79980", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
颤音 = Effect_meta("颤音", False, "7018011370289369637", "2672755", "c5e4874f83337e1cb9f8322fb843c901", [
|
||||
Effect_param("频率", 0.714, 0.000, 1.000),
|
||||
Effect_param("幅度", 0.905, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 频率: 默认0.71, 0.00 ~ 1.00
|
||||
- 幅度: 默认0.91, 0.00 ~ 1.00
|
||||
"""
|
||||
麦霸 = Effect_meta("麦霸", False, "7018012141332468260", "2672748", "3eedef5ef82b32912203a1f4fb901182", [
|
||||
Effect_param("空间大小", 0.052, 0.000, 1.000),
|
||||
Effect_param("强弱", 0.450, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 空间大小: 默认0.05, 0.00 ~ 1.00
|
||||
- 强弱: 默认0.45, 0.00 ~ 1.00
|
||||
"""
|
||||
黑胶 = Effect_meta("黑胶", False, "7024391411764040205", "2672761", "59e61d687a0f612bfae43bccf770f090", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000),
|
||||
Effect_param("噪点", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
- 噪点: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
|
||||
# 付费
|
||||
_3d环绕音 = Effect_meta("3d环绕音", True, "7350214888242811455", "53187169", "577c3d8e5312012b1d98ba5fc0b206d0", [
|
||||
Effect_param("强度", 0.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认0.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Autotune = Effect_meta("Autotune", True, "7360900806851170828", "58979352", "1477f4ca8307e2fa4ee2243d98d8b837", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
下雨 = Effect_meta("下雨", True, "7375069649446113804", "68076030", "83bb223637d5368384c47e3d2b061b62", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
乡村大喇叭 = Effect_meta("乡村大喇叭", True, "7282691036197950009", "23897651", "c996243ac50d235f00e5931e5ecadc52", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
人声增强 = Effect_meta("人声增强", True, "7106404399756349983", "2673078", "626f988dbd2cbd17acaa24d08451e314", [
|
||||
Effect_param("强弱", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
低音增强 = Effect_meta("低音增强", True, "7106404304247853604", "2673080", "e7c09c96d10c163269fc4e35c1f4b1ee", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
停车场 = Effect_meta("停车场", True, "7372150242524795446", "66413024", "d2dd515293081a8573485159db5a71e0", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
冰川之下 = Effect_meta("冰川之下", True, "7375068986829967883", "68076029", "6b9cda93f6d75b9a3b19b2e8eb6ad40f", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
刮风 = Effect_meta("刮风", True, "7375069247275274771", "68076028", "8600891882159f364d8c53e4f703cff4", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
噪音混响 = Effect_meta("噪音混响", True, "7382844688987853349", "72110975", "3b3b09b530b0a64666f1c5b6d20d4018", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
地狱 = Effect_meta("地狱", True, "7375069113988682281", "68076027", "5ec03c41ada16530949daa4106c85a90", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
复古收音机 = Effect_meta("复古收音机", True, "7350215379714576907", "53187166", "301d642d131aabff7ea8c3b717b36a79", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
失真电子 = Effect_meta("失真电子", True, "7350215296801575443", "53187167", "a1c00df42076ed1bd6a81f2d30b94566", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
对讲机 = Effect_meta("对讲机", True, "7350214704284832275", "53187168", "016dbdb3c786896c92bb936ece11acf6", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
房间 = Effect_meta("房间", True, "7282691385872880165", "23880629", "639f5c0c6b20418aaeb0e144da21151c", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
捂嘴 = Effect_meta("捂嘴", True, "7372405649684042292", "66552320", "9f9a8270c0005a480547d6ddf2a9293a", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
教堂 = Effect_meta("教堂", True, "7282691146759803429", "23882063", "96dc71756d0025e96a504b42d988b2ac", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
教室 = Effect_meta("教室", True, "7282687783833965113", "23897703", "678c14a6f63f75e03daa062a254081f7", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
机器人2 = Effect_meta("机器人2", True, "7372150541738054156", "66413023", "952f3feddf3555939adbbfd1c1869474", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
沙漠 = Effect_meta("沙漠", True, "7375069515530375691", "68076025", "099c935428943c9c3662b15b35b1ee36", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
派对 = Effect_meta("派对", True, "7381685442795541042", "71718513", "723386ab87f938779a3369436234d903", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
深海回声 = Effect_meta("深海回声", True, "7350215168413929995", "53187172", "37a16a2dc77540b7d70fe301e482d4f2", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
电话 = Effect_meta("电话", True, "7264894634285863483", "20255003", "5da5a98b8c926c0dcc1c3c8bc3f3012f", [
|
||||
Effect_param("强弱", 0.700, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强弱: 默认0.70, 0.00 ~ 1.00
|
||||
"""
|
||||
留声机 = Effect_meta("留声机", True, "7282687663872676408", "23897797", "e692fae669650c948451b5811a04e7e6", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
百老汇 = Effect_meta("百老汇", True, "7372150379150053907", "66413025", "73e3a35496b9766d0400165844be72f1", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
空灵感 = Effect_meta("空灵感", True, "7350215092975178252", "53187171", "aa1887a8b3375d20df6bf9438d62083a", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
空谷回声 = Effect_meta("空谷回声", True, "7350214991628210727", "53187170", "9913daa32167a17c1f41ad2f5596c411", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
老式电话 = Effect_meta("老式电话", True, "7282691476843139621", "23880011", "2eb835175e1e72e9d86b09bf513077cf", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
言灵术 = Effect_meta("言灵术", True, "7382844601435951653", "72110974", "7184386e75226a36942c60a5d5bb5618", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
豪宅回声 = Effect_meta("豪宅回声", True, "7360900963294515775", "58979353", "7c20b5fba991f3188f14d7cdb0de1fa1", [
|
||||
Effect_param("强度", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- 强度: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
迷幻电子 = Effect_meta("迷幻电子", True, "7375069381769826879", "68076026", "ce220d25a6f95bd31a81f6421bbf2525", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
- noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
|
||||
class Speech_to_song_type(Effect_enum):
|
||||
"""剪映自带的音频“声音成曲”效果类型, 此类效果目前不能自动被剪映所识别"""
|
||||
|
||||
Lofi = Effect_meta("Lofi", False, "7252917861948068410", "17345060", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
民谣 = Effect_meta("民谣", False, "7251868698170888759", "17046923", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
嘻哈 = Effect_meta("嘻哈", True, "7252918249036190245", "17344948", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
爵士 = Effect_meta("爵士", True, "7264413578860433978", "20120940", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
节奏蓝调 = Effect_meta("节奏蓝调", True, "7252918101958726200", "17345046", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
雷鬼 = Effect_meta("雷鬼", True, "7264413386962637368", "20120864", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
190
pyJianYingDraft/metadata/capcut_animation_meta.py
Normal file
190
pyJianYingDraft/metadata/capcut_animation_meta.py
Normal file
@@ -0,0 +1,190 @@
|
||||
from .effect_meta import Effect_enum
|
||||
from .animation_meta import Animation_meta
|
||||
|
||||
class CapCut_Intro_type(Effect_enum):
|
||||
"""CapCut自带的入场动画, 默认时长为0.5秒"""
|
||||
|
||||
Fade_In = Animation_meta("Fade In", False, 0.500, "6798320778182922760", "6798320778182922760", "883ad04bd79b502aaa55b5d9b87175ea")
|
||||
Zoom_1 = Animation_meta("Zoom 1", False, 0.500, "6740868384637850120", "6740868384637850120", "6444aa1a1706f02003f9c56c4c0757b3")
|
||||
Rock_Vertically = Animation_meta("Rock Vertically", False, 0.500, "6739418390030455300", "6739418390030455300", "c55e541676bc97120a3985ee7bde44cc")
|
||||
Slide_Down = Animation_meta("Slide Down", False, 0.500, "6798333705401143816", "6798333705401143816", "dd4a5c03f0ee1a03413b9166c9b2e254")
|
||||
Slide_Up = Animation_meta("Slide Up", False, 0.500, "6798333487523828238", "6798333487523828238", "51657913dffa9f4c5f9d4411b53611e5")
|
||||
Slide_Right = Animation_meta("Slide Right", False, 0.500, "6798333076469453320", "6798333076469453320", "abb44c05890e39fdfeb58abc8524c1a6")
|
||||
Slide_Left = Animation_meta("Slide Left", False, 0.500, "6798332871267324423", "6798332871267324423", "667952e8cf6918f62e16b8e6dfc2fef2")
|
||||
Rotate = Animation_meta("Rotate", False, 0.500, "6798334070653719054", "6798334070653719054", "c97081cea815078e71a6c51197ed8b33")
|
||||
Flame_Risen = Animation_meta("Flame Risen", False, 2.867, "7447086181751198224", "7447086181751198224", "37f3e9ceaabb3b3a50a353d223149ba3")
|
||||
Rotation_Opening = Animation_meta("Rotation Opening", False, 1.000, "7197354677820723714", "7197354677820723714", "8308459d002ce5bd241c93a82acaad72")
|
||||
Retro_Fadein_2 = Animation_meta("Retro Fade-in 2", False, 2.000, "7473710409103446545", "7473710409103446545", "74b90ae9e4ac14acefcd1e42f09f7e46")
|
||||
Retro_Fadein = Animation_meta("Retro Fade-in", False, 2.000, "7473710410428846608", "7473710410428846608", "9ee9890543a20651e4b2a6ff7b09237a")
|
||||
Screen_Wipe = Animation_meta("Screen Wipe", False, 2.000, "7450390477871780353", "7450390477871780353", "a37e8b30f8debf2be5c931369dee8408")
|
||||
RGB_Scanlines = Animation_meta("RGB Scanlines", False, 1.000, "7480796814837304581", "7480796814837304581", "40ca0fd33319c572ff6d1a5bc209d8b2")
|
||||
Zoom_2 = Animation_meta("Zoom 2", False, 0.500, "6740867832570974733", "6740867832570974733", "4c241a9c8ef566b91b6a499c33648062")
|
||||
Zoom_Out = Animation_meta("Zoom Out", False, 0.500, "6798332584276267527", "6798332584276267527", "0c736f993d36a7b1ef00cc73d2ba656f")
|
||||
Zoom_In = Animation_meta("Zoom In", False, 0.500, "6798332733694153230", "6798332733694153230", "028a77e121c22a4dd130a46a0ed90714")
|
||||
Shake_3 = Animation_meta("Shake 3", False, 0.500, "6781683302672634382", "6781683302672634382", "e2799421fc7fc57796222bd27966c812")
|
||||
CRT_Bands = Animation_meta("CRT Bands", False, 2.000, "7473710408977617424", "7473710408977617424", "21a440db23f032255ea2ad9544d7a4d2")
|
||||
Vibrating_Panels = Animation_meta("Vibrating Panels", False, 2.000, "7473710409023754753", "7473710409023754753", "3c51bc51a78c387f21034e770ff2c82c")
|
||||
Swing_Top_Right = Animation_meta("Swing Top Right", False, 0.500, "6740122731418751495", "6740122731418751495", "e807e0130c771613d50ebac118fb9ee7")
|
||||
Anime_Frame = Animation_meta("Anime Frame", False, 1.000, "7460018714935562769", "7460018714935562769", "bc473429a461fc519c74651c1e736461")
|
||||
Rock_Horizontally = Animation_meta("Rock Horizontally", False, 0.500, "6739418540421419524", "6739418540421419524", "e3b4c7ff19cc1d221ffff7b69f55a2fd")
|
||||
Gray_Mask = Animation_meta("Gray Mask", False, 1.533, "7473710409040531985", "7473710409040531985", "861023094b989c46ca97f3c51e95e046")
|
||||
Shake_1 = Animation_meta("Shake 1", False, 0.500, "6739418227031413256", "6739418227031413256", "72fb15b943898171056a76fb509880af")
|
||||
Spin_Up_2 = Animation_meta("Spin Up 2", False, 0.500, "6818747060649464327", "6818747060649464327", "4d972df8465406e54473cf550e7d96ff")
|
||||
Whirl = Animation_meta("Whirl", False, 0.500, "6782010677520241165", "6782010677520241165", "03a38600832cda8d47c82e121513efd4")
|
||||
Mini_Zoom = Animation_meta("Mini Zoom", False, 0.500, "6800268825611735559", "6800268825611735559", "b547d896cac3d5e620033e53f139426d")
|
||||
Spin_Up_1 = Animation_meta("Spin Up 1", False, 0.500, "6808401616564130312", "6808401616564130312", "18e8ea7ff7f074aa56f5449d4daca501")
|
||||
Swing_Bottom = Animation_meta("Swing Bottom", False, 0.500, "6739338374441603598", "6739338374441603598", "4c3ac20ec647fc31079df672e39bf1f7")
|
||||
Swing_Right = Animation_meta("Swing Right", False, 0.500, "6739338727866241539", "6739338727866241539", "03aa26f798ad7fbb98880e35bc128829")
|
||||
Swing_Bottom_Left = Animation_meta("Swing Bottom Left", False, 0.500, "6739395445346275853", "6739395445346275853", "5b8031554e3c336f9275933f48ef688a")
|
||||
Flip = Animation_meta("Flip", False, 0.500, "6797338697625768455", "6797338697625768455", "94e00999e45d4ef7715901152889b07a")
|
||||
Shake_2 = Animation_meta("Shake 2", False, 0.500, "6739418677910704651", "6739418677910704651", "dc958f2f8ad9124767731914748f5413")
|
||||
Blinds = Animation_meta("Blinds", False, 0.500, "6782101071402635790", "6782101071402635790", "e7f3101f49c2891c627275f0aadfd242")
|
||||
Swing_Bottom_Right = Animation_meta("Swing Bottom Right", False, 0.500, "6739395718223499787", "6739395718223499787", "1101f5affae043d86067251bd64c86db")
|
||||
Puzzle = Animation_meta("Puzzle", False, 0.500, "6778300107113632269", "6778300107113632269", "1343011abfd6982e186ac5403bc377ca")
|
||||
Swing_Top_Left = Animation_meta("Swing Top Left", False, 0.500, "6740122563692728844", "6740122563692728844", "c442ab84beaa8da41f731d13d61a28f0")
|
||||
Shake_Down = Animation_meta("Shake Down", False, 0.500, "6995802540361126402", "6995802540361126402", "660ccbf427bc7d885fe6b789c166d8f1")
|
||||
Swing = Animation_meta("Swing", False, 0.500, "6803260897117606414", "6803260897117606414", "f3fa59690a9bcceed01b594cc363598b")
|
||||
Wiper = Animation_meta("Wiper", False, 0.500, "6802871256849846791", "6802871256849846791", "bfc925823097f5f8a0f460133d35280a")
|
||||
Roll_Right = Animation_meta("Roll Right", False, 0.500, "6805019065761927694", "6805019065761927694", "1096226c559457f5b95b55e4a224f4df")
|
||||
Spin_Left = Animation_meta("Spin Left", False, 0.500, "6816560956647150093", "6816560956647150093", "43de115d1158ea57027635b7a3cf0478")
|
||||
|
||||
|
||||
class CapCut_Outro_type(Effect_enum):
|
||||
"""CapCut自带的出场动画, 默认时长为0.5秒"""
|
||||
|
||||
Fade_Out = Animation_meta("Fade Out", False, 0.500, "6798320902548230669", "6798320902548230669", "c6f05ce62355b537be762550040bfc08")
|
||||
RGB_Scanlines = Animation_meta("RGB Scanlines", False, 1.000, "7480796062245014790", "7480796062245014790", "75447137a5f585089d33445eda2ecea4")
|
||||
Blurred_Fadein = Animation_meta("Blurred Fade-in", False, 2.000, "7473710407329255953", "7473710407329255953", "0b044ebdb1a22f212aa537ff91d72f46")
|
||||
Slide_Down = Animation_meta("Slide Down", False, 0.500, "6798333787986989576", "6798333787986989576", "c1f3d6530ffa1646b03fbaa22266f04b")
|
||||
Slide_Up = Animation_meta("Slide Up", False, 0.500, "6798333612958683656", "6798333612958683656", "443a2085da756085ed06e2e338f76523")
|
||||
Slide_Right = Animation_meta("Slide Right", False, 0.500, "6798333350487527950", "6798333350487527950", "55fd54674cdd4de3f6a7b1d1482c308c")
|
||||
Slide_Left = Animation_meta("Slide Left", False, 0.500, "6798332972098392584", "6798332972098392584", "45dc53f993e77e2dbbcbc2de8df5f092")
|
||||
Blurred_Fadein_1 = Animation_meta("Blurred Fade-in", False, 2.000, "7473710410407875073", "7473710410407875073", "7aaa4899430661fd955f898f6ea7796c")
|
||||
Zoom_In = Animation_meta("Zoom In", False, 0.500, "6798332801864176142", "6798332801864176142", "01497dc221d288e623a10cac94a5ceca")
|
||||
CRT_Bands = Animation_meta("CRT Bands", False, 2.000, "7473710409145389585", "7473710409145389585", "63782405a7730ecadf707fb8d41cf013")
|
||||
Flame_Risen = Animation_meta("Flame Risen", False, 2.967, "7447086181742825985", "7447086181742825985", "cfae1a683f11299f0c1d133d436b2746")
|
||||
Screen_Wipe = Animation_meta("Screen Wipe", False, 2.000, "7450390477863408129", "7450390477863408129", "0ac1cfe94bb7f54b8a38dc0de67b05ca")
|
||||
Rotation_Closing = Animation_meta("Rotation Closing", False, 1.000, "7197354764579901953", "7197354764579901953", "c9ff648f5a206e0da5be0d60a286b403")
|
||||
Rotate = Animation_meta("Rotate", False, 0.500, "6798334141323547143", "6798334141323547143", "982f83d952f2161660d781a9542d76a9")
|
||||
Anime_Frame = Animation_meta("Anime Frame", False, 1.000, "7460018714935579152", "7460018714935579152", "bc473429a461fc519c74651c1e736461")
|
||||
Zoom_Out = Animation_meta("Zoom Out", False, 0.500, "6798332648814023181", "6798332648814023181", "a719ad21c4968b730d366d4f92b792c5")
|
||||
Rotate_Out_1 = Animation_meta("Rotate Out 1", False, 0.500, "6818747115934585357", "6818747115934585357", "7bd213e79bc1bd54a241be243dbbf8be")
|
||||
Mini_Zoom = Animation_meta("Mini Zoom", False, 0.500, "6800268611807089166", "6800268611807089166", "094a9454e856be4ef2f43c391a7d6b38")
|
||||
Gray_Mask = Animation_meta("Gray Mask", False, 1.533, "7473710410357543425", "7473710410357543425", "947652cf982d4868e8f9ebe19308e959")
|
||||
Whirl = Animation_meta("Whirl", False, 0.500, "6778418947361346061", "6778418947361346061", "107ee2571bae820df3912ebe83b7d899")
|
||||
Vibrating_Panels = Animation_meta("Vibrating Panels", False, 2.000, "7473710409195721233", "7473710409195721233", "4bcf3a8724c7c709b1d008d758728357")
|
||||
Rotate_Out_2 = Animation_meta("Rotate Out 2", False, 0.500, "6818747169017696781", "6818747169017696781", "e4324969c3f4e215227dfd91402ddb85")
|
||||
Flip = Animation_meta("Flip", False, 0.500, "6738353628215513613", "6738353628215513613", "9c3bd6309ff93abc7da1e22be6d103ab")
|
||||
|
||||
|
||||
class CapCut_Group_animation_type(Effect_enum):
|
||||
"""CapCut自带的组合动画, 默认时长为0.5秒"""
|
||||
|
||||
Zoom_1 = Animation_meta("Zoom 1", False, 4.000, "6759078592740594184", "6759078592740594184", "cac9a365aab6a7fe878431abd85d4b5d")
|
||||
Stretch_and_distort = Animation_meta("Stretch and distort", False, 3.500, "7032223224863658497", "7032223224863658497", "4f1a31ff5cb6cf8223512aa55d16f3d9")
|
||||
Bounce_1 = Animation_meta("Bounce 1", False, 2.500, "6795425591014199822", "6795425591014199822", "67f82884f9d3a9069479925989811c35")
|
||||
Sway_Out = Animation_meta("Sway Out", False, 4.000, "6789167998700622350", "6789167998700622350", "b3b5bbf151c2f6cd6883ca88ab955cd0")
|
||||
_3D_card_2 = Animation_meta("3D card 2", False, 4.000, "6836319649844433415", "6836319649844433415", "f5555b74fed96dd78c5b292b035595b3")
|
||||
Slide_and_wave = Animation_meta("Slide and wave", False, 4.000, "7032224062973678082", "7032224062973678082", "1ba51897f314706b2fd04d1852f6d38c")
|
||||
Pendulum_1 = Animation_meta("Pendulum 1", False, 4.000, "6811007755785081357", "6811007755785081357", "47cc5d94c283293166c3d3d3fde86655")
|
||||
Wobble = Animation_meta("Wobble", False, 2.500, "6761360765925462536", "6761360765925462536", "87049bd0502eb6e07aaba92e83b8b09d")
|
||||
Wave_and_slide = Animation_meta("Wave and slide", False, 1.633, "7032223862586610178", "7032223862586610178", "c3bfd4dfce887af6305579b04327cd64")
|
||||
Enlarge_and_bounce = Animation_meta("Enlarge and bounce", False, 2.000, "7032223659116728833", "7032223659116728833", "18bfc84500372c9a49023c1a77efa6e5")
|
||||
Distort_and_stretch = Animation_meta("Distort and stretch", False, 0.033, "7032223355365233154", "7032223355365233154", "e0a1f868f0161970c4d2a2f5ae3c6896")
|
||||
Pendulum_2 = Animation_meta("Pendulum 2", False, 1.000, "6811007833069326862", "6811007833069326862", "4958eff996309ec58d9d5d13810d49fd")
|
||||
Zoom_2 = Animation_meta("Zoom 2", False, 2.000, "6779083172429697544", "6779083172429697544", "60cdf52561e071069e0a3fdcb5b704c7")
|
||||
Sway_In = Animation_meta("Sway In", False, 3.500, "6789167874511475207", "6789167874511475207", "b658fe0ba15b223730949f885fd5a470")
|
||||
BendZoom = Animation_meta("Bend-Zoom", False, 3.500, "6777260789263766030", "6777260789263766030", "641101ae551a661560994dca7c8c4809")
|
||||
Bounce_2 = Animation_meta("Bounce 2", False, 4.000, "6795425422046663182", "6795425422046663182", "c37bbe6dbe2a75321b9fbf1bb2c3756c")
|
||||
Spin_Rise = Animation_meta("Spin Rise", False, 4.000, "6813965670716281352", "6813965670716281352", "a04cb028ba78bf152840dfe9ef94f6fb")
|
||||
Train_2 = Animation_meta("Train 2", False, 4.000, "6860406007160377863", "6860406007160377863", "572c74f24408cb0c7db3567ce29ace09")
|
||||
Spin = Animation_meta("Spin", False, 1.467, "6829129745226011144", "6829129745226011144", "21db4621193a6f135c5101ba87dfc0e3")
|
||||
Shrink_and_bounce = Animation_meta("Shrink and bounce", False, 2.500, "7032223526635442690", "7032223526635442690", "bca5ca47f6f33268fb1de55fa8946519")
|
||||
Smartphone_1 = Animation_meta("Smartphone 1", False, 2.500, "6861892418334102030", "6861892418334102030", "6ae8e419d84d1dadd79f2c816a453806")
|
||||
Distort_Right = Animation_meta("Distort Right", False, 3.500, "6851395907804467720", "6851395907804467720", "7712b11531b0afd5187f0a4952a6e520")
|
||||
Trisect_2 = Animation_meta("Trisect 2", False, 4.000, "6874466931919819266", "6874466931919819266", "4fe7ed9ccc1834224d0c3fd3985a908b")
|
||||
Train_4 = Animation_meta("Train 4", False, 3.467, "6860406196130550286", "6860406196130550286", "0bde5bf5f5a7d3ce8d869671ec034c3e")
|
||||
Fall_Spin = Animation_meta("Fall Spin", False, 4.500, "6759075297091392007", "6759075297091392007", "31cbe2991de64f5ff8e478b5643a3c5d")
|
||||
_3D_card_1 = Animation_meta("3D card 1", False, 4.500, "6836319728038842894", "6836319728038842894", "2177261ca87ec366db301c046c2a7b54")
|
||||
Spinning_top_2 = Animation_meta("Spinning top 2", False, 4.500, "6876994663325110786", "6876994663325110786", "035a6bc939af9eb7376009b185e12cf7")
|
||||
Fall_Right = Animation_meta("Fall Right", False, 4.500, "6781683518222111239", "6781683518222111239", "c40c11d1a6dc09ec68a93044eb349fac")
|
||||
Pan_Right = Animation_meta("Pan Right", False, 4.500, "6772415374165021191", "6772415374165021191", "e47d729d30ec77b361f163ecb37c20dc")
|
||||
Distort_Left = Animation_meta("Distort Left", False, 4.500, "6851395726937690637", "6851395726937690637", "48d34352aeb9aee85801abb7cb81d840")
|
||||
Slip_and_slide_2 = Animation_meta("Slip and slide 2", False, 4.500, "6828829741013799432", "6828829741013799432", "0b89958e782890e475cb21cf71d697f5")
|
||||
Slip_and_slide_1 = Animation_meta("Slip and slide 1", False, 4.500, "6828829568879563271", "6828829568879563271", "2ffbf81b3f77f966b697698291078308")
|
||||
Roll_InOut_2 = Animation_meta("Roll In&Out 2", False, 4.500, "6818747242258633224", "6818747242258633224", "efb9910c822718c31648d61da2e6f7d2")
|
||||
Right_Zoom = Animation_meta("Right Zoom", False, 4.500, "6772415063216099848", "6772415063216099848", "64d73a2a8d4b857816f103d1d0496adc")
|
||||
Slice__Rotate_2 = Animation_meta("Slice & Rotate 2", False, 4.500, "6900760591321797121", "6900760591321797121", "2816ae00206cc067d0fac4905b4ebd65")
|
||||
Cube_3 = Animation_meta("Cube 3", False, 4.500, "6841793140949520910", "6841793140949520910", "c8a758318bd0b421006767cd08cc8524")
|
||||
Pirate_ship_1 = Animation_meta("Pirate ship 1", False, 4.500, "6830302168751280648", "6830302168751280648", "44fd11d2b67322a3954b33eb8851091e")
|
||||
Bisect_2 = Animation_meta("Bisect 2", False, 4.500, "6856970411352003080", "6856970411352003080", "035cfab958d2e0bec0ae60c39e6e6eb7")
|
||||
Pan_Left = Animation_meta("Pan Left", False, 4.500, "6772415248973435395", "6772415248973435395", "0126690613352a2cf97550b6a8181c4e")
|
||||
Train_3 = Animation_meta("Train 3", False, 4.500, "6860406091700769293", "6860406091700769293", "6d1607c50ea210073b17afaa6da87afd")
|
||||
Train_1 = Animation_meta("Train 1", False, 4.500, "6860405888784536072", "6860405888784536072", "02b09df0a764000d55892ea96a5a5b27")
|
||||
Magic_Cube_2 = Animation_meta("Magic Cube 2", False, 4.500, "6872233503220568578", "6872233503220568578", "6bd6ee4f2cbd13049e0b670b0bec8174")
|
||||
Yoyo_2 = Animation_meta("Yo-yo 2", False, 4.500, "6821451462904648200", "6821451462904648200", "930d3141277ddda51fb05002595f599e")
|
||||
_3D_card_5 = Animation_meta("3D card 5", False, 5.000, "6836319888827486728", "6836319888827486728", "ae1d9e7741f5bc6ccd231acf10ebc813")
|
||||
Fall_Bottom_Right = Animation_meta("Fall Bottom Right", False, 5.000, "6781683438396117517", "6781683438396117517", "7a75f84f6f9c82870d22e6bb89300a52")
|
||||
_3D_card_3 = Animation_meta("3D card 3", False, 5.000, "6836319781004513805", "6836319781004513805", "0e37189a4f9c953672ab959403f2c851")
|
||||
Funhouse_mirror_1 = Animation_meta("Funhouse mirror 1", False, 5.000, "6832226792556728846", "6832226792556728846", "42e24b02b48a069eda3bae90ba69ea28")
|
||||
Revolving_Checker_2 = Animation_meta("Revolving Checker 2", False, 5.000, "6894449215796154882", "6894449215796154882", "50b1a6caf0ad4c57295a318ea8020447")
|
||||
Roll_InOut_1 = Animation_meta("Roll In&Out 1", False, 5.000, "6805012562174808590", "6805012562174808590", "6d6d61a51dc4425a7b9a4e29c8d6d6c3")
|
||||
Left_Zoom = Animation_meta("Left Zoom", False, 5.000, "6772415148423385607", "6772415148423385607", "2b170a07ed5b6eea5753a34c6ed2d50b")
|
||||
Fall_Left = Animation_meta("Fall Left", False, 5.000, "6759351225772151303", "6759351225772151303", "3b4ea61a67352fb9f1d22e1bd7cd17f6")
|
||||
Checker_Slide_2 = Animation_meta("Checker Slide 2", False, 5.000, "6885172240342585857", "6885172240342585857", "af11a9469a4cd4f2c10f001a07ed4401")
|
||||
Waltzer_2 = Animation_meta("Waltzer 2", False, 5.000, "6850287920255865357", "6850287920255865357", "4b91788d470dc3407aaa2ffc40fb6578")
|
||||
Smartphone_3 = Animation_meta("Smartphone 3", False, 5.000, "6862918366550561294", "6862918366550561294", "5500e7b47698dd5fe75410d84783d0e7")
|
||||
Spinning_top_1 = Animation_meta("Spinning top 1", False, 5.000, "6876994577786475010", "6876994577786475010", "c1c40ff93670136bbd0286f345b501d3")
|
||||
Smaller = Animation_meta("Smaller", False, 5.000, "6759046644462785037", "6759046644462785037", "1f5d674d24ae59aa475b370e2153fe6c")
|
||||
Zoom_Spin = Animation_meta("Zoom Spin", False, 5.000, "6760119657429996046", "6760119657429996046", "1b332dcc28c53b4b6d65917f4253f15f")
|
||||
Spin_In = Animation_meta("Spin In", False, 5.000, "6810286558826992136", "6810286558826992136", "7c5154b92cb9eaf62dfe6a8b862af720")
|
||||
Fall_Bottom_Left = Animation_meta("Fall Bottom Left", False, 5.000, "6760223716392571395", "6760223716392571395", "e6540724540a619734bea5758c488513")
|
||||
Yoyo_1 = Animation_meta("Yo-yo 1", False, 5.000, "6821451358101574152", "6821451358101574152", "4221221eb86e8473b568c9783af55591")
|
||||
Flip_6 = Animation_meta("Flip 6", False, 5.000, "6843310299991249421", "6843310299991249421", "e6eca0c277134d07217d5e9c67941117")
|
||||
Funhouse_mirror_2 = Animation_meta("Funhouse mirror 2", False, 5.000, "6832226909875606029", "6832226909875606029", "e2978681483020a37fc79ab92d7234b4")
|
||||
ZoomRoll = Animation_meta("Zoom-Roll", False, 5.000, "6805018974070247950", "6805018974070247950", "a77c79a553bc381cf0709c05e71ebdf8")
|
||||
_3D_card_4 = Animation_meta("3D card 4", False, 5.000, "6836319828656001550", "6836319828656001550", "5a283eddf746a7dca43522681d2a0fef")
|
||||
Spin_Fall = Animation_meta("Spin Fall", False, 5.000, "6759046515521491464", "6759046515521491464", "050514f87393b3f12b85d8563ee078c5")
|
||||
Cube = Animation_meta("Cube", False, 5.000, "6837352063496622599", "6837352063496622599", "6cf65fcb4b6c9ffde44453a5bed75e6c")
|
||||
Fan_Out = Animation_meta("Fan Out", False, 5.000, "6885172192766595585", "6885172192766595585", "22ce9336e5716a87d6a2a980f6b84e78")
|
||||
Triplets_1 = Animation_meta("Triplets 1", False, 5.000, "6868146033247916558", "6868146033247916558", "2a30e5f26dc2f857c7701608186849c4")
|
||||
Magic_Cube_1 = Animation_meta("Magic Cube 1", False, 5.000, "6872233360521957890", "6872233360521957890", "2a3a439dccad5615dae22e343990265c")
|
||||
_3D_card_6 = Animation_meta("3D card 6", False, 5.000, "6839582631345000967", "6839582631345000967", "62b36ad9c0ebf58d48f901b82f6dda66")
|
||||
Quarter_2 = Animation_meta("Quarter 2", False, 5.000, "6865579178599649806", "6865579178599649806", "bdab1437e1f2531c3e763a30821748ab")
|
||||
Spin_Out = Animation_meta("Spin Out", False, 5.000, "6810286613898203661", "6810286613898203661", "f98cbb7677a7b7eb3b40922162635a91")
|
||||
Pirate_ship_2 = Animation_meta("Pirate ship 2", False, 5.000, "6830302282995732999", "6830302282995732999", "dcfdf23a704abb026623c00913d085ba")
|
||||
Bisect_Domino_2 = Animation_meta("Bisect Domino 2", False, 5.000, "6887447494821679617", "6887447494821679617", "681f4f5d57af86bad50d1f314a1bb36f")
|
||||
Waltzer_4 = Animation_meta("Waltzer 4", False, 5.000, "6854782786553778695", "6854782786553778695", "ca260e5c700b69406c106bb4f372168c")
|
||||
Rise_Spin = Animation_meta("Rise Spin", False, 5.000, "6813965595915063815", "6813965595915063815", "9c9f40961508028be988a103f40f7071")
|
||||
Puzzle = Animation_meta("Puzzle", False, 5.000, "6778405418969338382", "6778405418969338382", "92aa7ffce8c23041f0e556013acff086")
|
||||
Bisect_1 = Animation_meta("Bisect 1", False, 5.000, "6856970350270353928", "6856970350270353928", "2eac59ac28531dd3f9ee78c22343fafa")
|
||||
Pirate_ship_3 = Animation_meta("Pirate ship 3", False, 5.000, "6830302335047045639", "6830302335047045639", "5118eb6d02a84c39ffb678f6ecbc895a")
|
||||
Pirate_ship_4 = Animation_meta("Pirate ship 4", False, 5.000, "6830302424826122765", "6830302424826122765", "09c1204e3f3f44bfadf2a55cd6a4000b")
|
||||
Checker_Slide_1 = Animation_meta("Checker Slide 1", False, 5.000, "6885172212056199681", "6885172212056199681", "b62622615f1adb22bf5df9bfe4e8c307")
|
||||
Waltzer_1 = Animation_meta("Waltzer 1", False, 5.000, "6850287838441771534", "6850287838441771534", "8b3b09b0e8c3b1a7f3f580f86dffc763")
|
||||
Smartphone_2 = Animation_meta("Smartphone 2", False, 5.000, "6862918279183208973", "6862918279183208973", "33f8b44f27e06e16e1dfdf52794a3ed0")
|
||||
Sliding_Doors_1 = Animation_meta("Sliding Doors 1", False, 5.000, "6885172172587799041", "6885172172587799041", "de31f6d54856f05a0824eab7afac58e7")
|
||||
Split_up__down_2 = Animation_meta("Split up & down 2", False, 5.000, "6876994486052852225", "6876994486052852225", "4e6cbade1d8b48cd6b8473e40bc8d12e")
|
||||
Cube_2 = Animation_meta("Cube 2", False, 5.000, "6841793224663634446", "6841793224663634446", "c167baef667407ab0e1e6fca48ef6c3c")
|
||||
Crystal_1 = Animation_meta("Crystal 1", False, 5.000, "6857333749718192654", "6857333749718192654", "156f60965f55684a158197bbf5bcc029")
|
||||
Angle_1 = Animation_meta("Angle 1", False, 5.000, "6847734302193488392", "6847734302193488392", "fa0a52a3ef758e27359bb014bccdc9fc")
|
||||
Trisect_1 = Animation_meta("Trisect 1", False, 5.000, "6874467891899535873", "6874467891899535873", "8e66f5e6bc1a881fc62679276bb7cabe")
|
||||
Flip_2 = Animation_meta("Flip 2", False, 5.000, "6843310029689328135", "6843310029689328135", "520adf156b9f908075227cf58f57c3f5")
|
||||
Waltzer_3 = Animation_meta("Waltzer 3", False, 5.000, "6854782718975152653", "6854782718975152653", "187f66ad384afff2a83c06df1b1ddfc7")
|
||||
Blinds = Animation_meta("Blinds", False, 5.000, "7425512249630002437", "7425512249630002437", "61e2ab1e9b0a47af6aa057997562934e")
|
||||
Crystal_2 = Animation_meta("Crystal 2", False, 5.000, "6857333869541069325", "6857333869541069325", "6e7642751a8dbcaf1a4a848a68691b17")
|
||||
Triplets_2 = Animation_meta("Triplets 2", False, 5.000, "6868146123710665223", "6868146123710665223", "537a84c9befbb05f44ae713121d9418d")
|
||||
Angle_2 = Animation_meta("Angle 2", False, 5.000, "6847734360636920327", "6847734360636920327", "0be39058880e8d7e73430e6aa9a57591")
|
||||
Cube_3_1 = Animation_meta("Cube 3", False, 5.000, "6834812541118452237", "6834812541118452237", "7c3b8d6ab6175e1cbe2c008306d41c10")
|
||||
Cube_2_1 = Animation_meta("Cube 2", False, 5.000, "6834812485023830535", "6834812485023830535", "00a120634edb134ca67c16147f13c9c3")
|
||||
Slice__Rotate_1 = Animation_meta("Slice & Rotate 1", False, 5.000, "6900760492877287938", "6900760492877287938", "6043ed4691fab54f724e9fb60a74389b")
|
||||
Quarter_1 = Animation_meta("Quarter 1", False, 5.000, "6865578846393995784", "6865578846393995784", "ede54a888ccea145ced3e377a9cb031a")
|
||||
Revolving_Checker_1 = Animation_meta("Revolving Checker 1", False, 5.000, "6894449368728867329", "6894449368728867329", "12dd7150e6a6f9dacfbd3669c2b0bd9a")
|
||||
Flip_II = Animation_meta("Flip II", False, 5.000, "6843309964732142094", "6843309964732142094", "fc95809653133b181421de3bc8880602")
|
||||
Flip_3 = Animation_meta("Flip 3", False, 5.000, "6843310084743762446", "6843310084743762446", "2d0f1613c434cbc83557e4288a0be8a5")
|
||||
Flip_4 = Animation_meta("Flip 4", False, 5.000, "6843310129736061447", "6843310129736061447", "e477e654de34a7b82a8a1ce23ee5ae5a")
|
||||
Rollercoaster_1 = Animation_meta("Roller-coaster 1", False, 5.000, "6872233216867045890", "6872233216867045890", "efa94806c6ac55227fbca7c847ae27ad")
|
||||
Rollercoaster_2 = Animation_meta("Roller-coaster 2", False, 5.000, "6872233274891047426", "6872233274891047426", "026fe685eeb8e00dbfaf7085d7219f2e")
|
||||
Split_up__down_1 = Animation_meta("Split up & down 1", False, 5.000, "6876994436950135298", "6876994436950135298", "10d434d1f8ac88a9a7f208759d2d32be")
|
||||
Bisect_Domino_1 = Animation_meta("Bisect Domino 1", False, 5.000, "6887447635439915522", "6887447635439915522", "a261c2080741de332be207398ebd01a2")
|
||||
Flip_5 = Animation_meta("Flip 5", False, 5.000, "6843310237902967304", "6843310237902967304", "43bf1ef1a1d937e1b44db68c8f585804")
|
||||
144
pyJianYingDraft/metadata/capcut_audio_effect_meta.py
Normal file
144
pyJianYingDraft/metadata/capcut_audio_effect_meta.py
Normal file
@@ -0,0 +1,144 @@
|
||||
from .effect_meta import Effect_enum
|
||||
from .effect_meta import Effect_meta, Effect_param
|
||||
|
||||
class CapCut_Voice_filters_effect_type(Effect_enum):
|
||||
"""CapCut自带的Voice filters特效类型"""
|
||||
|
||||
Big_House = Effect_meta("Big House", False, "7350559836590838274", "8954C5C2-A0BB-4915-8CB2-B422445DCB71", "3b1d62bbe927104e393b0fc5043dc0a6", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Low = Effect_meta("Low", False, "7021052731091587586", "4D23A0EA-5E4B-4B6A-8CE7-E3B0ADAFBCE1", "e2e27786b25e4cf9b4e74558d6f6c832", [
|
||||
Effect_param("change_voice_param_pitch", 0.375, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 0.250, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch: 默认0.38, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认0.25, 0.00 ~ 1.00
|
||||
"""
|
||||
Energetic = Effect_meta("Energetic", False, "7320193885114733057", "FA559CAA-D9AA-443B-9D39-392B43D2DB02", "99fee98d58dd023a9f54a772dffe1ac1", [
|
||||
Effect_param("Intensity", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- Intensity: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
High = Effect_meta("High", False, "7021052551755731457", "E663A5D0-A024-4DED-8F0D-DA6D70A9F50C", "a83c56bd3fb17e93a1437d06498ab7ec", [
|
||||
Effect_param("change_voice_param_pitch", 0.834, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 0.334, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch: 默认0.83, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认0.33, 0.00 ~ 1.00
|
||||
"""
|
||||
Low_Battery = Effect_meta("Low Battery", False, "7021052694370456065", "3FB0AA17-B7E8-4820-86A2-0A34E3F2F881", "a96ff559c9f1afec0603ae8bb107d98c", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Tremble = Effect_meta("Tremble", False, "7021052770924892674", "4AEE9A06-71E0-4188-A87E-A161DDB80F4A", "337b1ba48ea61c95ac84ba238598ca0c", [
|
||||
Effect_param("change_voice_param_frequency", 0.714, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_width", 0.905, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_frequency: 默认0.71, 0.00 ~ 1.00
|
||||
- change_voice_param_width: 默认0.91, 0.00 ~ 1.00
|
||||
"""
|
||||
Electronic = Effect_meta("Electronic", False, "7021052717204247042", "0285BDC4-794F-48D0-A8BD-78B248FDE822", "a6f883d8294fd5f49952cbf08544a0c5", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Sweet = Effect_meta("Sweet", False, "7320193577613529602", "2CD71FC4-7B4E-4E53-B337-32173184F480", "ac2110d039d35ad01ca8452a6eadc921", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Vinyl = Effect_meta("Vinyl", False, "7025484451710767618", "6D42DEB5-D9DE-479F-955C-9F63C3B88F06", "fe8fdb1bcec05647749e076a15443f08", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_noise", 0.743, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
- change_voice_param_noise: 默认0.74, 0.00 ~ 1.00
|
||||
"""
|
||||
Mic_Hog = Effect_meta("Mic Hog", False, "7021052785101640194", "9A48AB2D-B527-4DF0-8512-058819047877", "f2bab335416833134ab4bb780c128cd2", [
|
||||
Effect_param("change_voice_param_room", 0.052, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_strength", 0.450, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_room: 默认0.05, 0.00 ~ 1.00
|
||||
- change_voice_param_strength: 默认0.45, 0.00 ~ 1.00
|
||||
"""
|
||||
LoFi = Effect_meta("Lo-Fi", False, "7025484400313766402", "1C8426BF-AC3B-4F90-B145-CA712BD486D3", "44a00f0e2b85e0006f49ef345a305ec1", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Megaphone = Effect_meta("Megaphone", False, "7021052620592648705", "8A5CF5B8-0959-4E8A-8CC5-AD17BA176D89", "b2ca5803b90f44ee0c833f34ef684d40", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Echo = Effect_meta("Echo", False, "7021052523762946561", "83B7B5D7-B539-4FAA-8CF3-3318394C9278", "c37d02ae5853211ad84c13e6dca31b81", [
|
||||
Effect_param("change_voice_param_quantity", 0.800, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_strength", 0.762, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_quantity: 默认0.80, 0.00 ~ 1.00
|
||||
- change_voice_param_strength: 默认0.76, 0.00 ~ 1.00
|
||||
"""
|
||||
Synth = Effect_meta("Synth", False, "7021052503919694337", "450DE367-AD03-4D06-B635-C947161AAA8E", "0247a95158fda7a9e44ccd4f832a9a14", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Deep = Effect_meta("Deep", False, "7021052537344102913", "188C5140-E4AC-41A5-B42A-901ACAEF1B62", "583e3ccf9d2daad3860aa70ad61b64ca", [
|
||||
Effect_param("change_voice_param_pitch", 0.834, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch: 默认0.83, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
|
||||
class CapCut_Voice_characters_effect_type(Effect_enum):
|
||||
"""CapCut自带的Voice characters特效类型"""
|
||||
|
||||
Fussy_male = Effect_meta("Fussy male", False, "7337197310696231425", "00C65F8A-44A7-4B17-8F39-93464E72823D", "", [])
|
||||
Bestie = Effect_meta("Bestie", False, "7252272084292735489", "B9B3885C-BF7D-4B5C-9545-B0CD3218F292", "", [])
|
||||
Queen = Effect_meta("Queen", False, "7337197136242545153", "17A7F413-C044-4F1F-9644-1337686BE406", "", [])
|
||||
Squirrel = Effect_meta("Squirrel", False, "7338257533796094466", "76668599-E132-42DF-99F8-6F086B3B56E9", "b2b3f551b703c87e8e057ad8f92fafbb", [
|
||||
Effect_param("strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
Distorted = Effect_meta("Distorted", False, "7021052602091573761", "F995614C-D100-481D-A708-59829794EF3E", "ce0bc10d76e22a718094c152f7beae25", [
|
||||
Effect_param("change_voice_param_pitch", 0.650, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 0.780, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch: 默认0.65, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认0.78, 0.00 ~ 1.00
|
||||
"""
|
||||
Chipmunk = Effect_meta("Chipmunk", False, "7021052742021943810", "B5C8BB3C-7765-4572-B8B9-9071A903D899", "4ff3edc0229bfac112c1caefe75e7039", [
|
||||
Effect_param("change_voice_param_pitch", 0.500, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 0.500, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch: 默认0.50, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认0.50, 0.00 ~ 1.00
|
||||
"""
|
||||
Trickster = Effect_meta("Trickster", False, "7254407946195440130", "11F394B0-E601-4DD5-BBEA-76A8CADE222A", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
Elf = Effect_meta("Elf", False, "7021052754512581122", "EF781DEC-265B-4B6D-A68E-5EDC75DDCA84", "bbf0f0d1532a249e9a1f7f3444e1e437", [
|
||||
Effect_param("change_voice_param_pitch", 0.750, 0.000, 1.000),
|
||||
Effect_param("change_voice_param_timbre", 0.600, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_pitch: 默认0.75, 0.00 ~ 1.00
|
||||
- change_voice_param_timbre: 默认0.60, 0.00 ~ 1.00
|
||||
"""
|
||||
Elfy = Effect_meta("Elfy", False, "7311544785477571074", "58E4D6DE-5D7A-42C8-BE16-1AFF43666512", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
Santa = Effect_meta("Santa", False, "7311544442723242497", "8E8A0DA9-1267-41E6-AFA4-20B2A4171BA4", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
Jessie = Effect_meta("Jessie", False, "7254408415026352642", "F3EBF9DB-195D-4531-94A8-F52964DB0C83", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
Good_Guy = Effect_meta("Good Guy", False, "7259231960889823746", "27D9D7EC-BFF2-4481-92D0-40E3CBF9C2FB", "8dd8889045e6c065177df791ddb3dfb8", [])
|
||||
Robot = Effect_meta("Robot", False, "7021052669863137794", "DD71C5CB-683A-4FFA-BEAA-33D568333486", "123114835bda73b8de4aa106ccde0bb2", [
|
||||
Effect_param("change_voice_param_strength", 1.000, 0.000, 1.000)])
|
||||
"""参数:
|
||||
- change_voice_param_strength: 默认1.00, 0.00 ~ 1.00
|
||||
"""
|
||||
|
||||
class CapCut_Speech_to_song_effect_type(Effect_enum):
|
||||
"""CapCut自带的Speech to song特效类型"""
|
||||
|
||||
Folk = Effect_meta("Folk", False, "7413437147539164421", "9A9C3804-5241-44E9-AF56-1BE8271083F2", "", [])
|
||||
|
||||
3187
pyJianYingDraft/metadata/capcut_effect_meta.py
Normal file
3187
pyJianYingDraft/metadata/capcut_effect_meta.py
Normal file
File diff suppressed because it is too large
Load Diff
24
pyJianYingDraft/metadata/capcut_mask_meta.py
Normal file
24
pyJianYingDraft/metadata/capcut_mask_meta.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from .effect_meta import Effect_enum
|
||||
from .mask_meta import Mask_meta
|
||||
|
||||
class CapCut_Mask_type(Effect_enum):
|
||||
"""CapCut自带的蒙版类型"""
|
||||
|
||||
Split = Mask_meta("Split", "line", "7374020197990011409", "B52CD1BC-63CE-4B74-B180-0B61E4AC928A", "4c6a0ef5de6a844342d40330e00c59eb", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.0, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Filmstrip = Mask_meta("Filmstrip", "mirror", "7374021024985125377", "C4A9A4BD-280D-4625-AA7D-F5F70E97B438", "95ac211c99063c41b86b9b63742f4a6d", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Circle = Mask_meta("Circle", "circle", "7374021188315517456", "E827751C-8DA7-412C-800D-DF2FE8712F77", "3ab1c47350d987c8ad415497e020a38b", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Rectangle = Mask_meta("Rectangle", "rectangle", "7374021450748924432", "E55A3414-9C81-4664-BB2B-42528D098F2F", "02b8999168d121538a98ea59127483ef", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Stars = Mask_meta("Stars", "pentagram", "7374021798087627265", "D824ED5D-D0C1-4EE2-B098-65F99CB38B95", "d3eb0298b2b1c345c123470c9194c8ad", 1.0471014493)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Heart = Mask_meta("Heart", "heart", "7350964630979613186", "2CA4F90A-87A6-483E-B71B-FDA65EE46860", "cfa1154e4873fda2c09716c8aa546236", 1.1148148148)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Text = Mask_meta("Text", "text", "7439320146876830225", "61E0D039-1A51-4570-B3F1-6AAC82AC1520", "ada210b1e21e860006c8324db359d8a3", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Brush = Mask_meta("Brush", "custom", "7374021798087627265", "31AC68F1-9EC3-4A4E-8D53-D556B7CDAC9E", "7e3c26bd14a0b68a84fee058db7f1ade", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 0.5, invert: False, rotation: 0.0, roundCorner: 0.0, width: 0.16"""
|
||||
Pen = Mask_meta("Pen", "contour", "7414333113955783185", "E3F45CAF-D445-4975-BE57-67AA716425D3", "9ee4e93af66335a75843446555efd8a6", 1.0)
|
||||
"""配置: centerX: 0.0, centerY: 0.0, expansion: 0.0, feather: 0.0, height: 1.0, invert: False, rotation: 0.0, roundCorner: 0.0, width: 1.0"""
|
||||
213
pyJianYingDraft/metadata/capcut_text_animation_meta.py
Normal file
213
pyJianYingDraft/metadata/capcut_text_animation_meta.py
Normal file
@@ -0,0 +1,213 @@
|
||||
from .effect_meta import Effect_enum
|
||||
from .animation_meta import Animation_meta
|
||||
|
||||
class CapCut_Text_intro(Effect_enum):
|
||||
"""CapCut自带的文字入场动画, 默认时长为0.5秒"""
|
||||
|
||||
Throw_Out = Animation_meta("Throw Out", False, 0.500, "7233110260204966402", "7233110260204966402", "97162e8faa56cf163b8f2c1bfd5ad6e0")
|
||||
Typewriter = Animation_meta("Typewriter", False, 0.500, "7210980292243231233", "7210980292243231233", "6828d67634e66ace1e76c4eb7cc2f8e6")
|
||||
Concentrate = Animation_meta("Concentrate", False, 0.500, "7044433622119485954", "7044433622119485954", "49ca01f4c5f0b75d8c10e8023362cffa")
|
||||
Fade_In = Animation_meta("Fade In", False, 0.500, "6724916044072227332", "6724916044072227332", "3ed092e2c06abae5644f5f12014e3020")
|
||||
Glitch = Animation_meta("Glitch", False, 0.500, "7077812383946641921", "7077812383946641921", "de64c5a073e2517b8d5a07244034fc62")
|
||||
Spin_In_2 = Animation_meta("Spin In 2", False, 0.500, "6775803763652301326", "6775803763652301326", "c1e619166960120b52986dd94ce15417")
|
||||
Spin_In_1 = Animation_meta("Spin In 1", False, 0.500, "6763873859402732039", "6763873859402732039", "87d5263bcd792156b91109cca5fc5aae")
|
||||
Zoom_Out_2 = Animation_meta("Zoom Out 2", False, 0.500, "7054480742507614722", "7054480742507614722", "d57145a34871f239c1512d7c748e3131")
|
||||
Wave_in = Animation_meta("Wave in", False, 0.500, "6918927741362377218", "6918927741362377218", "28bad8ddc1ee27d91a2f48deacbba9f7")
|
||||
Faulty_text = Animation_meta("Faulty text", False, 0.500, "6870325507511030274", "6870325507511030274", "c1c83996ee60af2be54d81a8f58f84ea")
|
||||
Dissolve = Animation_meta("Dissolve", False, 0.500, "6873386253367120386", "6873386253367120386", "3bac40f9a5d0b2a6b569ac8e4ca3c670")
|
||||
Pop_Up = Animation_meta("Pop Up", False, 0.500, "7145435451946439170", "7145435451946439170", "28d9145ead32c23742082a37e511370e")
|
||||
Random_Typewriter = Animation_meta("Random Typewriter", False, 0.500, "7145435525799744002", "7145435525799744002", "49221bfc90329890d81c3612e6222a51")
|
||||
Fly_In = Animation_meta("Fly In", False, 0.500, "7037028196277031425", "7037028196277031425", "33d2b2dfaf2e62325e4027463ce5bfbe")
|
||||
Chroma_Type = Animation_meta("Chroma Type", False, 0.500, "7402175560819937809", "7402175560819937809", "e3283c9eb0db927fa7cdb6d138030814")
|
||||
Spiral = Animation_meta("Spiral", False, 0.500, "6799873891352187406", "6799873891352187406", "9f8838b63890f4522ccce6b344fe4509")
|
||||
Blur = Animation_meta("Blur", False, 0.500, "6923135604519604737", "6923135604519604737", "a5f4d3998c0648ec65c03251506bd0a0")
|
||||
Type_2 = Animation_meta("Type 2", False, 0.500, "6724920636403094028", "6724920636403094028", "8bd0b8cec591907fc2a56682d8e14274")
|
||||
Type_1 = Animation_meta("Type 1", False, 0.500, "6724920249654710791", "6724920249654710791", "c539514fc398e05a6cf4d7c196f78305")
|
||||
Float_Down = Animation_meta("Float Down", False, 0.500, "7094880375222047233", "7094880375222047233", "b312472b5a680f49d2d1229cfe07f49d")
|
||||
Zoom_In = Animation_meta("Zoom In", False, 0.500, "6724919499042066958", "6724919499042066958", "43a8026720374e330daf7b70a91ac7ce")
|
||||
Open = Animation_meta("Open", False, 0.500, "6943606694240850434", "6943606694240850434", "229acba913af69794139dfd359fedb92")
|
||||
Blur_to_the_Left = Animation_meta("Blur to the Left", False, 0.500, "7131932467698602497", "7131932467698602497", "ee5716b5bf9ef16fd99dd7d2d89dbefc")
|
||||
Karaoke = Animation_meta("Karaoke", False, 0.500, "6771294855785091588", "6771294855785091588", "1cb64a1965c8199c61442d25989078d9")
|
||||
Flicker = Animation_meta("Flicker", False, 0.500, "7040020396136993282", "7040020396136993282", "1c34ef7d819c78f05977685370e320ec")
|
||||
Flip_and_jump = Animation_meta("Flip and jump", False, 0.500, "6865175746420150792", "6865175746420150792", "4d9af68136aafd135073befdbfca7e39")
|
||||
Flutter = Animation_meta("Flutter", False, 0.500, "7094880213590348290", "7094880213590348290", "ab2dbbce0edfafdaad328707d6864bae")
|
||||
Dissolve_Down = Animation_meta("Dissolve Down", False, 0.500, "7037028613287318018", "7037028613287318018", "766af9230fe82c84e551c1f1100aac58")
|
||||
Wipe_Right = Animation_meta("Wipe Right", False, 0.500, "6771288500240126478", "6771288500240126478", "137e4f6e581377e6c98b18e3d29694a2")
|
||||
Blur_Wipe_Right = Animation_meta("Blur Wipe Right", False, 0.500, "6909714649797628417", "6909714649797628417", "b11884681d795aaf41a34f28b7b8d51f")
|
||||
Slingshot = Animation_meta("Slingshot", False, 0.500, "6862897343176380942", "6862897343176380942", "f4127b21d8ec8cca132953398388eec2")
|
||||
Blur_to_the_right = Animation_meta("Blur to the right", False, 0.500, "7203606035557257730", "7203606035557257730", "0eff42d557a9d5c8c9974daef189b570")
|
||||
Jolt_Forward = Animation_meta("Jolt Forward", False, 0.500, "7086778010807833090", "7086778010807833090", "53dadd15e28f30461bea6ab0244f1082")
|
||||
Rotation_Verbatim = Animation_meta("Rotation Verbatim", False, 0.500, "7131932250437849602", "7131932250437849602", "17a78b3b5c193a3e30431946a8cbd696")
|
||||
Elastic_Telescopic_II = Animation_meta("Elastic Telescopic II", False, 0.500, "7161336180561154562", "7161336180561154562", "9b0bdc149bbc541e93cddaf94b1dcaa0")
|
||||
Flip_Verbatim = Animation_meta("Flip Verbatim", False, 0.500, "7131932337893282306", "7131932337893282306", "cdf2df541dea807f4bcb29ede73dd766")
|
||||
Zoom_Out = Animation_meta("Zoom Out", False, 0.500, "6724921217721045515", "6724921217721045515", "0b58ad7d0d7cc93080e7bedfd0caa222")
|
||||
Trail = Animation_meta("Trail", False, 0.500, "7231492571321602562", "7231492571321602562", "40884dac1fc802d207c69b05e2987d4d")
|
||||
Slide_Right = Animation_meta("Slide Right", False, 0.500, "6724920136056181256", "6724920136056181256", "c49f75ef6e0f886e570f68a00f7c1312")
|
||||
Clock_wipe = Animation_meta("Clock wipe", False, 0.500, "6840689010034086407", "6840689010034086407", "5df8f0147561089a7e98c2e15b31c15c")
|
||||
Flipping = Animation_meta("Flipping", False, 0.500, "7221379732166676993", "7221379732166676993", "c863f3afe0d73cccc19188d6313b1dae")
|
||||
Squeeze = Animation_meta("Squeeze", False, 0.500, "6779879712261935619", "6779879712261935619", "87deb51be366cd3e83fb4a04c6ea2240")
|
||||
Fold = Animation_meta("Fold", False, 0.500, "7131933414189437441", "7131933414189437441", "9f65c45595fa8c0002f7f49a61637ff2")
|
||||
Roll_In = Animation_meta("Roll In", False, 0.500, "7037027812351414786", "7037027812351414786", "c877f5d0bb23720b302244e7e9b9f0bc")
|
||||
Judder_Up = Animation_meta("Judder Up", False, 0.500, "7086778112611979777", "7086778112611979777", "b3ea1be4937b7cd032f1775d98b1f06e")
|
||||
Type_3 = Animation_meta("Type 3", False, 0.500, "6724920521462387207", "6724920521462387207", "5916ce3ef5af2ecc787b16353dd32074")
|
||||
Bounce_In = Animation_meta("Bounce In", False, 0.500, "6887766069587481090", "6887766069587481090", "83cd5b21c6a1cea2d11aac09bf328d1b")
|
||||
Slide_Up = Animation_meta("Slide Up", False, 0.500, "6763470111253729803", "6763470111253729803", "7369b47c2bd5267948b0422f69f686c0")
|
||||
Blow_In = Animation_meta("Blow In", False, 0.500, "6873386357952090626", "6873386357952090626", "39fb9e67642a084fc3a22944d28bbbba")
|
||||
Wobble = Animation_meta("Wobble", False, 0.500, "7095603439912096258", "7095603439912096258", "d9099a94194f6a60366a2115ecca7646")
|
||||
Bounce_from_TR = Animation_meta("Bounce from TR", False, 0.500, "7080126619364364801", "7080126619364364801", "ccff88fa7a5e6a545e8ff343593ae255")
|
||||
Showing_Right = Animation_meta("Showing Right", False, 0.500, "7149113362096329217", "7149113362096329217", "6f8e0a5cd98c44b79f9ec09b0b913059")
|
||||
Showing_Up = Animation_meta("Showing Up", False, 0.500, "7149113228788765186", "7149113228788765186", "8c4b711fc99437b6b4aebf575ca3e552")
|
||||
Mini_Zoom = Animation_meta("Mini Zoom", False, 0.500, "6763469998330483213", "6763469998330483213", "6f5ec0bb82bfd24a72706e2006c0e806")
|
||||
Set_to_the_Right = Animation_meta("Set to the Right", False, 0.500, "7145435431297880577", "7145435431297880577", "5a78f1024ecdc9a6b69220eac58a0963")
|
||||
Slide_Left = Animation_meta("Slide Left", False, 0.500, "7403255792146584081", "7403255792146584081", "6623efc403e59006d52ef89ca8cab5fe")
|
||||
Bounce_In_TL = Animation_meta("Bounce In TL", False, 0.500, "7080126868136923650", "7080126868136923650", "7cfe7399370f640c938a4226b688e0a3")
|
||||
Wipe_Up = Animation_meta("Wipe Up", False, 0.500, "6774625910067827212", "6774625910067827212", "b18e5a9811cc39acd1342b404f67235b")
|
||||
Random_Bounce = Animation_meta("Random Bounce", False, 0.500, "7046650374005985793", "7046650374005985793", "08211765b28b4f74406367e8998ef907")
|
||||
Blur_Wipe_Left = Animation_meta("Blur Wipe Left", False, 0.500, "6909714445518246401", "6909714445518246401", "c6b81d117c36f8028015e1ba72afeabd")
|
||||
Sunrise = Animation_meta("Sunrise", False, 0.500, "6779084126457696776", "6779084126457696776", "5135096b047fe38ea94febe82b97ffde")
|
||||
Wipe_Down = Animation_meta("Wipe Down", False, 0.500, "6774626192990409224", "6774626192990409224", "da43ba0acb3e0f247373c40e51ec0952")
|
||||
Wipe_In_LR = Animation_meta("Wipe In LR", False, 0.500, "7095603601355051521", "7095603601355051521", "f83eb09e4eebd66587abf023688739a5")
|
||||
Wipe_Left = Animation_meta("Wipe Left", False, 0.500, "6774626830038077960", "6774626830038077960", "c3b5c38587edc82914b1bbb9c8b1b070")
|
||||
Slide_Left_1 = Animation_meta("Slide Left", False, 0.500, "6763470195894784525", "6763470195894784525", "7715ee0fb10ee4db78e3e84ca6076c1d")
|
||||
Slide_Down = Animation_meta("Slide Down", False, 0.500, "7403256520537805329", "7403256520537805329", "cf042bc2dd475dc6166e33f43b116641")
|
||||
Slide_Up_1 = Animation_meta("Slide Up", False, 0.500, "7275682326678344193", "7275682326678344193", "9ab223e5e9a0b9611b04062048173de9")
|
||||
Showing_Left = Animation_meta("Showing Left", False, 0.500, "7149113444279521793", "7149113444279521793", "b4119cf3405c71bc556e1c5562e22d01")
|
||||
Slide_Down_1 = Animation_meta("Slide Down", False, 0.500, "6724921985282871816", "6724921985282871816", "4ef6c5a0fc93b203e40cb38c8bbdd7bb")
|
||||
Boing = Animation_meta("Boing", False, 0.500, "6873386210002211330", "6873386210002211330", "cbc371fed78af934a95433cef2923b96")
|
||||
Spring = Animation_meta("Spring", False, 0.500, "6887766363436225025", "6887766363436225025", "feb1261746ba3792d367c214383fdaf0")
|
||||
Ease_In_Right = Animation_meta("Ease In Right", False, 0.500, "7054065145990877698", "7054065145990877698", "09369ebe9ac7df7d95981647795b726d")
|
||||
Turn_Horizontal = Animation_meta("Turn Horizontal", False, 0.500, "7063344665025581570", "7063344665025581570", "e7b57129e1b9b24b14e5c6257e03ad94")
|
||||
Grow = Animation_meta("Grow", False, 0.500, "6873386301182185986", "6873386301182185986", "6a574fce0c4041c452997d059ebe018c")
|
||||
Showing_Down = Animation_meta("Showing Down", False, 0.500, "7149113292747706881", "7149113292747706881", "a7b05a11c6bdc7010cc4dc7f1d276407")
|
||||
Flip_up = Animation_meta("Flip up", False, 0.500, "7195849719673786882", "7195849719673786882", "0cf2050093a2bbe736ab4b2ee9002dcf")
|
||||
|
||||
|
||||
class CapCut_Text_outro(Effect_enum):
|
||||
"""CapCut自带的文字出场动画, 默认时长为0.5秒"""
|
||||
|
||||
Fade_Out = Animation_meta("Fade Out", False, 0.500, "6724919382104871427", "6724919382104871427", "6ecc8fa1d956c3e14c84cdc0679982a9")
|
||||
Blur = Animation_meta("Blur", False, 0.500, "6923134492760609282", "6923134492760609282", "a455f364ad8079365e4d9c880ee58902")
|
||||
Zoom_In = Animation_meta("Zoom In", False, 0.500, "6724919767200698884", "6724919767200698884", "31f07f6c0980eef948904395c7ba4bd4")
|
||||
Typewriter = Animation_meta("Typewriter", False, 0.500, "7210980400984756738", "7210980400984756738", "3f2d4916f48390652f4abaff69742c0b")
|
||||
Zoom_In_2 = Animation_meta("Zoom In 2", False, 0.500, "7054480833201050114", "7054480833201050114", "826379869afa4037da8bbcafc1e8a6c7")
|
||||
Dissolve_Up = Animation_meta("Dissolve Up", False, 0.500, "7037028782544261634", "7037028782544261634", "11ea5c712b93ca8d0df41c2378073d29")
|
||||
Slide_Down = Animation_meta("Slide Down", False, 0.500, "7403256664498901520", "7403256664498901520", "30080fd3aae7a739d431c59387afdd4f")
|
||||
Dissolve = Animation_meta("Dissolve", False, 0.500, "6873386286082691586", "6873386286082691586", "46389f9f5f72e1b58020a0b8293a23b9")
|
||||
Slide_Up = Animation_meta("Slide Up", False, 0.500, "6763873533115240968", "6763873533115240968", "bbec5aa1ddf8df26276b99cfd9996d76")
|
||||
Flicker = Animation_meta("Flicker", False, 0.500, "7040020559656129025", "7040020559656129025", "91be98f44180d877cbcb2b515315eb01")
|
||||
Blur_to_the_Left = Animation_meta("Blur to the Left", False, 0.500, "7131932497641738753", "7131932497641738753", "02ee1da62468714f7b17a671ee61acf0")
|
||||
Zoom_Out = Animation_meta("Zoom Out", False, 0.500, "7428455252141100293", "7428455252141100293", "4caa7ab406013ea4c9febad3ab95cabf")
|
||||
Slide_Down_1 = Animation_meta("Slide Down", False, 0.500, "6724919284893487619", "6724919284893487619", "4b1190ca81551d872f1d6b0e2ce5db2b")
|
||||
Mini_Zoom = Animation_meta("Mini Zoom", False, 0.500, "6763469915518145032", "6763469915518145032", "1e293df954586a261a11576481dd8454")
|
||||
Bounce_Out = Animation_meta("Bounce Out", False, 0.500, "6887765964515971585", "6887765964515971585", "465f833066158d62db9e54df6cd77354")
|
||||
Wipe_Left = Animation_meta("Wipe Left", False, 0.500, "6774626748177846791", "6774626748177846791", "1160d9bcc8a158a65441bcfc9603bd00")
|
||||
Expand = Animation_meta("Expand", False, 0.500, "6779879836916650509", "6779879836916650509", "9691c2574e653e0263365df7446a8af9")
|
||||
Throw_Back = Animation_meta("Throw Back", False, 0.500, "7233110388701663745", "7233110388701663745", "0203e194e3bcf10f7f96fde73dc350f3")
|
||||
Slide_Left = Animation_meta("Slide Left", False, 0.500, "6763873602476446221", "6763873602476446221", "a193ecedf73b2b27616ee7da4f599b9b")
|
||||
Slide_Up_1 = Animation_meta("Slide Up", False, 0.500, "7403256763803243024", "7403256763803243024", "126062701f0797dedd8019fdf82969d5")
|
||||
Type_1 = Animation_meta("Type 1", False, 0.500, "6763469696260903435", "6763469696260903435", "628234381485fb1dd576eeb48c85a091")
|
||||
Dilute = Animation_meta("Dilute", False, 0.500, "7044433705141539329", "7044433705141539329", "fe2cfbc08c330517caa8b602187ced07")
|
||||
Type_2 = Animation_meta("Type 2", False, 0.500, "6763469767555682823", "6763469767555682823", "83076ce7cda24efdaca9731b112fb097")
|
||||
Horizontal_Close = Animation_meta("Horizontal Close", False, 0.500, "6943606672514355714", "6943606672514355714", "e7048d848c90a6e15fbc9349dad6f95c")
|
||||
Slide_Right = Animation_meta("Slide Right", False, 0.500, "6724920744431587853", "6724920744431587853", "4026a211f18b0fc6ab9e10d09c8922ba")
|
||||
Disband_to_the_Left = Animation_meta("Disband to the Left", False, 0.500, "7145435368777585153", "7145435368777585153", "46b117e1d9fc552e574958fcde072a53")
|
||||
Random_Typewriter = Animation_meta("Random Typewriter", False, 0.500, "7145435491129627137", "7145435491129627137", "e667d209a1c3ab8dfdfb00f2f014ec9d")
|
||||
Flutter = Animation_meta("Flutter", False, 0.500, "7094881109661454849", "7094881109661454849", "2e58579b330dbccc4491c5f0a8cf4a8a")
|
||||
Fold = Animation_meta("Fold", False, 0.500, "7131933395650613762", "7131933395650613762", "ccce629bcf7f98a8de4d4e1a2228d11a")
|
||||
Trail = Animation_meta("Trail", False, 0.500, "7231863704063578626", "7231863704063578626", "20d1992e9f7b67bedf1811c0811b1e5c")
|
||||
Chromatic_Aberration_Tailing = Animation_meta("Chromatic Aberration Tailing", False, 0.500, "7161314207609131522", "7161314207609131522", "998e6b4aee4a58c7810ae427f4ef2a6e")
|
||||
Roll_Out = Animation_meta("Roll Out", False, 0.500, "7037027990873575938", "7037027990873575938", "f25af0cdef9584d588584b3765350f64")
|
||||
Pop_Down = Animation_meta("Pop Down", False, 0.500, "7145435533580177921", "7145435533580177921", "751b7e005e3ec297f5d3d2c40664f585")
|
||||
Slingshot = Animation_meta("Slingshot", False, 0.500, "6862897350478664200", "6862897350478664200", "45f66e1fa1a3b79968b3749275bab10c")
|
||||
Faulty_text = Animation_meta("Faulty text", False, 0.500, "6870325383217025538", "6870325383217025538", "71a23656184bc8438f4fa22425192185")
|
||||
Sunset = Animation_meta("Sunset", False, 0.500, "6779084194392838670", "6779084194392838670", "662eea25ba7d450d9a91febf43f22f7f")
|
||||
Ink_Print = Animation_meta("Ink Print", False, 0.500, "7131933235000381953", "7131933235000381953", "ffde7ad26438a2a7e38c55cbfc2a06e6")
|
||||
Wipe_Right = Animation_meta("Wipe Right", False, 0.500, "6783908820176343566", "6783908820176343566", "a48325fce55a7a419b351c8a9826c7a0")
|
||||
Bounce_Out_TR = Animation_meta("Bounce Out TR", False, 0.500, "7080126748129497601", "7080126748129497601", "c686d80fd584cd755a3a9a8168b90c91")
|
||||
Glitch = Animation_meta("Glitch", False, 0.500, "7077812264559972865", "7077812264559972865", "ef29a8a0678cfc09c6888cf3cd0cd1fe")
|
||||
Stroke_Fill = Animation_meta("Stroke Fill", False, 0.500, "7239696026389451266", "7239696026389451266", "88e26415caea51e4cd4453f113e4ce82")
|
||||
Wipe_Down = Animation_meta("Wipe Down", False, 0.500, "6774626081791021576", "6774626081791021576", "4dafd6a7cbde862044fcbc543ecd818a")
|
||||
Flip_Down = Animation_meta("Flip Down", False, 0.500, "7198418239955669506", "7198418239955669506", "fb59d5300e87e87718c3fd2f956df6f1")
|
||||
Blur_Erase_Right = Animation_meta("Blur Erase Right", False, 0.500, "6909715076459008514", "6909715076459008514", "b55ab5e5eb7c4b540f3065e25c5b2862")
|
||||
Turn_Horizontal = Animation_meta("Turn Horizontal", False, 0.500, "7063344803768963585", "7063344803768963585", "d7e4694ce021064f57fb9d56ea9ca955")
|
||||
Flipping = Animation_meta("Flipping", False, 0.500, "7221823093847626241", "7221823093847626241", "07d60e408004cba91944a6fbe3ec570d")
|
||||
Grow = Animation_meta("Grow", False, 0.500, "6873386318026510850", "6873386318026510850", "e6ae4e1fc5ade7bd8765ef6d918f5f6f")
|
||||
Ease_Out_Right = Animation_meta("Ease Out Right", False, 0.500, "7054065225024147969", "7054065225024147969", "4efcd0a37ec562695391e6e24ff805aa")
|
||||
Spring = Animation_meta("Spring", False, 0.500, "6887766592759796225", "6887766592759796225", "0bed65b365b11c525396282d2d6070c0")
|
||||
Blur_Erase_Left = Animation_meta("Blur Erase Left", False, 0.500, "6909714891058188801", "6909714891058188801", "e491ca3b41a5dba9af4db1ca6b72500f")
|
||||
Wipe_Up = Animation_meta("Wipe Up", False, 0.500, "6774625752794010115", "6774625752794010115", "d9b04e37f86d6b5cf456f396648e11d4")
|
||||
Bounce_Out_TL = Animation_meta("Bounce Out TL", False, 0.500, "7080126963121132033", "7080126963121132033", "2901b7202d9ac40d48bd5f242ad2edac")
|
||||
Vrille = Animation_meta("Vrille", False, 0.500, "6799874105710481927", "6799874105710481927", "e6e1a2239d894b408e41341a6ca578ca")
|
||||
Blow_Away = Animation_meta("Blow Away", False, 0.500, "6873386371508081154", "6873386371508081154", "d1292de2cfc57d0ca12fdbafb4e0bca2")
|
||||
Type_3 = Animation_meta("Type 3", False, 0.500, "6763469838368117256", "6763469838368117256", "3f77a87e46ee1b50cd0ac207809c4c24")
|
||||
Rotation_Verbatim = Animation_meta("Rotation Verbatim", False, 0.500, "7131932325171958273", "7131932325171958273", "ee29d8b9e06a471972f36734c53dbea8")
|
||||
Fly_Out = Animation_meta("Fly Out", False, 0.500, "7037028379068994050", "7037028379068994050", "324c695abdd43e1ec3506364fce0a087")
|
||||
Float_Up = Animation_meta("Float Up", False, 0.500, "7094881236941804033", "7094881236941804033", "3513093fd914fcccfa87cb98a410062e")
|
||||
Spin_Out_1 = Animation_meta("Spin Out 1", False, 0.500, "6763873732143354376", "6763873732143354376", "ffc35db86b29aee7a0a4342ea5ed059f")
|
||||
Spin_Out_2 = Animation_meta("Spin Out 2", False, 0.500, "6775804032318444045", "6775804032318444045", "dc208cb851dff052cac198a5989f27b2")
|
||||
Slide_Down_2 = Animation_meta("Slide Down", False, 0.500, "7275978484902531585", "7275978484902531585", "fa4aaf84b182425eed4e330ac03ecdbd")
|
||||
Flip_Verbatim = Animation_meta("Flip Verbatim", False, 0.500, "7131932349456978433", "7131932349456978433", "ffc81a4b0c44427fbfd60984f7ddcdc2")
|
||||
Boing = Animation_meta("Boing", False, 0.500, "6873386227546984961", "6873386227546984961", "f2882bcfc0abc3b0c53b39649a2c4224")
|
||||
Random_Bounce = Animation_meta("Random Bounce", False, 0.500, "7047418513429893633", "7047418513429893633", "c260caa85b16e7d471ddeb2015cdf3f3")
|
||||
Wave_out = Animation_meta("Wave out", False, 0.500, "6918927254676312578", "6918927254676312578", "66ea8431aa7bc02f3b4d3219a127b313")
|
||||
Elastic_Telescopic_II = Animation_meta("Elastic Telescopic II", False, 0.500, "7163958556784333313", "7163958556784333313", "9b225f4fafa2341876eec98ba91c89ee")
|
||||
Clock_wipe = Animation_meta("Clock wipe", False, 0.500, "6840698265277567496", "6840698265277567496", "e2faf1635350ccf31739618a257d87ad")
|
||||
Jump_and_flip = Animation_meta("Jump and flip", False, 0.500, "6865176065514410503", "6865176065514410503", "f578720479df7746fa067199a1e4ea8b")
|
||||
|
||||
|
||||
class CapCut_Text_loop_anim(Effect_enum):
|
||||
"""CapCut自带的文字循环动画, 默认时长为0.5秒"""
|
||||
|
||||
Flare = Animation_meta("Flare", False, 0.500, "7128311749186425346", "7128311749186425346", "494af236e19eefc9895a4cc2b8d20736")
|
||||
Wobble_2 = Animation_meta("Wobble 2", False, 0.500, "7054065409686770178", "7054065409686770178", "8d180f0ad5ff173a44f9142baeee536c")
|
||||
Wave = Animation_meta("Wave", False, 0.500, "6724927688047333891", "6724927688047333891", "c2d44ce51bddfa48d479f2d2d37b5a7f")
|
||||
Color_Glitch = Animation_meta("Color Glitch", False, 0.500, "6835878163575214605", "6835878163575214605", "e0295a9f4f19fe21692c405f7c00d1e5")
|
||||
Enlarge_Letters = Animation_meta("Enlarge Letters", False, 0.500, "6909707735827223042", "6909707735827223042", "ccd09fe5c4969b5f195099a8ec2ff418")
|
||||
Converge = Animation_meta("Converge", False, 0.500, "7402173132787683841", "7402173132787683841", "ee68176782c8b62a207c04f4a979957a")
|
||||
Scroll_Up = Animation_meta("Scroll Up", False, 0.500, "6790246884683289102", "6790246884683289102", "9aa4e0d045c61892c2b2e3fdfaf1b093")
|
||||
Flash = Animation_meta("Flash", False, 0.500, "6724921437930394120", "6724921437930394120", "6fe3f0fcd14e11e70b7510f42444b86c")
|
||||
Jiggly = Animation_meta("Jiggly", False, 0.500, "6918928011601383937", "6918928011601383937", "b0a3224256abcedf4507f2e93e8dfc1e")
|
||||
Gushing = Animation_meta("Gushing", False, 0.500, "7145435416810754562", "7145435416810754562", "76cc53a7bb20385d208c858a13cf06fd")
|
||||
Wobbly_Projector_1 = Animation_meta("Wobbly Projector 1", False, 0.500, "7075252119409791490", "7075252119409791490", "4930ab2d5f8f174782d352e36f4d6602")
|
||||
Wave_3 = Animation_meta("Wave 3", False, 0.500, "7080126475633955329", "7080126475633955329", "47c2db2f5ad8ba96cfb5f1279c019464")
|
||||
Ink_Print = Animation_meta("Ink Print", False, 0.500, "7131932098310443521", "7131932098310443521", "fbd35399a1880d2637731d20eb619d29")
|
||||
Donut = Animation_meta("Donut", False, 0.500, "7075252014443139585", "7075252014443139585", "73803bb6fddd47749d1ac09334be8bfc")
|
||||
Shout_Out = Animation_meta("Shout Out", False, 0.500, "7145435518468100610", "7145435518468100610", "fe67ad0c257c8c9057971f1a0b3e429d")
|
||||
Pulse = Animation_meta("Pulse", False, 0.500, "6724919955654971918", "6724919955654971918", "1b9a454256f041c19f723ba27358740b")
|
||||
Tremble = Animation_meta("Tremble", False, 0.500, "6790246693674684942", "6790246693674684942", "383dabd75d7fe7985d990ebb34d63732")
|
||||
Super_Wavy_2 = Animation_meta("Super Wavy 2", False, 0.500, "7070118615852257793", "7070118615852257793", "bdd007527d0eda9d64bfbf6aef103e97")
|
||||
Font_Reel = Animation_meta("Font Reel", False, 0.500, "7402179921738469905", "7402179921738469905", "06c685c00a9c1a7a484c7841ac45742a")
|
||||
VHS = Animation_meta("VHS", False, 0.500, "7402174665675772417", "7402174665675772417", "f82d0f25b2cc4f0696dce7d97c7b02be")
|
||||
Space_Type = Animation_meta("Space Type", False, 0.500, "7402174374549131777", "7402174374549131777", "bb717e125d34532ec904d1bc01ec25da")
|
||||
Wobble_3 = Animation_meta("Wobble 3", False, 0.500, "7077492231011045889", "7077492231011045889", "4aff94a92515e98e1abb3328c254d1bf")
|
||||
Top_Arch = Animation_meta("Top Arch", False, 0.500, "7086778564552430081", "7086778564552430081", "9fb14748e774977b21030e730b4d8343")
|
||||
Rotate = Animation_meta("Rotate", False, 0.500, "7063296016895709697", "7063296016895709697", "e81fcebf0885fa5d698f6ca7d027a556")
|
||||
Random_Bounce = Animation_meta("Random Bounce", False, 0.500, "7047418055487394306", "7047418055487394306", "47bc0418ebda9df7a65094758aed8b3b")
|
||||
Jump = Animation_meta("Jump", False, 0.500, "6724920002958332420", "6724920002958332420", "784250e657b472a46a3b3ce0a838e4f7")
|
||||
Shake = Animation_meta("Shake", False, 0.500, "7161320851327947265", "7161320851327947265", "ea2f688a517d18a9de5912fa09f3bd56")
|
||||
Wave_2 = Animation_meta("Wave 2", False, 0.500, "7070118516619219457", "7070118516619219457", "62245c9799544b75258689eb1ff222bb")
|
||||
Scrolling = Animation_meta("Scrolling", False, 0.500, "7218822076507886082", "7218822076507886082", "1ca0b292402789b45b6b3aaf2e2d9ea0")
|
||||
Strong_Tremble_1 = Animation_meta("Strong Tremble 1", False, 0.500, "7075252522998305281", "7075252522998305281", "0af5d6c9651c04f38e33cbe6710205dd")
|
||||
Jiggle = Animation_meta("Jiggle", False, 0.500, "6887766216576864770", "6887766216576864770", "29ddfc38309d3914e53d5ea99f3ca33a")
|
||||
Rotate_1 = Animation_meta("Rotate", False, 0.500, "6763900973946507784", "6763900973946507784", "151421d4de4d49e65b050cb413482cd5")
|
||||
Dance = Animation_meta("Dance", False, 0.500, "6840710593289130503", "6840710593289130503", "61f24344eb8bf86582d6140ad985ef14")
|
||||
Super_Wavy = Animation_meta("Super Wavy", False, 0.500, "6857036499389518349", "6857036499389518349", "87f7332abda9ac46d5dc81f69c48daab")
|
||||
Emotional_Loading = Animation_meta("Emotional Loading", False, 0.500, "7145435536323252737", "7145435536323252737", "bd57e018dc5d1ed418826460407499c4")
|
||||
Retro_BW = Animation_meta("Retro B&W", False, 0.500, "7402175225015570945", "7402175225015570945", "4bc57fba68e0cce14e2ea8ab652dabc2")
|
||||
Wobble = Animation_meta("Wobble", False, 0.500, "6764189482871689742", "6764189482871689742", "82a2b88dc69ce9f9a36f975968649d5b")
|
||||
Pixel_Bounce = Animation_meta("Pixel Bounce", False, 0.500, "7128308949710803458", "7128308949710803458", "e989174c257abde2caa0a923f6181b37")
|
||||
Swing = Animation_meta("Swing", False, 0.500, "6724921579517514248", "6724921579517514248", "320b71150105629f7ab1b318716181eb")
|
||||
Fold = Animation_meta("Fold", False, 0.500, "7067799306392048129", "7067799306392048129", "c9b3ef10e455a3916dbef47a7f711eaa")
|
||||
Trailing_Beating = Animation_meta("Trailing Beating", False, 0.500, "7160943125341409793", "7160943125341409793", "3275b0c50bf50725148ffa4e6f168031")
|
||||
Pressing = Animation_meta("Pressing", False, 0.500, "7145435411911807489", "7145435411911807489", "4f01b8c42b2d4a26a89aa528e6cc1544")
|
||||
Page_Turning_I = Animation_meta("Page Turning I", False, 0.500, "7179117105252405762", "7179117105252405762", "8e4559d96b415b5c1ec0748b8a138f4e")
|
||||
Bullet_Screen = Animation_meta("Bullet Screen", False, 0.500, "7131931877975265794", "7131931877975265794", "0e40f8536ac38d14811e8eb5b1a7c792")
|
||||
Wiper = Animation_meta("Wiper", False, 0.500, "6799874389669057037", "6799874389669057037", "6a4c40e24db5027cb42892d8ade9df38")
|
||||
Shake_1 = Animation_meta("Shake 1", False, 0.500, "6724920869363126795", "6724920869363126795", "8af4da60a802e3ca6c9fe2184fbe22d0")
|
||||
Blocks = Animation_meta("Blocks", False, 0.500, "7402172635615859217", "7402172635615859217", "05c3c10997b885c71ed0dd64aff14dd2")
|
||||
Scream = Animation_meta("Scream", False, 0.500, "7145435416013836801", "7145435416013836801", "04933b5e575c54cbf09c57c5e933f0ec")
|
||||
Strong_Tremble_2 = Animation_meta("Strong Tremble 2", False, 0.500, "7075252650312208897", "7075252650312208897", "7092c0f011294519b95e7890deab7bc4")
|
||||
Flip = Animation_meta("Flip", False, 0.500, "6763897586328801805", "6763897586328801805", "e4983ce92d02628087780832ef631c7d")
|
||||
Wobbly_Projector_2 = Animation_meta("Wobbly Projector 2", False, 0.500, "7075252258757153281", "7075252258757153281", "9df9af3c2c79411a4018ec0cb4f027d9")
|
||||
Wobbly_Projector_3 = Animation_meta("Wobbly Projector 3", False, 0.500, "7075252420023947777", "7075252420023947777", "8a8221e8a954c2b9b453b8fc89cd7707")
|
||||
Jump_Pieces = Animation_meta("Jump Pieces", False, 0.500, "7402172473166270992", "7402172473166270992", "922ca4e87c7eed7e60d062c18e928bc6")
|
||||
238
pyJianYingDraft/metadata/capcut_transition_meta.py
Normal file
238
pyJianYingDraft/metadata/capcut_transition_meta.py
Normal file
@@ -0,0 +1,238 @@
|
||||
from .effect_meta import Effect_enum
|
||||
from .transition_meta import Transition_meta
|
||||
|
||||
class CapCut_Transition_type(Effect_enum):
|
||||
"""CapCut自带的转场效果类型"""
|
||||
|
||||
Montage_Snippets = Transition_meta("Montage Snippets", False, "7481553072678784311", "460B9343-B792-4c38-B6F5-6886C031B8D2", "c0cbbcfab2b63efeac02dedc1929da3e", 2.000000, True)
|
||||
"""默认时长: 2.00s"""
|
||||
Mix = Transition_meta("Mix", False, "6724845717472416269", "CE454E9E-9C57-43c5-9E80-B46A6A495D10", "7b53f4c008c4c684fccf8c7d4d46cc92", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Mix_1 = Transition_meta("Mix", False, "6943605272933831169", "2C1C4FD5-A421-43a1-8A0B-3A7AF421761F", "6f18fb242b64f9641da79aa773a33687", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Mix_2 = Transition_meta("Mix", False, "6943605272933831169", "3C343329-8D98-4429-A849-52F6567233DF", "6f18fb242b64f9641da79aa773a33687", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Black_Fade = Transition_meta("Black Fade", False, "6724239388189921806", "7CBE3442-7B48-4a73-9391-C74FB7580D30", "3bca53e9f3dfa2c184fbee96438ea097", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Then_and_Now = Transition_meta("Then and Now", False, "7012818976015127041", "8811269D-67E1-4783-9E1C-14F27DE06021", "ce3cfe333baf3493f6a3714c08eaae12", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
White_Flash = Transition_meta("White Flash", False, "6724845376098013708", "B5F63066-4B98-4c8a-B4AD-1398E1D313F2", "b033ea56618d5b0f098071fb326bb02a", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Dissolve = Transition_meta("Dissolve", False, "6724846004274729480", "392FD26E-A514-4d0f-8950-EA4A20CB407C", "986161b2af25f7aa752278aa8b39c7b7", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Dissolve_1 = Transition_meta("Dissolve", False, "6724846004274729480", "5B2D1EF0-E00B-43b5-8762-E85B5CC851A2", "986161b2af25f7aa752278aa8b39c7b7", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Gradient_Wipe = Transition_meta("Gradient Wipe", False, "6923134021744464386", "DDA0714D-730D-499d-AED1-05BA6455ED35", "2fff9b60c929559bce574ab8ef2c14a7", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Dissolve_II = Transition_meta("Dissolve II", False, "6724866927933526542", "85592C7A-A74A-49fe-9ECD-8BD4707346D2", "8179e342f9b24dd1817c56f7ef1f8f9b", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Dissolve_III = Transition_meta("Dissolve III", False, "6724867032312975875", "A020BA55-B7F4-4502-9BD4-AD0771812BD5", "293a03bd140d09b0c616f879bda235e1", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Black_smoke = Transition_meta("Black smoke", False, "6886275127743353346", "90218FDB-E10B-4bb5-86B8-3E35CB4F14C1", "fa02f80c28a9671a206c2ccf17b41c58", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
White_smoke = Transition_meta("White smoke", False, "6886274983962612226", "ED48A507-B76C-409f-AF58-A0F6A79B1305", "9b679b32ec03c42932fa37b10c141bda", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
BW_Flash = Transition_meta("B&W Flash", False, "7481552579042774278", "18AE2008-538B-40ca-8B3D-17B651213554", "ca293bf055b3ff4fdd6d8ff720d47322", 2.000000, True)
|
||||
"""默认时长: 2.00s"""
|
||||
Rainbow_Warp = Transition_meta("Rainbow Warp", False, "7480764852131155206", "B69CCBDA-E788-41b7-9889-7085C31B5588", "c19609823e3c48b75c95969131e48e45", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
RGB_Glitch = Transition_meta("RGB Glitch", False, "7480389949041200390", "7C44F868-52C9-4b15-9F96-E7316A9A3DE9", "4ab3aeca2bc4a82817cf9e978849496d", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Rainbow_Filter = Transition_meta("Rainbow Filter", False, "7480387198152379653", "44E6A5E7-DA3D-4e95-BF5C-EB2078B68F03", "5c5e0e3c721a279c64ba196cf3f944a6", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Urban_Glitch = Transition_meta("Urban Glitch", False, "7480387121325395255", "CC8C88B9-DA60-46e1-AEFF-5907CE1FA557", "48bc6b9d80ab44ada1be807611a0ed23", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Camera_Glow = Transition_meta("Camera Glow", False, "7480386884728917254", "EDA25C90-4EC3-43b5-B35A-02C253AACAB5", "56e4dca1f4540d77784eaf42a3fe6ea5", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
White_Flash_1 = Transition_meta("White Flash", False, "7345079500327096833", "91A17180-5C82-4807-9E1F-0F08CB68B16B", "c1f7073a94d22565ace1ab3023d1c154", 0.400000, True)
|
||||
"""默认时长: 0.40s"""
|
||||
Light_Sweep_II = Transition_meta("Light Sweep II", False, "7224393850444321282", "6A6EEB83-F8ED-4c18-8628-22F9276DF3DD", "1941195d514a2078634b4132f1127f7d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Flash = Transition_meta("Flash", False, "6987208055511323137", "15F94905-7A39-4789-8285-92188260756B", "009f3e9678994c70c3b45e8a5ea4b999", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Light_Beam = Transition_meta("Light Beam", False, "6983988935890309634", "6C2B6DA1-DDD0-4a27-9D87-15857C68B656", "84525ee78728b5cce44c8404d9f50b0d", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Burn = Transition_meta("Burn", False, "7091576396731912705", "5F342C77-D6E5-4f9c-8B28-3236EA47CE38", "da10f2f4ae0aa70ad4d61b2c750aef6b", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Blanch = Transition_meta("Blanch", False, "6952697453275517442", "3402A62F-694A-4844-97A1-01A1EBE672E6", "9fae2e7e4e9b0c3b0da92e35accbd280", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Fold_Over = Transition_meta("Fold Over", False, "7397628078492488209", "B3084812-C914-4873-8E1F-C9C4AFFEE9F4", "091f7995a43fc66fd0a95b2a6b88834f", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Bottom_Left_II = Transition_meta("Bottom Left II", False, "7291513615989871105", "ED60780D-C6B9-4619-AFA3-4F1475D6D83A", "e0296196f0ec6666a33b33fead4f63d6", 0.666666, True)
|
||||
"""默认时长: 0.67s"""
|
||||
Vertical_Blur_II = Transition_meta("Vertical Blur II", False, "7291574063514784257", "27D567C6-A093-463a-A72F-1CDDAB2E2209", "85e381982a94778e003f3acc9527d5cf", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
Fold_Over_1 = Transition_meta("Fold Over", False, "7397628078492488209", "028BE63C-E232-49b9-AC89-7D52AD42B4D7", "091f7995a43fc66fd0a95b2a6b88834f", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Bottom_Left_II_1 = Transition_meta("Bottom Left II", False, "7291513615989871105", "9CD97556-1602-497c-A22B-38F21A66853A", "e0296196f0ec6666a33b33fead4f63d6", 0.666666, True)
|
||||
"""默认时长: 0.67s"""
|
||||
Inhale = Transition_meta("Inhale", False, "7259950322024452610", "A319AE0A-56B0-418b-AF76-454BF6F87A13", "476af19d13e50283042b2f2c3d59f651", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
Shake_3 = Transition_meta("Shake 3", False, "7252670515926536705", "33EED074-6860-488a-9C94-D5B8F07C1CA6", "c1447e068949ba2fb1d8c6738656c2e9", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Rotate_CW_II = Transition_meta("Rotate CW II", False, "7252989706198061569", "7FDC0CB7-1EF6-4625-95E0-115626185F87", "daafcc4b40351ba97bc8c4a2ba33408d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Rotate_CCW_II = Transition_meta("Rotate CCW II", False, "7252989957319430658", "B64D4180-9B0E-4b25-8602-4397D00557D6", "248ab60641bf5ff2760a16c7f0df15d6", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Pull_in = Transition_meta("Pull in", False, "6724226861666144779", "E27206B3-FFA0-4ea4-B6E7-44350CED4574", "4d5a316f2eae582e7d0604b47feb8c32", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Pull_Out = Transition_meta("Pull Out", False, "6724226338418332167", "39411271-04D8-40f1-9DF9-1E0A7DA5CF64", "8d97f1c1a60d9393c97ff4e9da0669ae", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
CW_Swirl = Transition_meta("CW Swirl", False, "6941282502480761346", "E5BF0039-EC93-4529-8D4C-6922E16246B4", "191c91dacfa44e337ac1a02f72514735", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Right = Transition_meta("Right", False, "6724227599616184836", "C3D52822-B616-4e73-9588-AAED851B6CF9", "94ddc5b44c66c523dbf70622efb612d3", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
AntiCW_Swirl = Transition_meta("Anti-CW Swirl", False, "6941282383836484098", "B3E4C41E-A7F3-4463-8A7B-35D5CB32AB50", "de63b182c2c654b2eef98b8681d12f2c", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Transform_Shimmer = Transition_meta("Transform Shimmer", False, "7452646287318454785", "0CEA0FD6-E103-4982-8583-6C2087AB14DF", "486a1593cc532d15663279bd4a127a45", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Twinkle_Zoom = Transition_meta("Twinkle Zoom", False, "7452646287326843393", "15C1A448-AB09-4867-8A9A-DDDD11A5AB27", "7eeeca7c07e67b54519995ebdf71d6fc", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Horizontal_Blur = Transition_meta("Horizontal Blur", False, "7451535587812594193", "63C1D344-D734-4945-A2D8-867AE7559ABC", "38f584c24f4383e9d10037ad4ce6fa00", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Horizontal_Blur_1 = Transition_meta("Horizontal Blur", False, "7451535587812594193", "1F8B47C7-9873-4a99-8005-CDCD3BB92475", "38f584c24f4383e9d10037ad4ce6fa00", 1.466666, True)
|
||||
"""默认时长: 1.47s"""
|
||||
Horizontal_Blur_2 = Transition_meta("Horizontal Blur", False, "7451535587812594193", "BCC3D324-3D51-45bd-9887-5951024C6AF3", "38f584c24f4383e9d10037ad4ce6fa00", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Radial_Blur = Transition_meta("Radial Blur", False, "7215489792597824001", "53E34B82-8CA8-483f-BBE9-EB36EFD0EE1B", "917c209246e975d4f10d9b8c8c78035f", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Blurred_Highlight = Transition_meta("Blurred Highlight", False, "7134999483762348545", "A1C6E234-BAE9-4de6-B659-528933BABFE2", "b48f47c097e83842d1c0f919d9c67af6", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Vertical_Blur = Transition_meta("Vertical Blur", False, "7140916992118100482", "6A89818E-BB6F-4246-AE07-8AFE7313E55D", "f55306a27ff8e0a8ae29584bb661ad73", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Blur = Transition_meta("Blur", False, "6916426617455645186", "C5F81057-B249-4f1c-9F80-050CE6C2B25C", "fc1352435f88c6f284b6c6dce8552ffe", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Woosh = Transition_meta("Woosh", False, "6724239584663704071", "CD580815-D706-4c17-8DA1-D31CDD568A44", "06cc8d49c558d57e21207f68a6a7dbc0", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Particles = Transition_meta("Particles", False, "6873386344463208961", "57FF7625-725F-42e5-B38B-46891069A35E", "3895bd9b5abd7037c3bfc0d2a8a589c9", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Mosaic = Transition_meta("Mosaic", False, "6724866519022440967", "D3BFC8FC-0F55-4ff6-9424-BCE5740E4D2B", "eed93b26d9cd6296b10d2f5065ee396e", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Blink = Transition_meta("Blink", False, "6864867302936941064", "B57A7648-AE5E-420a-8072-1076AF79C58D", "bf695506c8091f7a01ee7b1323a4d601", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Flip_II = Transition_meta("Flip II", False, "7049556888014295553", "38215832-385B-4135-A874-7208224A0552", "b1c8a0ab546d85581327609c5c0a3b1a", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Flip = Transition_meta("Flip", False, "6848792278710882824", "280B7887-CD12-466f-B32C-D3595AC99805", "ff85b6664407c72dbb592f3780a32ac9", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
Left = Transition_meta("Left", False, "6726711499676455435", "9CA0C177-8A1D-410c-9D37-7F6606CD5BB5", "1315a55c2f804d86894e1453976b48fd", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Up = Transition_meta("Up", False, "6724846395116753416", "19845B95-29A4-46a4-9E8D-9863FBA84E01", "df9bc16697464de201a4924de49234a2", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Wipe_Right = Transition_meta("Wipe Right", False, "6724849898857959950", "0CF8046E-31BD-4b4e-94D0-13050511EE07", "316d71f3567673d63575f027e9e9df18", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Open_Horizontally = Transition_meta("Open Horizontally", False, "6724492948144132621", "9A3770E3-2F40-479e-A344-09D9D7378362", "de63aa2d5225bb6a65b5bab8702aa1f5", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Right_1 = Transition_meta("Right", False, "6726711296063967748", "C10E8EAA-41F8-49c4-86CE-BB4D65449A2C", "2712989c4cdece84c2979196c16186a6", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Slide = Transition_meta("Slide", False, "6757982416649851399", "AF0D3666-48D3-4ff0-B836-EB93B174A74A", "b99916e2936aeb2e56892ca617888694", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Slide_1 = Transition_meta("Slide", False, "6757982416649851399", "D3AA4635-FE90-48d7-9B0D-FD6C7E42939A", "b99916e2936aeb2e56892ca617888694", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Wipe_Up = Transition_meta("Wipe Up", False, "6724849456891564557", "07E81171-A3FE-42e7-B4CD-E44CC367D61D", "5d4d41dbfec9fb012d964d124d546e20", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Wipe_Left = Transition_meta("Wipe Left", False, "6724849999336706573", "954E4D5A-40DF-4b87-B4AA-F68DBA2657FA", "ea955d4c6033e6e3720a3c40eb2929bf", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Wipe_Left_1 = Transition_meta("Wipe Left", False, "6724849999336706573", "592F8AA3-394C-4d61-908D-F3C09503CAFD", "ea955d4c6033e6e3720a3c40eb2929bf", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Open_Vertically = Transition_meta("Open Vertically", False, "6726711903684399619", "92F83B7A-AD64-4514-A75A-D1D36686DB9A", "84f91be5a43cc6a9d03505a465418206", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Curling_Wave = Transition_meta("Curling Wave", False, "6858191497280360973", "0873E31A-1DA7-48d1-9185-03E6F5AAAF79", "cf9bac91349a227a6155eca9d94a8af8", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Flame = Transition_meta("Flame", False, "6777178765643485709", "439B818A-D20B-45a4-9D3F-0FAA3E74A6D6", "8e7c247c5ebd58aa5c3582273e9c840b", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Cartoon_Swirl = Transition_meta("Cartoon Swirl", False, "6858191448827761160", "4CDDADDB-5C4E-4523-8FD6-EA442A5284D8", "fa7ba99b13036c0ff167ea3b7d5c31a2", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Blue_Lines = Transition_meta("Blue Lines", False, "6858191605384352263", "456AA927-F3D0-4093-A043-5B600C23D44A", "d4d2996c3f6cf97fb8602f825d98a4da", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Recorder = Transition_meta("Recorder", False, "7071174465245155841", "18B10157-8D51-4360-A35A-42008543438C", "bb0b9fa428e5a3fde828c03022b5082d", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Like = Transition_meta("Like", False, "7071174465245172226", "A1ADAF22-363E-47f4-8D73-4A2E8D91E890", "945ee55ddc4b7c9762b55c0ee302bdce", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Little_Devil = Transition_meta("Little Devil", False, "7078647070499803649", "CBD96057-053F-44f2-ABC8-9B34F37D6557", "c9a87dfafa58fbc0d401fc182fbaf6fc", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Super_Like = Transition_meta("Super Like", False, "7071174465249350146", "F4996065-6334-46a8-A4F2-34C86D8072B0", "e0bd13b237d73eb121473c442c752a23", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Lightning = Transition_meta("Lightning", False, "6777178696609436174", "4159AED7-E464-4949-9D8A-518653D13F22", "3fd5d0c7c48668ba5305c57ac0b5d596", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Snow = Transition_meta("Snow", False, "7171709546262434306", "0170A589-AD1C-46c4-B195-9CE519FDFA18", "c5c7c3c9c9ea3ca576acefe8a278f6ed", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
White_Ink = Transition_meta("White Ink", False, "6858191556055142919", "2A26CD9F-F91F-4f4f-AD1A-FB539C06C156", "775ccf71576e2b8fb075f0e61e980923", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Cloud = Transition_meta("Cloud", False, "6777178865119793678", "0A31EC48-C245-48ab-847C-EF25F17D8CA3", "e835cbc7fa7b15af90a2a7090bbf68c3", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Wave_Right = Transition_meta("Wave Right", False, "6858191510865711629", "FDBBEE84-E35D-420c-8BE4-1662B76468CE", "e9301bacebc6dc444aa4e6f835dd4a31", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Wave_Left = Transition_meta("Wave Left", False, "6858191524312650248", "D55F1CE9-BAED-45b6-A319-95149730CE6C", "6b6499879310b6d29e9595799829cb15", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Dots_Right = Transition_meta("Dots Right", False, "6858191541706428941", "CFE7F1A0-ED26-4ca7-93FA-E72E8B148E49", "74c13e6250cdff7a4e860625d1098e0c", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Circular_Slices_II = Transition_meta("Circular Slices II", False, "7320530650979635713", "0B97966C-1F8F-4d87-BD53-22902ABFEE62", "de6b1094111db6d63840edad9aacbe6d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Split_III = Transition_meta("Split III", False, "6973849570912506370", "1D0F1EE8-EC62-4138-AF85-C3E1141A0733", "942fd71d67ca576384b2cd068157ca45", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Horizontal_Slice = Transition_meta("Horizontal Slice", False, "7090080817849831938", "8FA54E1C-722C-49d7-A47F-5CE5910D46AA", "aa0aa4a72fc236611d3fd4bf75a12ca3", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Diagonal_Slices = Transition_meta("Diagonal Slices", False, "7090080734941024769", "5FC9CD57-67FB-4c37-B648-3FA60B4E9DD4", "6ae9eb3ee4b08afa67e3d079a2ece505", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Split = Transition_meta("Split", False, "6973849417468088833", "648C5EF4-7516-4478-B5A5-84EDBF8605A6", "ca45695f29bacf2dc29a6eb959e9e968", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Vertical_Slices = Transition_meta("Vertical Slices", False, "7090080890201575938", "DC0BFFDA-FF8D-4ace-B01D-E412DE76AE96", "7cc017d4e1b6ab58ec4b6900432522ff", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Split_IV = Transition_meta("Split IV", False, "6973849689107993090", "FD4E4727-F7C9-446c-99CF-B8E6862352A4", "62d08c08542fe62e6a8429f9501e76fa", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Vintage_Screening = Transition_meta("Vintage Screening", False, "7242576260310766082", "8E23FB8D-17B8-4f6a-BE23-2EEE4D3F159D", "d9589a91617889714a627160b4d314d9", 0.466666, True)
|
||||
"""默认时长: 0.47s"""
|
||||
Vintage_Screening_1 = Transition_meta("Vintage Screening", False, "7242576260310766082", "1A596F3D-1CCF-41cb-9F07-1053C46D8343", "d9589a91617889714a627160b4d314d9", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
Cube = Transition_meta("Cube", False, "7429600601161338117", "BF8E9B01-A671-4a5a-B617-A1F18500B76A", "be45578bb628a21eaae268a8d8df868f", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Switch = Transition_meta("Switch", False, "6748313807031898627", "1CD4B550-A634-40bf-9FD4-B513FAE603A6", "0ee10b771dc0443c41a90bb9fd6b3c25", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Open = Transition_meta("Open", False, "6750893890712113677", "AF82FDC0-9DDC-4a57-B947-BFA99B14A5B5", "d5f097e701ddaa984a590249896fc51a", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Page_Turning = Transition_meta("Page Turning", False, "6747979085894390279", "5E3BB33E-87AD-4b41-9222-C32D9A6D9D57", "2f157ee5d78c197efc26f8ed37490573", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Clock_wipe = Transition_meta("Clock wipe", False, "6851775006418932238", "2C82254C-9BDD-4190-9CA7-F2D2B7BB65D9", "0260ab98d7a840c3344cb5b3e70b7d4b", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Windmill = Transition_meta("Windmill", False, "6748286529921094157", "44AE658A-5AE8-495b-8EAA-60B7C38C8DF6", "367b8b51b2eeb63eb2009bf5b356bc2f", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Color_Glitch = Transition_meta("Color Glitch", False, "6724239785205961228", "6D20B259-B8A7-4d6a-8EB0-84B5D5480061", "9de90519d59e432b81c38423aa0393d7", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Strobe = Transition_meta("Strobe", False, "7131930101599441410", "B5CF94E0-3497-4523-9157-51740D3FB822", "35a76b77dd0812f7012911109db35799", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Blocks = Transition_meta("Blocks", False, "6724866346569437710", "5509169E-345F-471c-AF3A-7E6B045BCA8D", "357e865f3bb0c6529ee882ebf279d7c6", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Glitch = Transition_meta("Glitch", False, "6724866446842663431", "E082978D-EAC4-49e3-A1FC-7BAB68290FA6", "71cabe836d9c88afd44f43654ba67fa7", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Horizontal_Lines = Transition_meta("Horizontal Lines", False, "6724845810892149251", "E50E5529-4184-4166-B6EC-2D29ABBB14C0", "36c1c8edb0171ea082c98d38ffa8bd36", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Horizontal_Lines_1 = Transition_meta("Horizontal Lines", False, "6724845810892149251", "E97845C2-AC7A-418c-84CE-7ADC6F0C8BF6", "36c1c8edb0171ea082c98d38ffa8bd36", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Cutout_Flip = Transition_meta("Cutout Flip", False, "7387771481670816257", "49A3F710-11D3-4466-A046-80C3FF82C213", "290a8f067f8039b1060df3d1e8d07ca0", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Color_Swirl = Transition_meta("Color Swirl", False, "7480765113809620279", "8DF1E594-FCB6-4744-8292-DCFC3C1E203F", "b015b3ecd87f1bc8d678cff4203fefc2", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
Shutter_II = Transition_meta("Shutter II", False, "7306783264209900034", "79EE4136-73D9-4bfe-99FE-D116AA989729", "6e0d086441ba1fa0cb6c905b4e1f8f01", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
Stretch_ll = Transition_meta("Stretch ll", False, "7260116495974273538", "57594755-3485-4864-8C7F-A180195E053D", "d28fee612c51edf28da804983d220f8d", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
Stretch = Transition_meta("Stretch", False, "7250006074781078017", "9BEE0F74-29E9-4ebe-A433-6C085B00451F", "4fd21b4a2e6382ee8851c51c8f65ed73", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
Shutter = Transition_meta("Shutter", False, "6885172292339372546", "DD95C8CA-D8BB-4167-8FAA-94576CB16563", "2df569fefb5004c041af5509c10d6c53", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Whirlpool = Transition_meta("Whirlpool", False, "6851810799510360583", "66915A1D-F523-4844-9573-4FDFC7FAA7CC", "31d2de43e6711a9eeb831d60529d0393", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Whirlpool_1 = Transition_meta("Whirlpool", False, "6851810799510360583", "35B07B78-653B-48c8-8AF0-7ADFBB03F371", "31d2de43e6711a9eeb831d60529d0393", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Distortion = Transition_meta("Distortion", False, "7169838836304843265", "CC11E10F-A87D-442d-AD26-83C7037C728B", "f864724f43f1d853c15e1d4a1d11117d", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Axis_Rotation = Transition_meta("Axis Rotation", False, "7237092761361453569", "2F53B8F6-E9A8-4382-9B9A-B75D850DCD8D", "924f9eeeedd359e19f7ec303e3f79d2b", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
Stretch_Right = Transition_meta("Stretch Right", False, "6989922560506860033", "4381E87C-4E8A-4bcc-BA0F-A429F852F7C2", "0742c22666c136224b39762d2ead4e63", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Stretch_Left = Transition_meta("Stretch Left", False, "6989922429980119554", "02976636-1A8D-4181-870F-21339FD9CA38", "b0dd96c3c203104a2df46d83dd91b7bd", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Squeeze = Transition_meta("Squeeze", False, "6751618376780485133", "22016FF4-FBC8-4844-9108-CFFBCFE4D590", "337d4cd9be4e1860bd1e7e50a9a93841", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
Squeeze_1 = Transition_meta("Squeeze", False, "6751618376780485133", "FA59E619-C9AD-4c39-9205-9998FC6C9B48", "337d4cd9be4e1860bd1e7e50a9a93841", 0.466666, False)
|
||||
"""默认时长: 0.47s"""
|
||||
109
pyJianYingDraft/metadata/effect_meta.py
Normal file
109
pyJianYingDraft/metadata/effect_meta.py
Normal file
@@ -0,0 +1,109 @@
|
||||
from enum import Enum
|
||||
|
||||
from typing import List, Dict, Any
|
||||
from typing import TypeVar, Optional
|
||||
|
||||
class Effect_param:
|
||||
"""特效参数信息"""
|
||||
|
||||
name: str
|
||||
"""参数名称"""
|
||||
default_value: float
|
||||
"""默认值"""
|
||||
min_value: float
|
||||
"""最小值"""
|
||||
max_value: float
|
||||
"""最大值"""
|
||||
|
||||
def __init__(self, name: str, default_value: float, min_value: float, max_value: float):
|
||||
self.name = name
|
||||
self.default_value = default_value
|
||||
self.min_value = min_value
|
||||
self.max_value = max_value
|
||||
|
||||
class Effect_param_instance(Effect_param):
|
||||
"""特效参数实例"""
|
||||
|
||||
index: int
|
||||
"""参数索引"""
|
||||
value: float
|
||||
"""当前值"""
|
||||
|
||||
def __init__(self, meta: Effect_param, index: int, value: float):
|
||||
super().__init__(meta.name, meta.default_value, meta.min_value, meta.max_value)
|
||||
self.index = index
|
||||
self.value = value
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"default_value": self.default_value,
|
||||
"max_value": self.max_value,
|
||||
"min_value": self.min_value,
|
||||
"name": self.name,
|
||||
"parameterIndex": self.index,
|
||||
"portIndex": 0,
|
||||
"value": self.value
|
||||
}
|
||||
|
||||
class Effect_meta:
|
||||
"""特效元数据"""
|
||||
|
||||
name: str
|
||||
"""效果名称"""
|
||||
is_vip: bool
|
||||
"""是否为VIP特权"""
|
||||
|
||||
resource_id: str
|
||||
"""资源ID"""
|
||||
effect_id: str
|
||||
"""效果ID"""
|
||||
md5: str
|
||||
|
||||
params: List[Effect_param]
|
||||
"""效果的参数信息"""
|
||||
|
||||
def __init__(self, name: str, is_vip: bool, resource_id: str, effect_id: str, md5: str, params: List[Effect_param] = []):
|
||||
self.name = name
|
||||
self.is_vip = is_vip
|
||||
self.resource_id = resource_id
|
||||
self.effect_id = effect_id
|
||||
self.md5 = md5
|
||||
self.params = params
|
||||
|
||||
def parse_params(self, params: Optional[List[Optional[float]]]) -> List[Effect_param_instance]:
|
||||
"""解析参数列表(范围0~100), 返回参数实例列表"""
|
||||
ret: List[Effect_param_instance] = []
|
||||
|
||||
if params is None: params = []
|
||||
for i, param in enumerate(self.params):
|
||||
val = param.default_value
|
||||
if i < len(params):
|
||||
input_v = params[i]
|
||||
if input_v is not None:
|
||||
if input_v < 0 or input_v > 100:
|
||||
raise ValueError("Invalid parameter value %f within %s" % (input_v, str(param)))
|
||||
val = param.min_value + (param.max_value - param.min_value) * input_v / 100.0 # 从0~100映射到实际值
|
||||
ret.append(Effect_param_instance(param, i, val))
|
||||
return ret
|
||||
|
||||
|
||||
Effect_enum_subclass = TypeVar("Effect_enum_subclass", bound="Effect_enum")
|
||||
|
||||
class Effect_enum(Enum):
|
||||
"""特效枚举基类, 提供一个`from_name`方法用于根据名称获取特效元数据"""
|
||||
|
||||
@classmethod
|
||||
def from_name(cls: "type[Effect_enum_subclass]", name: str) -> Effect_enum_subclass:
|
||||
"""根据名称获取特效元数据, 忽略大小写、空格和下划线
|
||||
|
||||
Args:
|
||||
name (str): 特效名称
|
||||
|
||||
Raises:
|
||||
`ValueError`: 特效名称不存在
|
||||
"""
|
||||
name = name.lower().replace(" ", "").replace("_", "")
|
||||
for effect in cls:
|
||||
if effect.name.lower().replace(" ", "").replace("_", "") == name:
|
||||
return effect
|
||||
raise ValueError(f"Effect named '{name}' not found")
|
||||
603
pyJianYingDraft/metadata/filter_meta.py
Normal file
603
pyJianYingDraft/metadata/filter_meta.py
Normal file
@@ -0,0 +1,603 @@
|
||||
"""滤镜效果元数据"""
|
||||
|
||||
from .effect_meta import Effect_enum
|
||||
from .effect_meta import Effect_meta, Effect_param
|
||||
|
||||
class Filter_type(Effect_enum):
|
||||
"""剪映自带的滤镜效果类型
|
||||
|
||||
出现重名而只保留了其中一个的滤镜:奶杏、布朗、琥珀、夜雾、月吟、漫夏
|
||||
"""
|
||||
|
||||
_1980 = Effect_meta("1980", False, "7127828208690433311", "7127828208690433311", "d3595847ee8348c69c6037b8003a76e9", [])
|
||||
ABG = Effect_meta("ABG", False, "7127679308897832206", "7127679308897832206", "d07b36b0b8e1893ce49df327ba926804", [])
|
||||
Ditto = Effect_meta("Ditto", False, "7195816046077496635", "7195816046077496635", "09d18408ca0dee53716c3a4f41dd35e1", [])
|
||||
KE1 = Effect_meta("KE1", False, "7127819154018536741", "7127819154018536741", "5ece7eff894e25a356b9111e78478c56", [])
|
||||
KV5D = Effect_meta("KV5D", False, "7127578859217620254", "7127578859217620254", "57940599e2c8d85a7f73824c7360bfca", [])
|
||||
VHS_III = Effect_meta("VHS III", False, "7127669764905782542", "7127669764905782542", "c8d7adad4773fccc2128d8eafa569572", [])
|
||||
三洋VPC = Effect_meta("三洋VPC", False, "7127669338089311495", "7127669338089311495", "73c77a4b9c5085af6175a523d24bc7c6", [])
|
||||
书意 = Effect_meta("书意", False, "7368493100127292723", "7368493100127292723", "3e20d8ccc31ca6a495b3f8e2ff116744", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
亮肤 = Effect_meta("亮肤", False, "7127655008715230495", "7127655008715230495", "2aaa463c5deee34e73384d549edc7c15", [])
|
||||
仲夏绿光 = Effect_meta("仲夏绿光", False, "7127675970252754189", "7127675970252754189", "970f4b2c797e2890787f7420d8c0613b", [])
|
||||
似锦 = Effect_meta("似锦", False, "7188014191834418493", "7188014191834418493", "869cb94d6bbec5c6b771092ec1ef8cfe", [])
|
||||
低保真 = Effect_meta("低保真", False, "7304170509661506843", "7304170509661506843", "db39172ffff69e973886c2e8598dbc75", [])
|
||||
侘寂灰 = Effect_meta("侘寂灰", False, "7127609569416711455", "7127609569416711455", "17547e013b45f87dc7e4e1f7059d7e62", [])
|
||||
冬恋 = Effect_meta("冬恋", False, "7304573577255324967", "7304573577255324967", "995b1153346f3f3237099b4357b78374", [])
|
||||
冰火 = Effect_meta("冰火", False, "7303812389177265447", "7303812389177265447", "61065880d8580b8b1a206de0b0773571", [])
|
||||
冰肌 = Effect_meta("冰肌", False, "7199089344756370743", "7199089344756370743", "18c6b91685b82ef1cd3d7b7261f997ea", [])
|
||||
冷气机 = Effect_meta("冷气机", False, "7263359186883366155", "7263359186883366155", "740c1bfa9cb365344bd8a51bf7ef037b", [])
|
||||
冷白 = Effect_meta("冷白", False, "7127614731187178783", "7127614731187178783", "a47ab1d817480c87ff6de4c9ba10b204", [])
|
||||
冷蓝 = Effect_meta("冷蓝", False, "7127618237117877518", "7127618237117877518", "accf4492064dabe05dce1c28457b6f89", [])
|
||||
凝黛 = Effect_meta("凝黛", False, "7298279202350976282", "7298279202350976282", "7bad3476dce5691d9e8f90f50122ed33", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
初冷 = Effect_meta("初冷", False, "7297566793881734438", "7297566793881734438", "5a97174119b20bbbc86a6cfd62e148d5", [])
|
||||
初恋 = Effect_meta("初恋", False, "7195812984306814267", "7195812984306814267", "9fdc53e8dab072725d9bb088b8930869", [])
|
||||
千玺IXU = Effect_meta("千玺IXU", False, "7127824119294364959", "7127824119294364959", "12af151fa57d3226ee3781a070ae54a6", [])
|
||||
千金妝 = Effect_meta("千金妝", False, "7370585884078443802", "7370585884078443802", "e814069ba1dea090eeb44b397eeac252", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
即刻春光 = Effect_meta("即刻春光", False, "7127675868641594654", "7127675868641594654", "ba343f6bb3720ba81a8662d669b6b743", [])
|
||||
原木 = Effect_meta("原木", False, "7127675195812351239", "7127675195812351239", "a2cb1c6dd47c2ce4aeb0dd7303353438", [])
|
||||
古罗马 = Effect_meta("古罗马", False, "7242212640498568503", "7242212640498568503", "3d438e293e65d63e71af3db73b03bc4e", [])
|
||||
喜市 = Effect_meta("喜市", False, "7185440129442417931", "7185440129442417931", "5210a45933f4265e5f262d3018a78d64", [])
|
||||
复古工业 = Effect_meta("复古工业", False, "7127608212483820837", "7127608212483820837", "cf8d236e185f6b174544151be3baba93", [])
|
||||
夏日风吟 = Effect_meta("夏日风吟", False, "7127684611802418445", "7127684611802418445", "3120cfc3dd0f1fe2090749012d60a20b", [])
|
||||
奈良 = Effect_meta("奈良", False, "7351684015906147621", "7351684015906147621", "2a7ada2a5ac7a8742b37c3bc794b07b0", [])
|
||||
奥本海默 = Effect_meta("奥本海默", False, "7271142654505766183", "7271142654505766183", "2a1f03001d0db5f28f73bee7bc00ccf7", [])
|
||||
# 奶杏 = Effect_meta("奶杏", False, "7297134192100379938", "7297134192100379938", "89ae84878534d61d0b7d62ba395fc8b7", [])
|
||||
奶油 = Effect_meta("奶油", False, "7127618513048571173", "7127618513048571173", "dd39d5622353128e5f7c1de20020359a", [])
|
||||
奶绿 = Effect_meta("奶绿", False, "7127684319300029733", "7127684319300029733", "8924565ec41520d2a8a88d846069768f", [])
|
||||
姜饼红 = Effect_meta("姜饼红", False, "7127624030135389471", "7127624030135389471", "22925be3f36caa278eb5df6a0278c636", [])
|
||||
安愉 = Effect_meta("安愉", False, "7190242827543022880", "7190242827543022880", "ed7e951505cbf70dee0f4d144d239828", [])
|
||||
富士CC_II = Effect_meta("富士CC II", False, "7268561903721401641", "7268561903721401641", "cb92e0b13cd9b9a3aca8bb00b1a9c328", [])
|
||||
寻荷 = Effect_meta("寻荷", False, "7295362817874480425", "7295362817874480425", "0230f2fb3e9ea72df20f8819542b4410", [])
|
||||
小镇 = Effect_meta("小镇", False, "7127654151688965384", "7127654151688965384", "fc386676ee752b20918fb61c42c28a7b", [])
|
||||
山系 = Effect_meta("山系", False, "7127662738884545806", "7127662738884545806", "d9d5332152b0f951229402d7d840263e", [])
|
||||
巧克力 = Effect_meta("巧克力", False, "7363220647767592243", "7363220647767592243", "6e513d9dcb9357219e35097b945a3881", [])
|
||||
布兰卡 = Effect_meta("布兰卡", False, "7242208887883992381", "7242208887883992381", "1774e2dd335a10a5f3174062c08403a2", [])
|
||||
布朗 = Effect_meta("布朗", False, "7273777590102527290", "7273777590102527290", "b6bee72111d56fd16679adcf9543a05a", [])
|
||||
# 布朗 = Effect_meta("布朗", False, "7127576913375153415", "7127576913375153415", "1f969e8f3e5e8545f41715cde1baf946", [])
|
||||
希望 = Effect_meta("希望", False, "7271141541521968396", "7271141541521968396", "fdb975090cbdc5a5fb2e56ae982514a2", [])
|
||||
幽蓝 = Effect_meta("幽蓝", False, "7330441280016715062", "7330441280016715062", "9db4cff7dd63bf1a17ced3728ca02e5e", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
彩果 = Effect_meta("彩果", False, "7175101541198679353", "7175101541198679353", "a86fb22ed3009ad44f9457f6eefdb9a7", [])
|
||||
影叙 = Effect_meta("影叙", False, "7349953761059638555", "7349953761059638555", "72e02210098c120bbcddca245656aaca", [])
|
||||
德古拉 = Effect_meta("德古拉", False, "7127678346472819982", "7127678346472819982", "f8bfba1ebdb6c5054eec4eb1e9433e72", [])
|
||||
快照I = Effect_meta("快照I", False, "7143537677655100709", "7143537677655100709", "526ce6c2fd2228cda17fc5f64a7267cf", [])
|
||||
忽风 = Effect_meta("忽风", False, "7330123964305378586", "7330123964305378586", "c455bc6760bd9829f2d467866527a1b1", [])
|
||||
恋颂 = Effect_meta("恋颂", False, "7307103748076113188", "7307103748076113188", "2919ab042e2f8b431826f90ba9bb3e89", [])
|
||||
敦刻尔克 = Effect_meta("敦刻尔克", False, "7127568601921408293", "7127568601921408293", "6b4a7017eecf10aa48e3f93586e04a6a", [])
|
||||
料理 = Effect_meta("料理", False, "7127656350833806622", "7127656350833806622", "31ebabffaf3ed8653e0db318dfbeaa9d", [])
|
||||
新闪 = Effect_meta("新闪", False, "7342395072199019803", "7342395072199019803", "9c3858dfbdd548bef8a012d55f795b47", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
日出 = Effect_meta("日出", False, "7325383700240256296", "7325383700240256296", "628b7f7c8a7fea3f89edaff21f4c9d25", [])
|
||||
日系奶油 = Effect_meta("日系奶油", False, "7127664177870671135", "7127664177870671135", "8e779b2183d399fb192decf3616f8c27", [])
|
||||
日落橘 = Effect_meta("日落橘", False, "7127669630667066655", "7127669630667066655", "1ff996d1537f8a485f193314861c6b5b", [])
|
||||
旧乐园 = Effect_meta("旧乐园", False, "7239977329668263227", "7239977329668263227", "604ff64bec0ae328aa1d1c19fb89bfa2", [])
|
||||
旧时代I = Effect_meta("旧时代I", False, "7232218563270954300", "7232218563270954300", "9532fcb213a6eb45c2441d8d0466f9ef", [])
|
||||
明晰 = Effect_meta("明晰", False, "7367715162964446516", "7367715162964446516", "c622c908228fb2796e141f973b9746e9", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
星云 = Effect_meta("星云", False, "7127672042069036319", "7127672042069036319", "b73b7e9c33f8e387cbb579a5c11f01b9", [])
|
||||
晴颜 = Effect_meta("晴颜", False, "7297968738131873035", "7297968738131873035", "97b54d7d49c75162656379068221e3a1", [])
|
||||
暖食 = Effect_meta("暖食", False, "7127653100269210916", "7127653100269210916", "47b7c1b9f560b85b528c24f7cbbb6cd4", [])
|
||||
暗夜 = Effect_meta("暗夜", False, "7127823728070659358", "7127823728070659358", "788c476ccf299db46035bd930d90c342", [])
|
||||
暗雅 = Effect_meta("暗雅", False, "7127656352410848548", "7127656352410848548", "c5207d449099512b7efd9419c75378f7", [])
|
||||
暮光 = Effect_meta("暮光", False, "7242211155131862332", "7242211155131862332", "b5e36cb0438d74eac97fb6c7ec66260f", [])
|
||||
暮色 = Effect_meta("暮色", False, "7127594686541237535", "7127594686541237535", "adbf6d3bbbd6a6d4525300d78323a7d2", [])
|
||||
月升之国 = Effect_meta("月升之国", False, "7127819487419567373", "7127819487419567373", "46638e887295beddd23c84206af26a1b", [])
|
||||
月夜 = Effect_meta("月夜", False, "7143532202112912670", "7143532202112912670", "67cfe630584f194d007e3001052f5094", [])
|
||||
月辉 = Effect_meta("月辉", False, "7213576268346838333", "7213576268346838333", "606cb40e4b0b4706855126dc82ed3e01", [])
|
||||
未央 = Effect_meta("未央", False, "7340282260312182050", "7340282260312182050", "901d60cca1c56063279941926ed877be", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
松果棕 = Effect_meta("松果棕", False, "7127669342325443854", "7127669342325443854", "d68bcfc1e312f0e3e52f164a59cff686", [])
|
||||
林间 = Effect_meta("林间", False, "7127663793827564808", "7127663793827564808", "c1ff0cd2a3eea239334b9604d31b4947", [])
|
||||
枫糖咖 = Effect_meta("枫糖咖", False, "7305333618891574567", "7305333618891574567", "9ec78b71c47895ec6ff375a62b5b77d0", [])
|
||||
柠檬青 = Effect_meta("柠檬青", False, "7127676358766923016", "7127676358766923016", "0437481ce079dd3f1160351c1038d628", [])
|
||||
梦海 = Effect_meta("梦海", False, "7307544983454682431", "7307544983454682431", "09ce81fe256e044893d494f48532f66a", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
梨花白 = Effect_meta("梨花白", False, "7345493751416016166", "7345493751416016166", "fa20a675c5b9caa46f42809746ed3ff5", [])
|
||||
梵时 = Effect_meta("梵时", False, "7341767383259942155", "7341767383259942155", "a8908ae23533d029ea98fd6c5d052143", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
棕咖 = Effect_meta("棕咖", False, "7273779209934245179", "7273779209934245179", "d661b0ee2e5417c12e824af664490161", [])
|
||||
棕宥 = Effect_meta("棕宥", False, "7332348414933421366", "7332348414933421366", "d3dfad8c9cbc044369c528461bd79f57", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
棠梨 = Effect_meta("棠梨", False, "7329819965920398604", "7329819965920398604", "09c9a4e110dd011c2155a544ecfe4b89", [])
|
||||
椰林 = Effect_meta("椰林", False, "7252674515287788856", "7252674515287788856", "d0e4bf788a131db36ccf98e09f6cf056", [])
|
||||
椿和 = Effect_meta("椿和", False, "7341032461234654475", "7341032461234654475", "46b1e432d7075fe6dc2b31d98809dac5", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
椿来 = Effect_meta("椿来", False, "7347729407181704498", "7347729407181704498", "13780c3447b3326ab87365015d0d0cb9", [])
|
||||
樱粉 = Effect_meta("樱粉", False, "7127632545272925470", "7127632545272925470", "a5411e69fdf93e03f1d0c29ee6822173", [])
|
||||
比佛利 = Effect_meta("比佛利", False, "7127657040348040479", "7127657040348040479", "0b705ff4b8eb7fe5090848b588139e75", [])
|
||||
气泡水 = Effect_meta("气泡水", False, "7127619120761212168", "7127619120761212168", "4a0b28181b76b9ba2dd4ccdf66aa905a", [])
|
||||
气色 = Effect_meta("气色", False, "7127681015732014350", "7127681015732014350", "b0d684a9b8ac503bcc80efd5213c0e9e", [])
|
||||
江浙沪 = Effect_meta("江浙沪", False, "7127838224344435981", "7127838224344435981", "9287d59bc7ff0bce6f4893b0383c4bfe", [])
|
||||
浅岛 = Effect_meta("浅岛", False, "7281163331245821239", "7281163331245821239", "dc6d03248744c082a2929bb29184f820", [])
|
||||
浮生 = Effect_meta("浮生", False, "7340687187194678569", "7340687187194678569", "f438386d5155971f6ecd2600126fcbb4", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
海街日记 = Effect_meta("海街日记", False, "7127615915004366116", "7127615915004366116", "8ac09d35b39a8b6f289ef5f4330a3d62", [])
|
||||
海雾 = Effect_meta("海雾", False, "7189595107610447163", "7189595107610447163", "3099b6872219761db76f4c7cc86ea0e5", [])
|
||||
海鸥DC = Effect_meta("海鸥DC", False, "7127830050786823437", "7127830050786823437", "8cd726548b6275553ce2668cca28f32e", [])
|
||||
深褐 = Effect_meta("深褐", False, "7127615347703811336", "7127615347703811336", "e7e999ed75f9f3a0626cf946b08c4f35", [])
|
||||
清明上河 = Effect_meta("清明上河", False, "7208495962887621899", "7208495962887621899", "9fa5e1e67f3217c48cb8e64c26469fc1", [])
|
||||
清晰 = Effect_meta("清晰", False, "7127621434230213924", "7127621434230213924", "783e545788c2a60d5d85a160ee5371ae", [])
|
||||
清澈 = Effect_meta("清澈", False, "7359419156619332902", "7359419156619332902", "a40f003f9ea1ff5570314e7fa1e0a289", [])
|
||||
温述 = Effect_meta("温述", False, "7351580023742090535", "7351580023742090535", "207610064067f787d8339e8661a19d72", [])
|
||||
港历 = Effect_meta("港历", False, "7346017304909581587", "7346017304909581587", "a60377ccb7d2eba39c9c9a54178f2869", [])
|
||||
港风 = Effect_meta("港风", False, "7127830945243090184", "7127830945243090184", "44c277e7933012ecceaa669d4bc64452", [])
|
||||
漫夏 = Effect_meta("漫夏", False, "7366616947703991571", "7366616947703991571", "3b090944724c8cc1a8d7a5d73be3358f", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
漫彩 = Effect_meta("漫彩", False, "7177269429972045089", "7177269429972045089", "71885c8e558e4b6fece843e3d4464e62", [])
|
||||
漫步 = Effect_meta("漫步", False, "7263357613050563852", "7263357613050563852", "de874f8a3993f93bb067593f0dfcfa5a", [])
|
||||
烘培 = Effect_meta("烘培", False, "7127675183246200072", "7127675183246200072", "55cb15f600fff6aa4bda19f490aa7548", [])
|
||||
烟岚 = Effect_meta("烟岚", False, "7341204799590763788", "7341204799590763788", "33937d0f480f994e09bc32adfe352cbd", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
烟霞 = Effect_meta("烟霞", False, "7143533042978524424", "7143533042978524424", "e33d66d89891ebab00dabb91a4b4caee", [])
|
||||
煦日 = Effect_meta("煦日", False, "7297144048903556388", "7297144048903556388", "0ccb49dc9361df2d3262786b6c43d8ee", [])
|
||||
燃力 = Effect_meta("燃力", False, "7248571956860079395", "7248571956860079395", "f8deda9b7cb4ff2f4e6382795c7265a7", [])
|
||||
牛皮纸 = Effect_meta("牛皮纸", False, "7127822013074263310", "7127822013074263310", "351a03b45cb0cd2e13911113e7b06ca5", [])
|
||||
珠光蓝 = Effect_meta("珠光蓝", False, "7127657509501914399", "7127657509501914399", "2b91f0f9a4a9cac90b3cd1be50637f58", [])
|
||||
珠落 = Effect_meta("珠落", False, "7213575938615872823", "7213575938615872823", "9ced1b064be8feb4c3c3b2989b61e286", [])
|
||||
# 琥珀 = Effect_meta("琥珀", False, "7127620849372302629", "7127620849372302629", "3cda15f337b1fc8ce63bcc055926779c", [])
|
||||
病娇 = Effect_meta("病娇", False, "7291179909718740259", "7291179909718740259", "5e1e1d48442e9e2fa3bab8e724bce4ad", [])
|
||||
白皙 = Effect_meta("白皙", False, "7127668617147141413", "7127668617147141413", "d029402b10782b63f67967b4d1bc1c03", [])
|
||||
盐岚 = Effect_meta("盐岚", False, "7359223280714239268", "7359223280714239268", "e517e2dd0dc2601874ce0ca63c9cc75d", [])
|
||||
矿野 = Effect_meta("矿野", False, "7281162649314889015", "7281162649314889015", "7e645e33c8e3d019669e9cb5d03d6886", [])
|
||||
砂红 = Effect_meta("砂红", False, "7300758676732677427", "7300758676732677427", "2f33ad8925eb2079b23900241fcf83a4", [])
|
||||
砾绀 = Effect_meta("砾绀", False, "7340915058542759219", "7340915058542759219", "d0f6bbafe6d5b1d6d5100e99c79b9e9e", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
祈安 = Effect_meta("祈安", False, "7314682996131433766", "7314682996131433766", "2a9a992fc75889486745e8213a7047f8", [])
|
||||
空灵 = Effect_meta("空灵", False, "7353555308448419098", "7353555308448419098", "341afbfb8058ac32a1994b2dc39be59c", [])
|
||||
米棕 = Effect_meta("米棕", False, "7221477781043973413", "7221477781043973413", "e687f0134f6ee01f8f50198bd52ebd00", [])
|
||||
粉瓷 = Effect_meta("粉瓷", False, "7127667757998411044", "7127667757998411044", "76eac8836f1ddd762af8c6317b1c8c73", [])
|
||||
粉肤 = Effect_meta("粉肤", False, "7296493947625557286", "7296493947625557286", "1b4893feb8dac4eb014b6e3f52449786", [])
|
||||
粹光 = Effect_meta("粹光", False, "7373693828328475941", "7373693828328475941", "a3b69c7718dab46fedcd6ceabcb7425b", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
素肌 = Effect_meta("素肌", False, "7127671162758270245", "7127671162758270245", "cfb819eefe90e08965021dfea52d402b", [])
|
||||
红绿 = Effect_meta("红绿", False, "7127622617699290399", "7127622617699290399", "e20b3185492170b68d6c7944270e3f76", [])
|
||||
绝对红 = Effect_meta("绝对红", False, "7127667361456426248", "7127667361456426248", "cc6084f69428c5a741ea4280ddbfe3c8", [])
|
||||
绿妍 = Effect_meta("绿妍", False, "7127675252410223909", "7127675252410223909", "46a6f490249d7eabe3a9e8cd8e92cf2d", [])
|
||||
老友记 = Effect_meta("老友记", False, "7127669912050420999", "7127669912050420999", "e45f9a4c50717a3585006591b41e3440", [])
|
||||
胡桃木 = Effect_meta("胡桃木", False, "7127830961621847310", "7127830961621847310", "5eb7457d0d18cfdf0dcd99725acf2dd9", [])
|
||||
自然 = Effect_meta("自然", False, "7127821314198342943", "7127821314198342943", "f4a371ed60b7448b146cd1b1c697a9e8", [])
|
||||
自由 = Effect_meta("自由", False, "7271143155544739108", "7271143155544739108", "a202f96129bf04064a37cd92f5fda5b9", [])
|
||||
臻金 = Effect_meta("臻金", False, "7306726303594564904", "7306726303594564904", "6cae1766e18f62be45ddcf4d169da037", [])
|
||||
花园 = Effect_meta("花园", False, "7226990672190950713", "7226990672190950713", "b235531243327c4b03bdd5495f95d9c6", [])
|
||||
花椿 = Effect_meta("花椿", False, "7127539889553427719", "7127539889553427719", "6502db5f541da3fdfbedf9161a79e53c", [])
|
||||
苍岭 = Effect_meta("苍岭", False, "7310976403078434102", "7310976403078434102", "df38cb08feab82523e96b89856e4030d", [])
|
||||
落日 = Effect_meta("落日", False, "7166494058305670432", "7166494058305670432", "a3909c6739bcfffce11c1ed328afdb39", [])
|
||||
落日海岛 = Effect_meta("落日海岛", False, "7369501986401570099", "7369501986401570099", "0cefc26f8aa950c8934766ad229255bc", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
落日飞车 = Effect_meta("落日飞车", False, "7350133636890463498", "7350133636890463498", "c92ce87d49816b7c930d5c1a5f537536", [])
|
||||
薄荷 = Effect_meta("薄荷", False, "7343782317820857641", "7343782317820857641", "eed11d695897d0068dc658d09a18f444", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
褪色 = Effect_meta("褪色", False, "7127668404764380447", "7127668404764380447", "13ed65a66841ee746146665f0aa18c6d", [])
|
||||
西野 = Effect_meta("西野", False, "7331590962696834313", "7331590962696834313", "c5368d1617ac7b8af8b616782b388557", [])
|
||||
西餐 = Effect_meta("西餐", False, "7127668806398315806", "7127668806398315806", "c447f798e1aaf5a776b40432571e9ee8", [])
|
||||
谧歌 = Effect_meta("谧歌", False, "7301212776532380966", "7301212776532380966", "229eed4ae519e0c29efe23a2f07ba644", [])
|
||||
贝松绿 = Effect_meta("贝松绿", False, "7127668616991952158", "7127668616991952158", "5820a95014d61c7b5a45d23ba045d0e1", [])
|
||||
质感暗调 = Effect_meta("质感暗调", False, "7127653798155209997", "7127653798155209997", "80cc0198c081d823bfbfa08fd5e0c3c6", [])
|
||||
赛博朋克 = Effect_meta("赛博朋克", False, "7127657979838516494", "7127657979838516494", "fe6d8ddb41fd8ea4f184ff5d9ca0b77e", [])
|
||||
赤陀 = Effect_meta("赤陀", False, "7226251886360300837", "7226251886360300837", "f44a2fd63bcdb30bd1cdfd1120ced1e1", [])
|
||||
赫本 = Effect_meta("赫本", False, "7127663117508660517", "7127663117508660517", "589b59735865a200db3ac561640ed299", [])
|
||||
赫石 = Effect_meta("赫石", False, "7302823953406446899", "7302823953406446899", "4be5b26f8b932f7fe7a3f8033d5549b2", [])
|
||||
轻食 = Effect_meta("轻食", False, "7127621137705618724", "7127621137705618724", "27fbb36cf04af9886d4d9e6abcd3691b", [])
|
||||
达芬妮 = Effect_meta("达芬妮", False, "7300602459356040484", "7300602459356040484", "e9556101678a74dc573133da00401854", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
迈阿密 = Effect_meta("迈阿密", False, "7127684611450178823", "7127684611450178823", "f9f32708f0029a5b043736e64133324f", [])
|
||||
酷白 = Effect_meta("酷白", False, "7127676762514885919", "7127676762514885919", "e62e07d9ed430226e6afaa96dba3844a", [])
|
||||
金属 = Effect_meta("金属", False, "7127654151688949000", "7127654151688949000", "7aaae4aad5195f4df6929d9cb2f77fc9", [])
|
||||
闪光灯 = Effect_meta("闪光灯", False, "7364705637931994405", "7364705637931994405", "5b6fd1621826d837d88c71de0ced5f76", [])
|
||||
闻香识人 = Effect_meta("闻香识人", False, "7127823728267775263", "7127823728267775263", "56693fef51ca05d7631f1bf3ae47c3cc", [])
|
||||
阿尔菲 = Effect_meta("阿尔菲", False, "7299130097632627979", "7299130097632627979", "5225172497e1cd5bd3a8e1162a9c25d0", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
雪鹿 = Effect_meta("雪鹿", False, "7302796570947243264", "7302796570947243264", "10ff7e7bc0accc06c5ce3b9c09114b18", [])
|
||||
雾瓷 = Effect_meta("雾瓷", False, "7169239634076060960", "7169239634076060960", "03e7a58f2d18954a4ced7fec8371cd5e", [])
|
||||
青橙 = Effect_meta("青橙", False, "7127615575865478430", "7127615575865478430", "58b4c939e727d94fb074ca0a1c0400ad", [])
|
||||
青红夜 = Effect_meta("青红夜", False, "7281575818621455628", "7281575818621455628", "7b439160a4134076dc70571813ec9cbb", [])
|
||||
风铃 = Effect_meta("风铃", False, "7211001257996127547", "7211001257996127547", "48d79f8501ade6fd7a33055b83947eb8", [])
|
||||
高饱和 = Effect_meta("高饱和", False, "7127653121966230814", "7127653121966230814", "a0533d46f3bc544f36e00965b2644067", [])
|
||||
鬼魅 = Effect_meta("鬼魅", False, "7291201164027252024", "7291201164027252024", "20fd9ce9674e1e0137955e2d74ce252a", [])
|
||||
黑胶唱片 = Effect_meta("黑胶唱片", False, "7221805176410180921", "7221805176410180921", "97fc59d95cbb611d888bf10da5a1c015", [])
|
||||
黑豹 = Effect_meta("黑豹", False, "7202475126485503236", "7202475126485503236", "9f33e8c52e07d1af8ff00781f7645124", [])
|
||||
默片 = Effect_meta("默片", False, "7127655037026848031", "7127655037026848031", "81be2b9491c4c805cb4f70a595ab46a6", [])
|
||||
_160C = Effect_meta("160C", True, "7190249807682800954", "7190249807682800954", "7505f10b71bc6e346a1696544121ac9e", [])
|
||||
_2077 = Effect_meta("2077", True, "7131347316111314189", "7131347316111314189", "a85f790077f307193b1c70ed94e4aa41", [])
|
||||
_400H = Effect_meta("400H", True, "7190236487152127269", "7190236487152127269", "20817f9b1ed37a720c02abea87714655", [])
|
||||
_800Z = Effect_meta("800Z", True, "7190237757552348471", "7190237757552348471", "53acbe492462a72db57c3f5ed7de9345", [])
|
||||
_90s = Effect_meta("90s", True, "7131366613823114503", "7131366613823114503", "67f1677d3b2033d0ab1101789fd833cb", [])
|
||||
City_Walk = Effect_meta("City Walk", True, "7263360572404550931", "7263360572404550931", "9a183540a03b391b3a17b67970ddc93a", [])
|
||||
FXN = Effect_meta("FXN", True, "7332480052392774975", "7332480052392774975", "01cd75f7c9b5fb3b05bbcb54e53400d4", [])
|
||||
GR正片 = Effect_meta("GR正片", True, "7168098796860148995", "7168098796860148995", "1f28a387f3f22baff4b1410530d2750f", [])
|
||||
GR绿 = Effect_meta("GR绿", True, "7168121440141708576", "7168121440141708576", "5ad1db915106f04413a025928b28cdf5", [])
|
||||
GR蓝 = Effect_meta("GR蓝", True, "7168097661160131879", "7168097661160131879", "c191e003d6d9f39dd5e9b770fb21ac29", [])
|
||||
IG白 = Effect_meta("IG白", True, "7221479156318489893", "7221479156318489893", "02a7a3a08ed9756bb1ae7b924213c33d", [])
|
||||
INS暗 = Effect_meta("INS暗", True, "7223645151820877093", "7223645151820877093", "29c393013eddca0fdd0ee0087100915e", [])
|
||||
中性 = Effect_meta("中性", True, "7127621445806525704", "7127621445806525704", "8168144d29c35cf186eccb03ec9f3d93", [])
|
||||
中性II = Effect_meta("中性II", True, "7312646907908607244", "7312646907908607244", "ad71ff12ac0afd02cb6c583d0ee69d8a", [])
|
||||
丹枫 = Effect_meta("丹枫", True, "7297138825359281423", "7297138825359281423", "a97673c2524eba984b75396530501fa8", [])
|
||||
乐游 = Effect_meta("乐游", True, "7193982146363673856", "7193982146363673856", "2a215f5fe9ff6c1a8effea9135bbe3bb", [])
|
||||
云暖 = Effect_meta("云暖", True, "7314883649999015231", "7314883649999015231", "7819364ae09bf6c6771fce646cde6ec9", [])
|
||||
人生之事 = Effect_meta("人生之事", True, "7148844086869396743", "7148844086869396743", "3dfc5764bccb9e7ec2e3f15e59edd563", [])
|
||||
仲夏夜 = Effect_meta("仲夏夜", True, "7281166048273943867", "7281166048273943867", "0773453b9c513222ed0b2a629b141b38", [])
|
||||
余晖 = Effect_meta("余晖", True, "7278616064018107707", "7278616064018107707", "19e8ac930af976579c60df1ad6f4c4fe", [])
|
||||
佳能G7X_II = Effect_meta("佳能G7X II", True, "7291597100389862707", "7291597100389862707", "e9aef9a32a0ed9ebf39c9f23340fd408", [])
|
||||
佳能G7X_III = Effect_meta("佳能G7X III", True, "7291595038688136474", "7291595038688136474", "3c89208f4754d78ad97df171a1cc1ffc", [])
|
||||
俱乐部 = Effect_meta("俱乐部", True, "7239235794744003851", "7239235794744003851", "1f6a4516fb91c8e68217123191dc38ea", [])
|
||||
倾森 = Effect_meta("倾森", True, "7332714336315526409", "7332714336315526409", "2b0731e9eacb5098ad43bd99ae6f23d7", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
光流 = Effect_meta("光流", True, "7233732009070300473", "7233732009070300473", "351346b807ca9bfa063e517f10d96f95", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
冬禧 = Effect_meta("冬禧", True, "7190250133672578316", "7190250133672578316", "6423fd745c7ba83613feea71977763fb", [])
|
||||
冰原 = Effect_meta("冰原", True, "7171615136271060236", "7171615136271060236", "4664881945ad10f8e3de28f2ccd47e56", [])
|
||||
冰瀑 = Effect_meta("冰瀑", True, "7196927862056701240", "7196927862056701240", "9691bde0838975e3573faad0791d3cdf", [])
|
||||
冰茶 = Effect_meta("冰茶", True, "7131399016771800357", "7131399016771800357", "ab44066c23ab6639ca6ff5eb2b850582", [])
|
||||
冰雪世界 = Effect_meta("冰雪世界", True, "7328364342146059531", "7328364342146059531", "6df501f5b6c1cdba49ded903a5d6a28c", [])
|
||||
冷叙 = Effect_meta("冷叙", True, "7159132840179895590", "7159132840179895590", "c60635dea7f7a6df2ba9b1e08fee006e", [])
|
||||
冷墨 = Effect_meta("冷墨", True, "7300751893813366053", "7300751893813366053", "e6d9891ef7f02898055a16f11a8750bc", [])
|
||||
冷寂 = Effect_meta("冷寂", True, "7171628827477642535", "7171628827477642535", "9a932b548dfab1964a2d70ef27717d43", [])
|
||||
冷月夜 = Effect_meta("冷月夜", True, "7281165355353951543", "7281165355353951543", "0a9aaba6174a6b1a46d78365bd7fa0c4", [])
|
||||
冷透 = Effect_meta("冷透", True, "7127824802819116302", "7127824802819116302", "06655076bb1cf6ce7c6e3b23d027496f", [])
|
||||
净白 = Effect_meta("净白", True, "7127667352782572807", "7127667352782572807", "c13995808d8fbfdf9ed2b9f2873dfea7", [])
|
||||
净透 = Effect_meta("净透", True, "7127666004477414687", "7127666004477414687", "bc8357fb00d1824e2ceaed463bc611b6", [])
|
||||
凛风 = Effect_meta("凛风", True, "7189593678816513340", "7189593678816513340", "c270ecab8fc6c7db7bbf30da6ea69ecd", [])
|
||||
初雪 = Effect_meta("初雪", True, "7166473491737283873", "7166473491737283873", "50cf99c6a27c0a6e284fcc34afbe5e13", [])
|
||||
初雪II = Effect_meta("初雪II", True, "7307159461724966185", "7307159461724966185", "348ff04e81ba87ea2638a5aa8282ff05", [])
|
||||
劲闯 = Effect_meta("劲闯", True, "7248568097660013864", "7248568097660013864", "9822ae48045e256dfb2ca2369c368d47", [])
|
||||
原生肤 = Effect_meta("原生肤", True, "7366582938638503187", "7366582938638503187", "8dc66d930e2420c9c035182ddbd3d627", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
去灰 = Effect_meta("去灰", True, "7127559231062002951", "7127559231062002951", "21c377ab968576732daa1643051b735c", [])
|
||||
去灰II = Effect_meta("去灰II", True, "7226991425160858937", "7226991425160858937", "e58c1b8d3539cb1e89c37dc56b934369", [])
|
||||
去黄 = Effect_meta("去黄", True, "7302338306849656127", "7302338306849656127", "f4fcb8afc69acb229dec8764320e42a3", [])
|
||||
古早记忆 = Effect_meta("古早记忆", True, "7366562482812456255", "7366562482812456255", "3a6086410283e0166d65d7935faa3809", [])
|
||||
古筑 = Effect_meta("古筑", True, "7226238008201104698", "7226238008201104698", "77e37950cce407b97cc09888476d64cc", [])
|
||||
古都 = Effect_meta("古都", True, "7127615616525126949", "7127615616525126949", "ce6f674fe7eebb2be94a3784496d2d4f", [])
|
||||
吉宵 = Effect_meta("吉宵", True, "7190241639070174503", "7190241639070174503", "14910132a5caef71f9fa0a1076098026", [])
|
||||
向晚 = Effect_meta("向晚", True, "7226254370084490554", "7226254370084490554", "f16c7f86eb94ede08374f3485d9de7f6", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
味蕾 = Effect_meta("味蕾", True, "7281166220794055997", "7281166220794055997", "04205b3010d2adedb961380ceb679a6b", [])
|
||||
哈苏I = Effect_meta("哈苏I", True, "7291596720956329266", "7291596720956329266", "df3882769e455938b11f5596ac569e49", [])
|
||||
哈苏II = Effect_meta("哈苏II", True, "7291560741885480250", "7291560741885480250", "498b45335903ffa59cef94ac0376fd38", [])
|
||||
哈苏蓝 = Effect_meta("哈苏蓝", True, "7361792059109313811", "7361792059109313811", "45392b51287027d5fa5249495c6a9007", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
哥谭 = Effect_meta("哥谭", True, "7337928347118275890", "7337928347118275890", "25575caefd72dfcac744d7aa717d4c1f", [])
|
||||
增色 = Effect_meta("增色", True, "7283013745788357925", "7283013745788357925", "c1dffcebde80cca62c000f8f023065c8", [])
|
||||
墨林 = Effect_meta("墨林", True, "7271284653816843554", "7271284653816843554", "a311fa20eacf38b912c183627e008ff5", [])
|
||||
夏日粉 = Effect_meta("夏日粉", True, "7261469707138518283", "7261469707138518283", "b667443ab8554ad725bd72bb9cabab2b", [])
|
||||
多巴胺 = Effect_meta("多巴胺", True, "7237441824611224889", "7237441824611224889", "83ec0f2e61d762e17830bd55ca08e8d3", [])
|
||||
夜景增色 = Effect_meta("夜景增色", True, "7341302999068757259", "7341302999068757259", "f144c6f9e9accae6cb76c2b11b9549b2", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
夜雾 = Effect_meta("夜雾", True, "7168110568673479948", "7168110568673479948", "e6b2ff75ac938639d840ec586264c2f5", [])
|
||||
# 夜雾 = Effect_meta("夜雾", True, "7132866902367423748", "7132866902367423748", "e6b2ff75ac938639d840ec586264c2f5", [])
|
||||
奥林巴斯 = Effect_meta("奥林巴斯", True, "7361792068475325735", "7361792068475325735", "a523adb5976eb5a39d963683f520551f", [])
|
||||
奶昔 = Effect_meta("奶昔", True, "7172169921726565670", "7172169921726565670", "ca0cc9a987f8eca36ac97a5b5d6a5327", [])
|
||||
奶杏 = Effect_meta("奶杏", True, "7127670311775898917", "7127670311775898917", "bc9612d23f668596ecc50c1e636ed7e8", [])
|
||||
好莱坞I = Effect_meta("好莱坞I", True, "7226994281414692155", "7226994281414692155", "b255b7959f2c621cdbc5aa7cda9e7583", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
好莱坞II = Effect_meta("好莱坞II", True, "7226995248814165308", "7226995248814165308", "41348d00e1ab4f1dbe6832f8b6224c13", [])
|
||||
好莱坞III = Effect_meta("好莱坞III", True, "7312617341710372107", "7312617341710372107", "59b8ade3560f637686d6e4b0f56f97fe", [])
|
||||
好莱坞IV = Effect_meta("好莱坞IV", True, "7312647197462367524", "7312647197462367524", "12657ebf4545c621bc0ca38944b9712c", [])
|
||||
嫩肤 = Effect_meta("嫩肤", True, "7300523145818148096", "7300523145818148096", "f79fa85e5e9238570b84b95505406213", [])
|
||||
子弹列车 = Effect_meta("子弹列车", True, "7202480777387445507", "7202480777387445507", "ee8aa0105ea992ace4fc114c34b08adc", [])
|
||||
家宴 = Effect_meta("家宴", True, "7330584144524643595", "7330584144524643595", "1cb453a49c768a3f9c086b047321c233", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
宿营 = Effect_meta("宿营", True, "7127822311708691726", "7127822311708691726", "e8ad70a709e7a37282ee64779c874732", [])
|
||||
富士CC_I = Effect_meta("富士CC I", True, "7268561936344780086", "7268561936344780086", "069ae1d53dc300c85b017cdf6df18550", [])
|
||||
富士NC_I = Effect_meta("富士NC I", True, "7159156535640296737", "7159156535640296737", "bdce583bf77430b24e9f7d78d40a69eb", [])
|
||||
富士NC_II = Effect_meta("富士NC II", True, "7159408376378559747", "7159408376378559747", "0fce68168c67f99c11bf1e05e933eb79", [])
|
||||
富士NC_III = Effect_meta("富士NC III", True, "7159134459088899339", "7159134459088899339", "25f1e0d1d5997b56577a96de8de2005d", [])
|
||||
富士蓝 = Effect_meta("富士蓝", True, "7246720031118101816", "7246720031118101816", "ca146f44fb50a5c1335149b2c1bd0079", [])
|
||||
富士蓝II = Effect_meta("富士蓝II", True, "7226994246471945530", "7226994246471945530", "43bee1438c8372b1f4a8857650fab808", [])
|
||||
富士青 = Effect_meta("富士青", True, "7226994214029184313", "7226994214029184313", "77bfdff2d848539626acd538429cc660", [])
|
||||
小麦肌 = Effect_meta("小麦肌", True, "7131507906737917220", "7131507906737917220", "0498d2f3ee88c8073f774e908ade3400", [])
|
||||
小麦色 = Effect_meta("小麦色", True, "7362076973981584691", "7362076973981584691", "ea639b8e75457d08c026eb753f8704e5", [])
|
||||
尘烟 = Effect_meta("尘烟", True, "7148958479326153991", "7148958479326153991", "d649f05e5cc2f0f7a93d703418a4d7ee", [])
|
||||
山晴 = Effect_meta("山晴", True, "7246723856222719269", "7246723856222719269", "acbd5fdb5b04114a6eedffdf716ed6b3", [])
|
||||
山本 = Effect_meta("山本", True, "7156638423191784735", "7156638423191784735", "9bf35c896fe6637a3cd8017f5fc8eaed", [])
|
||||
岚夏 = Effect_meta("岚夏", True, "7260771472107441471", "7260771472107441471", "5d9760bfa20e1745f2da9d0dddc1f8f3", [])
|
||||
岩灰 = Effect_meta("岩灰", True, "7221472488079904060", "7221472488079904060", "fdd078505b4a102962d962cf461e9544", [])
|
||||
底特律 = Effect_meta("底特律", True, "7336763348492553499", "7336763348492553499", "d1bcdfe293f329d701a0df1ef4ab5e16", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
彩光 = Effect_meta("彩光", True, "7127824109093866760", "7127824109093866760", "0aeae3c00b2ff3d26f0bba78a0f0cda5", [])
|
||||
影部 = Effect_meta("影部", True, "7168136171673963787", "7168136171673963787", "57ebfdd7bdad96f19879e1635d823fb8", [])
|
||||
徕卡I = Effect_meta("徕卡I", True, "7268562944093408523", "7268562944093408523", "91730e54e94b7eeb40bcfbd8f7c9a3cf", [])
|
||||
徕卡II = Effect_meta("徕卡II", True, "7268563047776587020", "7268563047776587020", "a75e26160d19e9db7d9be10f6e8056b7", [])
|
||||
心动夏 = Effect_meta("心动夏", True, "7261461692096220428", "7261461692096220428", "daffbda5fec8238d91024cb36610023d", [])
|
||||
忆山 = Effect_meta("忆山", True, "7271278427309755688", "7271278427309755688", "919dd48c0590b884f6aabc4f46f63b3f", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
快照II = Effect_meta("快照II", True, "7143760738765655310", "7143760738765655310", "94a1e1cdca9b003126ac25d1df655263", [])
|
||||
怦然心动 = Effect_meta("怦然心动", True, "7195889899738909990", "7195889899738909990", "48ce7e2b8db89c5f411f53d6d7750cb7", [])
|
||||
恍光 = Effect_meta("恍光", True, "7237446176629345593", "7237446176629345593", "9c7e3ff19468cb967d0ff9b0d79ea23d", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
慕斯 = Effect_meta("慕斯", True, "7261185427703418169", "7261185427703418169", "038504b6474c25b4ce735d1d165c4198", [])
|
||||
捕风 = Effect_meta("捕风", True, "7248566556593098024", "7248566556593098024", "2ebec31165718f44bbd2ecbc338c175a", [])
|
||||
摩登 = Effect_meta("摩登", True, "7131219052021779719", "7131219052021779719", "178dab15fb53b396f20c89ccaec799a2", [])
|
||||
攀岩 = Effect_meta("攀岩", True, "7195930274918567180", "7195930274918567180", "928cb605e08b3e72110837d55afaa9d9", [])
|
||||
日和 = Effect_meta("日和", True, "7338311462277991718", "7338311462277991718", "70b43e53688e11ab0f849a5768cf6f6f", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
旧时代II = Effect_meta("旧时代II", True, "7232217903536409893", "7232217903536409893", "779a72d4b71cd42f470008749a165d93", [])
|
||||
旧时来信 = Effect_meta("旧时来信", True, "7366562830486621459", "7366562830486621459", "1680dbb9fafa20e0a3c81e56b038508f", [])
|
||||
旧金山 = Effect_meta("旧金山", True, "7159161900389977382", "7159161900389977382", "22f238fa32975ad165c124316008ab31", [])
|
||||
旷野 = Effect_meta("旷野", True, "7275698024892943655", "7275698024892943655", "5d52166c545e774971e36e50cb218f04", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
旷野蓝 = Effect_meta("旷野蓝", True, "7131513310733765918", "7131513310733765918", "80b306543cb7373bc89f06ae76629ebe", [])
|
||||
明肤 = Effect_meta("明肤", True, "7302334059890478347", "7302334059890478347", "db19d8273ad16417298afc8b9038778a", [])
|
||||
春风 = Effect_meta("春风", True, "7148963827239963918", "7148963827239963918", "ae9468b81643a706f5cae5761eff19b8", [])
|
||||
昭和 = Effect_meta("昭和", True, "7195780237790154042", "7195780237790154042", "211b05e6793f255052a1cc463864ed3d", [])
|
||||
晚宴 = Effect_meta("晚宴", True, "7302041028205333786", "7302041028205333786", "af499ef2d522dda0857f2be9c7db00d0", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
晚晴 = Effect_meta("晚晴", True, "7297143895408839947", "7297143895408839947", "987e48eb485c58a239d5d67d01b9c76a", [])
|
||||
晚樱 = Effect_meta("晚樱", True, "7127609541839129886", "7127609541839129886", "c30e126bfe5accdb5902c5ba63c8579e", [])
|
||||
晚霞 = Effect_meta("晚霞", True, "7278616055470165285", "7278616055470165285", "4964c30b3df8eb4cca5831bffa864ecb", [])
|
||||
晚霞增色 = Effect_meta("晚霞增色", True, "7392898170524618023", "7392898170524618023", "ed6efd67ec78c21a530046b4a6cfbb66", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
普林斯顿 = Effect_meta("普林斯顿", True, "7127615578705104135", "7127615578705104135", "ab9e14d92af596b94e91fd6253b510cd", [])
|
||||
晴冬 = Effect_meta("晴冬", True, "7307159401838726441", "7307159401838726441", "d8264137bd37822e87e482593926f0a6", [])
|
||||
晴好 = Effect_meta("晴好", True, "7281163707227344189", "7281163707227344189", "8ab42295fd5c3f9671dc860cab4cf822", [])
|
||||
晴好假日 = Effect_meta("晴好假日", True, "7374709776623635724", "7374709776623635724", "9747e32d2ec1f251aee54d080ec5fc84", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
晴春 = Effect_meta("晴春", True, "7346542846863887635", "7346542846863887635", "ed510f73b526d21d1fcabfc410f664b8", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
晴空 = Effect_meta("晴空", True, "7127558139058179342", "7127558139058179342", "5b5899ce01e0aac5b8f15a2f77c4ee62", [])
|
||||
晴肤 = Effect_meta("晴肤", True, "7365842976691604763", "7365842976691604763", "c3d640b01c7bb7f6ab7ebd598bf92811", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
晶透 = Effect_meta("晶透", True, "7199095242476293435", "7199095242476293435", "17e30bbde014d6688a3b00203a7a8ea8", [])
|
||||
暖冬 = Effect_meta("暖冬", True, "7171607744900877600", "7171607744900877600", "ebfd26418a2c446b0d9a03d43b6c1f09", [])
|
||||
暖晨 = Effect_meta("暖晨", True, "7312646382395936010", "7312646382395936010", "03737fce45a4ba22d225edbe7e36a04c", [])
|
||||
暖黄 = Effect_meta("暖黄", True, "7127830631601458440", "7127830631601458440", "7c7c4a40d7c44698a9db145eb8260156", [])
|
||||
暗匣 = Effect_meta("暗匣", True, "7159163878822153483", "7159163878822153483", "00729c25c8b262db946bb5ac80b8d1dc", [])
|
||||
暗夜明肤 = Effect_meta("暗夜明肤", True, "7328364126449765671", "7328364126449765671", "9fe0da0817604428adb38249ecae911c", [])
|
||||
暗影 = Effect_meta("暗影", True, "7291203298630159676", "7291203298630159676", "21f3af497daf847e50efadc241f88a1a", [])
|
||||
暗曛 = Effect_meta("暗曛", True, "7281163501047991608", "7281163501047991608", "893d483cd405343c9420015066e56096", [])
|
||||
暗银 = Effect_meta("暗银", True, "7177725752513793284", "7177725752513793284", "ad378d530ac056cb2b2e0b0ab171ede8", [])
|
||||
暗银II = Effect_meta("暗银II", True, "7223630575888780602", "7223630575888780602", "33f209efb496924d6da0c7ad89bea81f", [])
|
||||
暮川 = Effect_meta("暮川", True, "7262351934785408267", "7262351934785408267", "187450ba96a5e11233e9d38396274d87", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
暮色约会 = Effect_meta("暮色约会", True, "7332396398157090089", "7332396398157090089", "920f4d54eb383be7327d76689d96f1a5", [])
|
||||
月吟 = Effect_meta("月吟", True, "7168108694285159719", "7168108694285159719", "98ee4013998d056bf434a4d2c62cf548", [])
|
||||
# 月吟 = Effect_meta("月吟", True, "7132787977171766539", "7132787977171766539", "465157acdab059cfa20046ba607ae618", [])
|
||||
松绿 = Effect_meta("松绿", True, "7246723559047941433", "7246723559047941433", "1aca4ded18b11bff899309955ed07c5c", [])
|
||||
果酥 = Effect_meta("果酥", True, "7160594387594972446", "7160594387594972446", "f68ff633bab02132880a03034894d378", [])
|
||||
柔焦 = Effect_meta("柔焦", True, "7345412316621442354", "7345412316621442354", "e9449745f95a354e4d835961cbb0e674", [])
|
||||
柔绀 = Effect_meta("柔绀", True, "7189592131118320954", "7189592131118320954", "ab2c4bebda2329ec36efd65b725a37cb", [])
|
||||
栩栩 = Effect_meta("栩栩", True, "7177259623819316519", "7177259623819316519", "09c34a30d79f4c7332267b16eaca664e", [])
|
||||
格金 = Effect_meta("格金", True, "7348301778909252879", "7348301778909252879", "256144ddabaf723badea240301660868", [])
|
||||
桃木 = Effect_meta("桃木", True, "7252673818035064124", "7252673818035064124", "7e5d4fb53f764eaa07d6e465fd60588e", [])
|
||||
桃粉 = Effect_meta("桃粉", True, "7297131749346135331", "7297131749346135331", "80b55b69c2b4662c65835f49ee46ad97", [])
|
||||
桐影 = Effect_meta("桐影", True, "7275699191253339455", "7275699191253339455", "b77671ede2639384b704eb73722e928a", [])
|
||||
梦境 = Effect_meta("梦境", True, "7127675251604917517", "7127675251604917517", "12627ad5e79adab77540c65ea8ee7cc2", [])
|
||||
梦幻雪乡 = Effect_meta("梦幻雪乡", True, "7328364320276876598", "7328364320276876598", "e39ddb22d6d8da4f2dea3f9025c0f92f", [])
|
||||
梦核紫 = Effect_meta("梦核紫", True, "7261463763344248103", "7261463763344248103", "41ed7e729f06a288363ca93a928f8a90", [])
|
||||
棕榈 = Effect_meta("棕榈", True, "7252676190073392444", "7252676190073392444", "113b463fa3945ef37700c7c52dfc6bb9", [])
|
||||
森山 = Effect_meta("森山", True, "7242215081663008056", "7242215081663008056", "0dc17be521cf783590bebcf2a5c888df", [])
|
||||
森秋 = Effect_meta("森秋", True, "7274575376095923497", "7274575376095923497", "b055e64a58bd8d9b882477c9be6ef3a6", [])
|
||||
榄白 = Effect_meta("榄白", True, "7169350167903112451", "7169350167903112451", "6068c4a2ea7f0854027347a938115dae", [])
|
||||
橙蓝 = Effect_meta("橙蓝", True, "7127561047048850718", "7127561047048850718", "4dd590015f2e14265dd5456a91ec86a6", [])
|
||||
殷粉 = Effect_meta("殷粉", True, "7169357894868061478", "7169357894868061478", "91d27d5647faec40a747359ec6dd6eb4", [])
|
||||
沙砾 = Effect_meta("沙砾", True, "7160580722774920461", "7160580722774920461", "a796471629be7b3bfbd649deafca3ddb", [])
|
||||
法餐 = Effect_meta("法餐", True, "7127655700532186398", "7127655700532186398", "b8b6d5ae88e12e25be14a2dd85b7cbc6", [])
|
||||
浅茶 = Effect_meta("浅茶", True, "7221481120083283257", "7221481120083283257", "6acf81ddf75fc8c5ddb20f3a927dcaa3", [])
|
||||
浅草 = Effect_meta("浅草", True, "7195783041376111932", "7195783041376111932", "8c4eb75992a7f07bd07e56c16b388d87", [])
|
||||
润光 = Effect_meta("润光", True, "7199093300526173501", "7199093300526173501", "3916e1d5dc3a3522f4b883c3b1f2b43a", [])
|
||||
润白 = Effect_meta("润白", True, "7366518614729493799", "7366518614729493799", "1686ce704f4899b9e9a1e42693f24037", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
淡奶油 = Effect_meta("淡奶油", True, "7127668617101020423", "7127668617101020423", "e53103dabd1bbb6ab4481b18a4c42b2c", [])
|
||||
清新润颜 = Effect_meta("清新润颜", True, "7383551596023663882", "7383551596023663882", "738937971c198e9952e91f08adaa8227", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
清晰ll = Effect_meta("清晰ll", True, "7127669764792634637", "7127669764792634637", "7b2ad7edaed946467ab161d016cfca93", [])
|
||||
清爽 = Effect_meta("清爽", True, "7392897785755897100", "7392897785755897100", "c012321a086ec42b7570338f557a713e", [])
|
||||
漠土 = Effect_meta("漠土", True, "7347670931646549282", "7347670931646549282", "9dfde36f1fab0e85773d04fadeb30650", [])
|
||||
# 漫夏 = Effect_meta("漫夏", True, "7210756366317686054", "7210756366317686054", "9517c7a5e9f82a3964dd3967a2b6273f", [])
|
||||
漫樱 = Effect_meta("漫樱", True, "7356883843376221475", "7356883843376221475", "1799ab3b4a9bf0957995b69d27195229", [])
|
||||
漫空 = Effect_meta("漫空", True, "7210749292888280359", "7210749292888280359", "cd88f8152fffe8033bb5057fc2539319", [])
|
||||
漫荫 = Effect_meta("漫荫", True, "7210758351595048195", "7210758351595048195", "fc46efdc25a15ca3958126a8c72c1cd8", [])
|
||||
漱石 = Effect_meta("漱石", True, "7145394477249678606", "7145394477249678606", "ac50156682af7d7ce4e76eb731a5a832", [])
|
||||
潘多拉 = Effect_meta("潘多拉", True, "7127620215290039566", "7127620215290039566", "36e7d537966ee59eb61c326598546cb0", [])
|
||||
灯会 = Effect_meta("灯会", True, "7145394908608662814", "7145394908608662814", "21472133401674a3e5645f79e9d30ae9", [])
|
||||
灰麻 = Effect_meta("灰麻", True, "7312645421271158070", "7312645421271158070", "38ff7fc68c3ad9d76d9527a6d0b560cb", [])
|
||||
炊烟 = Effect_meta("炊烟", True, "7194083900333755704", "7194083900333755704", "924d2235bf0485217a6897fb9504b456", [])
|
||||
烈空 = Effect_meta("烈空", True, "7246722333010824508", "7246722333010824508", "849e979a487594a0da039ddd33e43c6b", [])
|
||||
烘挞 = Effect_meta("烘挞", True, "7160598329817091364", "7160598329817091364", "8df6f056381a16178b36fa8ad6e559bf", [])
|
||||
烟橙 = Effect_meta("烟橙", True, "7131582482608164132", "7131582482608164132", "e958619538087c86308f718045b292f2", [])
|
||||
烟花璀璨 = Effect_meta("烟花璀璨", True, "7328363415313993001", "7328363415313993001", "0d2282c9172ed09758f861849916ab4b", [])
|
||||
热带季风 = Effect_meta("热带季风", True, "7377368986276646171", "7377368986276646171", "2879146129f3375e8fefc940fe970397", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
焕肤 = Effect_meta("焕肤", True, "7127674287238008078", "7127674287238008078", "073940956259c1077acaec764f52f31c", [])
|
||||
焰色 = Effect_meta("焰色", True, "7131539023817936158", "7131539023817936158", "a5496033c5eac6ada1c761f1f5e6fcd0", [])
|
||||
爱之城 = Effect_meta("爱之城", True, "7131656881805741325", "7131656881805741325", "3531cd81550d23dd7d10b4b8ec90ba9f", [])
|
||||
爱之城II = Effect_meta("爱之城II", True, "7337929076042222899", "7337929076042222899", "1635b6718619a9832177e25c33f1968b", [])
|
||||
牙白 = Effect_meta("牙白", True, "7172285234296278309", "7172285234296278309", "1c6bd0a57d892c86c845666b44a8f547", [])
|
||||
牧野 = Effect_meta("牧野", True, "7194090104317594938", "7194090104317594938", "aa1bf1455ec02e406df6821e6bb3c4f8", [])
|
||||
独行侠 = Effect_meta("独行侠", True, "7202485617026977056", "7202485617026977056", "50fc4f48bab6acc0b86f42c68a44e3dc", [])
|
||||
玩趣 = Effect_meta("玩趣", True, "7177267248753610023", "7177267248753610023", "3dd9c3beaf276b96f226c49ac2bcbdd0", [])
|
||||
琥珀 = Effect_meta("琥珀", True, "7295599414180138250", "7295599414180138250", "4a9ef682fbe7b4214e681796d4b4c77d", [])
|
||||
画报 = Effect_meta("画报", True, "7239979137404833083", "7239979137404833083", "267ef83e978e1b8282afa81c88e8dfd4", [])
|
||||
登高 = Effect_meta("登高", True, "7195925533031435558", "7195925533031435558", "688df92b416581b9cf33e543ae7ae03b", [])
|
||||
白富美 = Effect_meta("白富美", True, "7302336985513970963", "7302336985513970963", "9fb4286e708d3bbf2b6bc6af85120be2", [])
|
||||
白桃 = Effect_meta("白桃", True, "7300522962937990415", "7300522962937990415", "2c277b4b642fa2a5d7ddd7bff681ff91", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
白色恋人 = Effect_meta("白色恋人", True, "7307158934735883583", "7307158934735883583", "6f7d0dd5f3463b557ed59b993303603d", [])
|
||||
百川 = Effect_meta("百川", True, "7210616269597314362", "7210616269597314362", "cd1f1360bd1891f9b31c63542689d8ea", [])
|
||||
皓影 = Effect_meta("皓影", True, "7303917567058414911", "7303917567058414911", "13892bfe5e6f6b0c0283a4d3e9034778", [])
|
||||
盐系 = Effect_meta("盐系", True, "7127823742830398757", "7127823742830398757", "9d48681f2c1f584e9b93fa37485693d1", [])
|
||||
石山 = Effect_meta("石山", True, "7194091413728922941", "7194091413728922941", "a9faf4808c5ec06b8d2ecc944a3682c6", [])
|
||||
砂金 = Effect_meta("砂金", True, "7131655685321821477", "7131655685321821477", "28c53cc31c04a9a1e714c3c18038af09", [])
|
||||
破晓 = Effect_meta("破晓", True, "7348707347419712794", "7348707347419712794", "0f73c6cf0189f4c0e462e76102e46084", [])
|
||||
硬朗 = Effect_meta("硬朗", True, "7127663097162075399", "7127663097162075399", "7f33d22c16b09c852f48314404c2b532", [])
|
||||
碳烤 = Effect_meta("碳烤", True, "7363537225620983067", "7363537225620983067", "596d7d07b942eff22e9f8aaa47918711", [])
|
||||
私语 = Effect_meta("私语", True, "7127674303306419464", "7127674303306419464", "7f8596dc2626cd91e642c6a17c953390", [])
|
||||
秋池 = Effect_meta("秋池", True, "7145391965717253406", "7145391965717253406", "3a908de0c7ba051b7838f5515d523a2c", [])
|
||||
秋波 = Effect_meta("秋波", True, "7196920471043050812", "7196920471043050812", "0ce8c8224ab832699cae7ebdbd7034e9", [])
|
||||
简餐 = Effect_meta("简餐", True, "7127561998556073247", "7127561998556073247", "0c4b5c50cb8bd668c241a262984f940b", [])
|
||||
粉橘 = Effect_meta("粉橘", True, "7131467442789846285", "7131467442789846285", "30b24cc05d8768de3943d9323af8dc2e", [])
|
||||
粉白 = Effect_meta("粉白", True, "7156647258342034702", "7156647258342034702", "e852a972957c3dadc478d3215639e0e1", [])
|
||||
素净 = Effect_meta("素净", True, "7351018816215764233", "7351018816215764233", "3c792ad3327a3b6774aa89990dacf093", [])
|
||||
素简 = Effect_meta("素简", True, "7300968790391606567", "7300968790391606567", "091f103fae7c3a0480f05be172a0c904", [])
|
||||
素银 = Effect_meta("素银", True, "7307158197675117863", "7307158197675117863", "fca7c6917f26482a6453ffba5fd167c2", [])
|
||||
繁花似锦 = Effect_meta("繁花似锦", True, "7322666518536359204", "7322666518536359204", "f5d1f324f0f06bf4fc783095efd7dc1e", [])
|
||||
繁花如梦 = Effect_meta("繁花如梦", True, "7322665314980859177", "7322665314980859177", "d8bcaf063ca3ef2cd8d5f1642204a35f", [])
|
||||
繁花璀璨 = Effect_meta("繁花璀璨", True, "7322665617373351231", "7322665617373351231", "98b0d8c15909c10ef71f187df3e36c9f", [])
|
||||
红运 = Effect_meta("红运", True, "7325421708809096467", "7325421708809096467", "31a7c3905e75dda75c86e104dcb5d222", [])
|
||||
纱雾 = Effect_meta("纱雾", True, "7260772961462799627", "7260772961462799627", "acde0ae9bd3ee0a6684457d562f35e25", [])
|
||||
美拉德 = Effect_meta("美拉德", True, "7273782607257685309", "7273782607257685309", "f22f3b6e1ef2d6f6e5b7a9e3b753fe18", [])
|
||||
美高 = Effect_meta("美高", True, "7239236880858877217", "7239236880858877217", "29446ccd642910767b50978b2fe45f4b", [])
|
||||
羽梦 = Effect_meta("羽梦", True, "7213573482850880827", "7213573482850880827", "ee8c5d6e7808f4e6662d42298104b87b", [])
|
||||
聚焦 = Effect_meta("聚焦", True, "7320428711487098153", "7320428711487098153", "54fcd82f212e40df18ac882bd748f59c", [])
|
||||
艾丽莎 = Effect_meta("艾丽莎", True, "7269240546810400011", "7269240546810400011", "720b5b57295f927d983152d9bffcf33c", [])
|
||||
花间 = Effect_meta("花间", True, "7211008985187487036", "7211008985187487036", "6acce0fe02d2e0328e597abcb1043de3", [])
|
||||
花间II = Effect_meta("花间II", True, "7356877435184450851", "7356877435184450851", "78e26d36522db19bd16b83f52ae81593", [])
|
||||
花食 = Effect_meta("花食", True, "7261180740283403578", "7261180740283403578", "37b2683488f5e586c98256dab864ab84", [])
|
||||
苍橘 = Effect_meta("苍橘", True, "7131605817958075685", "7131605817958075685", "43666fcf1f38cb2036f87b7e496ccec4", [])
|
||||
茶酪 = Effect_meta("茶酪", True, "7160603159486827783", "7160603159486827783", "3115e57bcd131acf89d8bdef6cd11cbd", [])
|
||||
莫吉托 = Effect_meta("莫吉托", True, "7131419324622982408", "7131419324622982408", "c1a69c9148f223e97a862268a91c3e95", [])
|
||||
落日派对 = Effect_meta("落日派对", True, "7374708995501739305", "7374708995501739305", "e00847299fab64d98f8ae309c62b98aa", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
落日粉 = Effect_meta("落日粉", True, "7368141858603666698", "7368141858603666698", "66dd18db6e7d8f042e7cf8cd02e64af4", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
落日鎏金 = Effect_meta("落日鎏金", True, "7374251948058447158", "7374251948058447158", "f5154a29054db9946d66ed823cb58006", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
蓝梦核 = Effect_meta("蓝梦核", True, "7237440664139484473", "7237440664139484473", "0d12a669f41b3b92d1a892f42b9e0d9b", [])
|
||||
蓝橙II = Effect_meta("蓝橙II", True, "7337929426493132058", "7337929426493132058", "40056bb94f392bdc1ab305683e265b2b", [])
|
||||
蓝灰 = Effect_meta("蓝灰", True, "7127667757839076645", "7127667757839076645", "aa8ef49b3edba824d41f097effe534c0", [])
|
||||
蓝调 = Effect_meta("蓝调", True, "7127664822921022734", "7127664822921022734", "3f0f50b54a2486b3fe5cfbb68dfaeaae", [])
|
||||
蓝调时刻 = Effect_meta("蓝调时刻", True, "7392898023505792319", "7392898023505792319", "1bcdd5c706e257d4935503a026ee6b20", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
蓝调烟火 = Effect_meta("蓝调烟火", True, "7328363887542209828", "7328363887542209828", "fe2367155cae2d1d5c07c10a64e3b6ef", [])
|
||||
蓝调舞曲 = Effect_meta("蓝调舞曲", True, "7366562845120646463", "7366562845120646463", "95d43f9239219401b66eae286f0ccc1c", [])
|
||||
蓝都 = Effect_meta("蓝都", True, "7166470141494955297", "7166470141494955297", "1bd22b8a07bc26b8bbd598414f67a13b", [])
|
||||
蓝金 = Effect_meta("蓝金", True, "7341300292148907327", "7341300292148907327", "4107fa238d7b56801c9cc3a4a3a15c32", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
裸粉 = Effect_meta("裸粉", True, "7127671519450303775", "7127671519450303775", "cea47ac2c5469b0c7630c2bcd83e3e87", [])
|
||||
西冷 = Effect_meta("西冷", True, "7131899038625975559", "7131899038625975559", "582a118ed87f8ddfbf2bab6ce6ccbba2", [])
|
||||
西西里 = Effect_meta("西西里", True, "7131488780451663140", "7131488780451663140", "36c35e9b449bd69a2d186c044c8032c8", [])
|
||||
西雅图 = Effect_meta("西雅图", True, "7159175960414194982", "7159175960414194982", "d89963be26099b79db297b25e18011a6", [])
|
||||
诗诺 = Effect_meta("诗诺", True, "7330543523042708790", "7330543523042708790", "ddc9145845f6f5548aba0c4f5ceb76ed", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
象牙白 = Effect_meta("象牙白", True, "7234799040184012092", "7234799040184012092", "f73f4e38a3028c844f4a3d87cfe5d30b", [])
|
||||
贝果 = Effect_meta("贝果", True, "7131656881805856013", "7131656881805856013", "21f8c68e7dd3fe22071ed06d21cc328a", [])
|
||||
赏味 = Effect_meta("赏味", True, "7127608379056459015", "7127608379056459015", "d29bc8b2ddd9d018da1309ba9a467517", [])
|
||||
赤墙 = Effect_meta("赤墙", True, "7226238039155150139", "7226238039155150139", "13130d2c72bde7a34001d2ff74ea9ac1", [])
|
||||
超白 = Effect_meta("超白", True, "7302338645938261287", "7302338645938261287", "08f7a0eb8cd3535a23b4360acc4cc2f0", [])
|
||||
越岭 = Effect_meta("越岭", True, "7193989203930123554", "7193989203930123554", "80634d76c41bb167ee4c2bec4172235b", [])
|
||||
越野 = Effect_meta("越野", True, "7195931118166609190", "7195931118166609190", "f8f340ecb359e2dd7f155da84b06f013", [])
|
||||
过期电影卷 = Effect_meta("过期电影卷", True, "7361791960652238143", "7361791960652238143", "7b98e4262666c36aeb965842cd14d10a", [])
|
||||
迷幻 = Effect_meta("迷幻", True, "7233731748545203493", "7233731748545203493", "6eb7969f4e1becb256c90950b3cb8eb3", [])
|
||||
迷雾 = Effect_meta("迷雾", True, "7160594413847203085", "7160594413847203085", "5143fc0b35bca33c7b010458ffe8f1d7", [])
|
||||
逆光提亮 = Effect_meta("逆光提亮", True, "7366260047401323811", "7366260047401323811", "8990c9bac399f2eaedfd706d99dbdd4e", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
透亮 = Effect_meta("透亮", True, "7127620232104955150", "7127620232104955150", "62319c31caf875d0041e0bfa50d1b9d7", [])
|
||||
邂逅 = Effect_meta("邂逅", True, "7271145889119440147", "7271145889119440147", "6b6957bc110b65e03bc5d9ae65de6d66", [])
|
||||
郁金香 = Effect_meta("郁金香", True, "7343831195924303123", "7343831195924303123", "15e11e4352b9891fd1a1969ff7841b6b", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
都卡 = Effect_meta("都卡", True, "7341296364598480178", "7341296364598480178", "fac476280a61adbc7a731a9ee538b0b1", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
都市 = Effect_meta("都市", True, "7312646683672825100", "7312646683672825100", "486a70b4dc6b3cbedf1ad34461022d78", [])
|
||||
酚蓝 = Effect_meta("酚蓝", True, "7131322091839753502", "7131322091839753502", "483ca6c547361c0868c8922cebebd893", [])
|
||||
醒春 = Effect_meta("醒春", True, "7211006465358843196", "7211006465358843196", "3544111511d3c365e3068023059ed83e", [])
|
||||
里昂 = Effect_meta("里昂", True, "7131643870714006821", "7131643870714006821", "634a11a0d1a1b69aa4ac2770aa47c7dc", [])
|
||||
野趣 = Effect_meta("野趣", True, "7193983160231742772", "7193983160231742772", "dc9a0e3b25c1b462e5c684ac64bbb1b7", [])
|
||||
金喜 = Effect_meta("金喜", True, "7323022101735083315", "7323022101735083315", "184ae43f227bd4d20edab495a6574610", [])
|
||||
金姜 = Effect_meta("金姜", True, "7233733326517832995", "7233733326517832995", "5116f63c46a435d34ccb83fd58b3d009", [])
|
||||
金色韶华 = Effect_meta("金色韶华", True, "7376141023656873254", "7376141023656873254", "6fe8d7f355b0895a9b4bd4110d7f58d4", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
银蓝 = Effect_meta("银蓝", True, "7145394266209127694", "7145394266209127694", "e1f2f32043ab9fd801bfdbc9a9f708d3", [])
|
||||
镜粉 = Effect_meta("镜粉", True, "7145390299370638600", "7145390299370638600", "26b6e129d49359d3112438c001f22926", [])
|
||||
闪星 = Effect_meta("闪星", True, "7346450662185569555", "7346450662185569555", "f9bdd96e9282b3783dcc174484aa5fc6", [])
|
||||
阳光肤 = Effect_meta("阳光肤", True, "7234795543178775868", "7234795543178775868", "116a1adcf464b736d76bf31d679b3d72", [])
|
||||
陶瓷肌 = Effect_meta("陶瓷肌", True, "7234793127867878712", "7234793127867878712", "e7b66853ca5dbdb1c049d45225b355cb", [])
|
||||
随性 = Effect_meta("随性", True, "7271140658071588132", "7271140658071588132", "6619560c233df84381e8c371b7387faa", [])
|
||||
雨空 = Effect_meta("雨空", True, "7196917591909109052", "7196917591909109052", "ffe686005136a692517b6e19e4e490e7", [])
|
||||
雪挞 = Effect_meta("雪挞", True, "7262376135202327871", "7262376135202327871", "319cab31ed6a056c3f5256a357eb9b96", [])
|
||||
雪肤 = Effect_meta("雪肤", True, "7307211406590364955", "7307211406590364955", "03a6b1da7a8fac8dbab32754d9d6655d", [])
|
||||
雾都 = Effect_meta("雾都", True, "7312646650202262820", "7312646650202262820", "00b8522f76bf9a991e0a6090f63747ee", [])
|
||||
雾野 = Effect_meta("雾野", True, "7127823362356727077", "7127823362356727077", "6fbd00682d2a15e079bc242301e9b757", [])
|
||||
青提 = Effect_meta("青提", True, "7131290518838938887", "7131290518838938887", "8ddee3f2a95239705898ac4892cdc803", [])
|
||||
青灰 = Effect_meta("青灰", True, "7127671508264078599", "7127671508264078599", "a9b480c9b5bf91d2aa0b5e8388f53746", [])
|
||||
青蒲 = Effect_meta("青蒲", True, "7145393992673414407", "7145393992673414407", "7cd919e92b66b19e00c95b9f3db9def8", [])
|
||||
青黄 = Effect_meta("青黄", True, "7127541821332409630", "7127541821332409630", "e777bf266933df88bfc019a84e6dd792", [])
|
||||
青黄II = Effect_meta("青黄II", True, "7337932621046910262", "7337932621046910262", "059b7e40c1fe52a2451c35bd82e329e5", [])
|
||||
风味 = Effect_meta("风味", True, "7330579916272012580", "7330579916272012580", "7abbb099b234e92b6a7169f2ae6232b6", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
风铃II = Effect_meta("风铃II", True, "7356885346841349410", "7356885346841349410", "7e36a3f345976371e7a668d1e96c7905", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
风铃蓝 = Effect_meta("风铃蓝", True, "7261466919688015140", "7261466919688015140", "5bf0d1478c19629df96ad85b3301ec35", [])
|
||||
飒意 = Effect_meta("飒意", True, "7248568718265978112", "7248568718265978112", "25a705fe908fad028d75a5b9bf30e4b7", [])
|
||||
食色 = Effect_meta("食色", True, "7131644140340776205", "7131644140340776205", "8540ba0ddb988c6f5f4b69742ca94136", [])
|
||||
香浓 = Effect_meta("香浓", True, "7330588808666156307", "7330588808666156307", "480c2599aaaf7be5a800c269dada7cdd", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
驮月 = Effect_meta("驮月", True, "7145394213339860261", "7145394213339860261", "ba8a3a6272282d63ee8b46c2e228e09b", [])
|
||||
高清 = Effect_meta("高清", True, "7320436048134147340", "7320436048134147340", "a33cc5e4879a6f4d03e2f4f7535c96b2", [])
|
||||
高清II = Effect_meta("高清II", True, "7325426821267295551", "7325426821267295551", "17a86357c081e0d080c9d501a66382d0", [])
|
||||
魅影 = Effect_meta("魅影", True, "7175076304058895619", "7175076304058895619", "361328c4bc995c85053ea003268aefbf", [])
|
||||
魔都 = Effect_meta("魔都", True, "7166480345666260263", "7166480345666260263", "cf4adfafcc5e59b9bddd8eeb4d20f44e", [])
|
||||
鲜亮 = Effect_meta("鲜亮", True, "7127615338035858702", "7127615338035858702", "329252a715f5e0f9727810511e0e9832", [])
|
||||
鲜明 = Effect_meta("鲜明", True, "7320434750018047251", "7320434750018047251", "ba8b7cbf504c97a30c923d0d6a6c2b44", [])
|
||||
鲜明II = Effect_meta("鲜明II", True, "7361400073533820196", "7361400073533820196", "350ff543fdd150a6f7e571aa3f467640", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
鲜美 = Effect_meta("鲜美", True, "7330581892510649636", "7330581892510649636", "0f2146e69f0cf22a0e0aa733be623bd4", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
黄昏 = Effect_meta("黄昏", True, "7272330168717430075", "7272330168717430075", "eebcc8f84ff895bd0d66535d9ad44275", [])
|
||||
黑冰 = Effect_meta("黑冰", True, "7131522303082466597", "7131522303082466597", "d03c03e8f1e67f5cff0a5671fe96dfb9", [])
|
||||
黑曜 = Effect_meta("黑曜", True, "7223712396769119545", "7223712396769119545", "3b81efb578ddec8efa40dd0c5b754056", [])
|
||||
黑金 = Effect_meta("黑金", True, "7127670164996295972", "7127670164996295972", "bfd8bd193bf24f5de2bd719516ef230d", [])
|
||||
黑金红 = Effect_meta("黑金红", True, "7341266486536768831", "7341266486536768831", "66796ec5de5e85b2cf461fa49b4c0225", [
|
||||
Effect_param("effects_adjust_filter", 1.000, 0.000, 1.000)])
|
||||
"""滤镜强度可调"""
|
||||
龙舌兰 = Effect_meta("龙舌兰", True, "7252674245396942139", "7252674245396942139", "254083154fd15d41d41cc3763eda9f40", [])
|
||||
341
pyJianYingDraft/metadata/font_meta.py
Normal file
341
pyJianYingDraft/metadata/font_meta.py
Normal file
@@ -0,0 +1,341 @@
|
||||
"""记录剪映的字体元数据, 此文件的内容主要由程序生成"""
|
||||
|
||||
from .effect_meta import Effect_enum
|
||||
from .effect_meta import Effect_meta
|
||||
|
||||
class Font_type(Effect_enum):
|
||||
CC_Captial = Effect_meta("CC-Captial", True, "7418508570066424330", "84086581", "8ba811d327acd1516615259819da72a2")
|
||||
CC_Moderno = Effect_meta("CC-Moderno", True, "7444152681741947403", "94915234", "3bd5f42349aa8b0d3d211b6d2a6c31d4")
|
||||
JYruantang = Effect_meta("JYruantang", True, "7451897289527792178", "98222876", "af78243f78f27dfa80aca4e82c77eb1d")
|
||||
JYshiduo = Effect_meta("JYshiduo", True, "7451897058371310117", "98222874", "24fdaeb998c36d329b423561398ba4e3")
|
||||
JYzhuqingting = Effect_meta("JYzhuqingting", True, "7451897479320048166", "98222875", "921ba2b753807a5fb0d56a967225a352")
|
||||
Merry_Christmas = Effect_meta("Merry Christmas", True, "7451574186692055578", "98103035", "2a8b0f3ec8be1bde50969620603553af")
|
||||
MyFont凌渡哥哥简 = Effect_meta("MyFont凌渡哥哥简", True, "7316825302406009395", "36880890", "cc22c869da3e5aecae2c1ffaf27d3eda")
|
||||
ZY_Balloonbillow = Effect_meta("ZY Balloonbillow", True, "7353574360667394561", "55106512", "f6405bfdefb032ab060c05d9a1a7038a")
|
||||
ZY_Blossom = Effect_meta("ZY Blossom", True, "7304640684311450113", "30910322", "0435212aa54de0bbd8797b877eed75b4")
|
||||
ZY_Brief = Effect_meta("ZY Brief", True, "7311977774799917570", "34200651", "85952d2387016574cb2630d7f6760f4a")
|
||||
ZY_Courage = Effect_meta("ZY Courage", True, "7304640798488793602", "30910326", "902c396d8481367784495d73620b1a90")
|
||||
ZY_Daisy = Effect_meta("ZY Daisy", True, "7302355415038169601", "30000858", "5694276489bf9e70db025e6f19277508")
|
||||
ZY_Elixir = Effect_meta("ZY Elixir", True, "7302355533313348097", "30000844", "ebd4e8ef85eacc25860cd9c4c7d63d72")
|
||||
ZY_Fabulous = Effect_meta("ZY Fabulous", True, "7302355634538680833", "30000832", "2f673e5e2e8d956e6a0c6d8b28203d05")
|
||||
ZY_Fantasy = Effect_meta("ZY Fantasy", True, "7350189137770582529", "53177510", "09af030c4b206c3b895502f715c80d79")
|
||||
ZY_Flourishing_Italic= Effect_meta("ZY Flourishing-Italic", True, "7330606083335000577", "43287756", "dca57209a301d9119b911bff090262a8")
|
||||
ZY_Fortitude = Effect_meta("ZY Fortitude", True, "7330160852353421825", "43041469", "2db56cf21059b8a0c192f801555df245")
|
||||
ZY_Kindly_Breeze = Effect_meta("ZY Kindly Breeze", True, "7407289076090409489", "80464440", "a4e22dd23bf2aa6ae8ceda12400eb900")
|
||||
ZY_Loyalty = Effect_meta("ZY Loyalty", True, "7371704099433091600", "66322554", "1e9b242443a9943a43ccf30604243978")
|
||||
ZY_Modern = Effect_meta("ZY Modern", True, "7347670651626328577", "51844020", "5f5649ec5cd96f1311271d7f84e6151b")
|
||||
ZY_Multiplicity = Effect_meta("ZY Multiplicity", True, "7371704261878485521", "66322523", "f9714cd361ad6ddb6ee5b255d1e8ee21")
|
||||
ZY_Panacea = Effect_meta("ZY Panacea", True, "7302355742936273410", "30000850", "dc33e6efcf20202d53ab1818c50216e2")
|
||||
ZY_Relax = Effect_meta("ZY Relax", True, "7311977487469122049", "34200615", "4ac466f1249ffceb8ef9b6f366d42384")
|
||||
ZY_Slender = Effect_meta("ZY Slender", True, "7311977578821063170", "34200655", "bd7e086e303630912f12c4b75f93d139")
|
||||
ZY_Spunk = Effect_meta("ZY Spunk", True, "7304640886703395329", "30910324", "8942384a7e78d2be8b650b0791afdd56")
|
||||
ZY_Squiggle = Effect_meta("ZY Squiggle", True, "7371704357009494529", "66322535", "7b461311c3dae5726d9768969ff26ecf")
|
||||
ZY_Starry = Effect_meta("ZY Starry", True, "7304640983893807618", "31942077", "8558a845c7f82bf81e5b27c654b413e2")
|
||||
ZY_Timing = Effect_meta("ZY Timing", True, "7304641084833927682", "30910320", "95032638412a83a08c311a83bbcc85bb")
|
||||
ZY_Trend = Effect_meta("ZY Trend", True, "7347670845185069569", "51844010", "0f62f8bfab9d76a74dc281c7f248ac23")
|
||||
ZYLAA_Demure = Effect_meta("ZYLAA Demure", True, "7313895257991549442", "35459490", "ce4f98f6b9b57daa44336c2489eff940")
|
||||
Amigate = Effect_meta("Amigate", False, "7042231710112551431", "1485328", "1496029e87060f4208d5fbc127ed5f2c")
|
||||
Anson = Effect_meta("Anson", False, "7312373886476096001", "37083210", "1f6c4b124f1cc0c8dc64e9a8d5d5db1c")
|
||||
BlackMango_Black = Effect_meta("BlackMango-Black", False, "7306445059216380417", "41472089", "8fe0a5dfb979cfff2e326617c543b4ab")
|
||||
BlackMango_Regular = Effect_meta("BlackMango-Regular", False, "7306445155244970497", "41472093", "8f91492140c961395923bc1edd9abae8")
|
||||
Bungee_Regular = Effect_meta("Bungee-Regular", False, "7314592672792973826", "37039650", "26f72c42742cd487ebafebfa8bc45c4f")
|
||||
Cabin_Rg = Effect_meta("Cabin-Rg", False, "7314592369867756034", "37039690", "05fa78c9e0cb4de012ad8f4ca7cf589f")
|
||||
Caveat_Regular = Effect_meta("Caveat-Regular", False, "7277872672304796217", "22621892", "2ad4a79314b4fe122e8ff7599133cf4a")
|
||||
Climate = Effect_meta("Climate", False, "7080115867823903246", "1654361", "4ef55e67791e1386833d55964cce115d")
|
||||
Coiny_Regular = Effect_meta("Coiny-Regular", False, "7203293403990200834", "27240316", "027b0038d0184ca86288c22298b82600")
|
||||
DMSans_BoldItalic = Effect_meta("DMSans-BoldItalic", False, "7314592197238592002", "37039676", "5a490fc0c878dbecc7233de1dc7decae")
|
||||
Exo = Effect_meta("Exo", False, "7003588519440421413", "1349503", "c7861a7748efe6c7f69b2d864881eeb3")
|
||||
Gallery = Effect_meta("Gallery", False, "7030677248797577765", "1441466", "c6c8e230a16440a4df49ae96893c8211")
|
||||
Giveny = Effect_meta("Giveny", False, "7030676531156357645", "1441468", "7499748cd12c31b8e3e5c30fb7184a54")
|
||||
Grandstander_Regular= Effect_meta("Grandstander-Regular", False, "7277873129915945509", "22621895", "216f5b3c84a59d4e87860c9ff9f562bd")
|
||||
Gratefulness = Effect_meta("Gratefulness", False, "7290877195218588216", "26148240", "7ebf75e53a99790894af0e35a8752103")
|
||||
HarmonyOS_Sans_SC_Bold= Effect_meta("HarmonyOS_Sans_SC_Bold", False, "7265594890002633272", "20374146", "43f72102bcc9cf55d485857e81a4b1d0")
|
||||
HarmonyOS_Sans_SC_Medium= Effect_meta("HarmonyOS_Sans_SC_Medium", False, "7265595177916437050", "20374140", "b6636326c0e4bd6b7d163210313e36b1")
|
||||
HarmonyOS_Sans_SC_Regular= Effect_meta("HarmonyOS_Sans_SC_Regular", False, "7265595305163231781", "20374142", "ae33e48fc99aa4c8bdf259ec8aa7b768")
|
||||
HarmonyOS_Sans_TC_Bold= Effect_meta("HarmonyOS_Sans_TC_Bold", False, "7265530043495879226", "20356569", "ed1b8e7841ccba0c1a530d4d975a3651")
|
||||
HarmonyOS_Sans_TC_Light= Effect_meta("HarmonyOS_Sans_TC_Light", False, "7265530445658329661", "20356571", "f43d72b12b7ac433a6b9efd13b00e44c")
|
||||
HarmonyOS_Sans_TC_Medium= Effect_meta("HarmonyOS_Sans_TC_Medium", False, "7265530519687795255", "20356573", "116d59aa44e88bda1c3b4652ccc42bc5")
|
||||
HarmonyOS_Sans_TC_Regular= Effect_meta("HarmonyOS_Sans_TC_Regular", False, "7265530629050077754", "20356575", "57cdc99508ebf188ee9107f21c558e1d")
|
||||
HeptaSlab_ExtraBold = Effect_meta("HeptaSlab-ExtraBold", False, "7277873528643260988", "22621893", "5e58c6a212bb55f2bc2080bbd5a37c9b")
|
||||
HeptaSlab_Light = Effect_meta("HeptaSlab-Light", False, "7277873865001275964", "22621897", "3fd3c1d463fc7ae1918dff1ce91544ae")
|
||||
Huben = Effect_meta("Huben", False, "7094914692975432206", "1821402", "5b65bd72e11b60b1fdb629f3e91e285a")
|
||||
Ingram = Effect_meta("Ingram", False, "7094910999198700040", "1821404", "9e70d8f68947dbfc3892cf00387b565e")
|
||||
Integrity = Effect_meta("Integrity", False, "7290877266458841637", "26148241", "e3273b53a35140c0c07e5a48f5e6ae1f")
|
||||
Inter_Black = Effect_meta("Inter-Black", False, "7314592567717270018", "37039685", "eb649dd550216792ea32f9f403064787")
|
||||
Kanit_Black = Effect_meta("Kanit-Black", False, "7341281166273548801", "48512052", "ee7a81d5e88996772c36264aba14d17b")
|
||||
Kanit_Regular = Effect_meta("Kanit-Regular", False, "7341281459799331330", "48512024", "8c53bab543a483f4aea69870952e15b5")
|
||||
Koulen_Regular = Effect_meta("Koulen-Regular", False, "7341281656319250945", "48512036", "7b5c8caefbc8f8c2cf6834e65d10c48a")
|
||||
LXGWWenKai_Bold = Effect_meta("LXGWWenKai-Bold", False, "7265591538472718903", "20373127", "562011555df237de57ff2da20dde5ecc")
|
||||
LXGWWenKai_Light = Effect_meta("LXGWWenKai-Light", False, "7265592227118715448", "20373111", "302ec5cdf24cd8ed486ffdcfc1431c39")
|
||||
LXGWWenKai_Regular = Effect_meta("LXGWWenKai-Regular", False, "7265591946897265212", "20373101", "7bac545cc43d16cfc89b681ba37b06e7")
|
||||
Love = Effect_meta("Love", False, "6766522308593979917", "459276", "a329a038511121412865fa841f51dfc3")
|
||||
Luxury = Effect_meta("Luxury", False, "7291876268541219329", "41472051", "8b2c690dc8c0a5124b5536aab2915747")
|
||||
MiSans_Heavy = Effect_meta("MiSans-Heavy", False, "7265595579864977980", "20374145", "2dfa84b84a63cf62ec91e41dafce6f0d")
|
||||
MiSans_Regular = Effect_meta("MiSans-Regular", False, "7265596106581479991", "20374141", "d1d134c67f9de5c83a18871150a9a2c1")
|
||||
Modern = Effect_meta("Modern", False, "6740498577912500749", "349479", "3bd3fe9a9464df4555335393bb266aba")
|
||||
Nunito = Effect_meta("Nunito", False, "6807743644842332685", "643589", "5243915a1b14f5fe467f4d5f10d2ba38")
|
||||
OldStandardTT_Regular= Effect_meta("OldStandardTT-Regular", False, "7277874282493907512", "22621894", "24b6280d5832d9d6cbfada464f5c5a61")
|
||||
Pacifico_Regular = Effect_meta("Pacifico-Regular", False, "7312374088477970945", "37083032", "1416d2ec4431154045a8e6eff0df0a52")
|
||||
PlayfairDisplay_Bold= Effect_meta("PlayfairDisplay-Bold", False, "7314592810684912130", "41472127", "7dc783e1cc6be2ca8bd21a837b7bd0cc")
|
||||
Plunct = Effect_meta("Plunct", False, "7035916496484176421", "1459552", "ba351b572d684c0f8ea9b7d6cab9f500")
|
||||
Polly = Effect_meta("Polly", False, "7078971156350374431", "1648730", "02fb23bcda9f281d4029ef482bb3c1fb")
|
||||
Poppins_Bold = Effect_meta("Poppins-Bold", False, "7312373689708712449", "41472095", "d090413fb1d5672cdf7177fea62fbccd")
|
||||
Poppins_Regular = Effect_meta("Poppins-Regular", False, "7202912523383738881", "41472101", "62f9677bff07407d954efbb810d8273e")
|
||||
RedHatDisplay_BoldItalic= Effect_meta("RedHatDisplay-BoldItalic", False, "7341281783637348865", "48512032", "c24c458d3099c3e7f327635326ba78ce")
|
||||
RedHatDisplay_Light = Effect_meta("RedHatDisplay-Light", False, "7341282109987754497", "48512058", "319e4fda3248900720841a4475234a89")
|
||||
ResourceHanRoundedCN_Md= Effect_meta("ResourceHanRoundedCN-Md", False, "7265596408491676197", "20374131", "b21249fcbc5e1d96505fdeb21c1f7e8f")
|
||||
ResourceHanRoundedCN_Nl= Effect_meta("ResourceHanRoundedCN-Nl", False, "7265596514955694649", "20374148", "5df531b829fa804cb520148c5d1e7c85")
|
||||
Roboto_BlkCn = Effect_meta("Roboto-BlkCn", False, "7316424848622752257", "37039748", "c2d075ff415d9a8d09982c955f59d25f")
|
||||
SansitaSwashed_Regular= Effect_meta("SansitaSwashed-Regular", False, "7314592065168347650", "37108558", "136c05da10e6016965dccd20b017a0ad")
|
||||
SecularOne_Regular = Effect_meta("SecularOne-Regular", False, "7312374157725929986", "37082988", "6b3bb5fe24e5b1df5ed82af22a1b45bd")
|
||||
Signature = Effect_meta("Signature", False, "7042230917837885965", "1485330", "4e29c132141a12bbbffb4a6c5b35bac2")
|
||||
Soap = Effect_meta("Soap", False, "7076269202771808804", "1632684", "853e5b6b92915f439228d36ae9be0ddf")
|
||||
Sora_Bold = Effect_meta("Sora-Bold", False, "7341282687497277953", "48511978", "294e57942fb9b6e6a381bab3f04d0227")
|
||||
Sora_Regular = Effect_meta("Sora-Regular", False, "7341282789431448065", "48512020", "1da0cc77ecfb548eb9b9e0f969585850")
|
||||
SourceHanSansCN_Bold= Effect_meta("SourceHanSansCN-Bold", False, "7265596643066516029", "20374122", "fb70a3667211b2962782b5a2c127b2a6")
|
||||
SourceHanSansCN_Light= Effect_meta("SourceHanSansCN-Light", False, "7265596753926165050", "20374126", "1e5cecf2d7f404937e579b691dd824c5")
|
||||
SourceHanSansCN_Medium= Effect_meta("SourceHanSansCN-Medium", False, "7265596846465094199", "20374144", "6ae9ea8211a7b2df59519cc25bf0e4d3")
|
||||
SourceHanSansCN_Normal= Effect_meta("SourceHanSansCN-Normal", False, "7265596944867660346", "20374137", "0875520d11130e75a7c55db404269fef")
|
||||
SourceHanSansCN_Regular= Effect_meta("SourceHanSansCN-Regular", False, "7265597035946971705", "20374128", "ab9425633f936ad3aee8ce6776a8d785")
|
||||
SourceHanSansTW_Bold= Effect_meta("SourceHanSansTW-Bold", False, "7265530703364756026", "20356585", "068f075fb3e12a9e7d866485e4ec90fd")
|
||||
SourceHanSansTW_Light= Effect_meta("SourceHanSansTW-Light", False, "7265530900580930085", "20356587", "3c658b896e04038f1e64a7b482c09f2e")
|
||||
SourceHanSansTW_Medium= Effect_meta("SourceHanSansTW-Medium", False, "7265530989479203389", "20356589", "3db3cffea241e097cfef7bcef2334d90")
|
||||
SourceHanSansTW_Normal= Effect_meta("SourceHanSansTW-Normal", False, "7265531070680928828", "20356591", "7e3007f207de8eeb029b534fbaf9a13f")
|
||||
SourceHanSansTW_Regular= Effect_meta("SourceHanSansTW-Regular", False, "7265531198548480568", "20356593", "9a228f45a856db7e2acc9844fe12de42")
|
||||
SourceHanSerifCN_Light= Effect_meta("SourceHanSerifCN-Light", False, "7265597259708895803", "20374143", "f8733631870deaba746afcb65ef30389")
|
||||
SourceHanSerifCN_Medium= Effect_meta("SourceHanSerifCN-Medium", False, "7265597365539574329", "20374123", "6b1255756261d5ddb9ac40216ee5a2f0")
|
||||
SourceHanSerifCN_Regular= Effect_meta("SourceHanSerifCN-Regular", False, "7265597449262076474", "20374152", "47dc066be4a347aa81c347554fa376a9")
|
||||
SourceHanSerifCN_SemiBold= Effect_meta("SourceHanSerifCN-SemiBold", False, "7265598654294004281", "20374118", "f1b0ad6ceca5ec6bd47b0dacae9fbf97")
|
||||
SourceHanSerifTW_Bold= Effect_meta("SourceHanSerifTW-Bold", False, "7265534770845585980", "20356595", "7de7afb3383bc3c71064e694a8437fed")
|
||||
SourceHanSerifTW_Light= Effect_meta("SourceHanSerifTW-Light", False, "7265535017625850429", "20356597", "78bd0a481bca529b29dadce742f93d4b")
|
||||
SourceHanSerifTW_Medium= Effect_meta("SourceHanSerifTW-Medium", False, "7265535154775396919", "20356599", "13289edc534678e1ac9846ffea550910")
|
||||
SourceHanSerifTW_Regular= Effect_meta("SourceHanSerifTW-Regular", False, "7265535307322233399", "20356601", "8850278849317c50eefc844c086dd455")
|
||||
SourceHanSerifTW_SemiBold= Effect_meta("SourceHanSerifTW-SemiBold", False, "7265535436594876984", "20356603", "2420aafb990c49f9266bfd0bd3d79149")
|
||||
Staatliches_Regular = Effect_meta("Staatliches-Regular", False, "7312373990083793409", "37083204", "eb3e70b0668eb3e03499cd5162bbf8e3")
|
||||
Sunset = Effect_meta("Sunset", False, "6807743703436759566", "643591", "01365a30a2569e10b160f7bd46e2c8c8")
|
||||
Thrive = Effect_meta("Thrive", False, "7290877082660246071", "26148239", "09aecfbb88990df392ae7dfa53e56b6e")
|
||||
Thunder = Effect_meta("Thunder", False, "7050422198724465189", "1511612", "f68ab331feafe5deac4c9484df686557")
|
||||
Tronica = Effect_meta("Tronica", False, "7094911278426100238", "1821403", "5209e1bc26f3e59c67705c3fea393cbe")
|
||||
Vintage = Effect_meta("Vintage", False, "6740438522861195789", "349327", "7c7bef7e0d226e4a0913b2d9de0ef06e")
|
||||
ZY_Dexterous = Effect_meta("ZY Dexterous", False, "7320169657841750529", "38698692", "fadee671a67e0e552e0d61f480e78348")
|
||||
ZY_Earnest = Effect_meta("ZY Earnest", False, "7322744268987044354", "39631837", "3d30c6b6825b9bdf27e98f24f33092c7")
|
||||
ZY_Vigorous = Effect_meta("ZY Vigorous", False, "7322372193738822145", "39444804", "124fa2bd07a55bce96ee0224a425d339")
|
||||
ZY_Vigorous_Medium = Effect_meta("ZY Vigorous-Medium", False, "7324166831881589249", "40250732", "4d3ef21ef574d220ff7a68d14ea296af")
|
||||
ZYLantastic = Effect_meta("ZYLantastic", False, "7290485139908334138", "26013698", "95ef52f88a61917fdffe9f85a59a7236")
|
||||
ZYLullaby = Effect_meta("ZYLullaby", False, "7290485359744389691", "26013697", "f731f395b8bc26a30afce30d9d6fd245")
|
||||
ZYSilhouette = Effect_meta("ZYSilhouette", False, "7290485464341942840", "26013700", "cbb4966830a668ba27de621df533c01e")
|
||||
ZYWitty = Effect_meta("ZYWitty", False, "7290485545237484069", "26013699", "b7de21c78c00e4715a8b5a1478654131")
|
||||
Zapfino = Effect_meta("Zapfino", False, "7076271146110292494", "1632681", "efa8ec4bd296ade312a2a64fe6b2d206")
|
||||
中秀体 = Effect_meta("中秀体", False, "6917512631515353607", "1014410", "9561161c74ae03658e101577ec5cfae6")
|
||||
今宋体 = Effect_meta("今宋体", False, "7216598549809599032", "11443544", "4bd7448e9ba53dd7fe3bd8b73a07e6f4")
|
||||
仓耳周珂正大榜书 = Effect_meta("仓耳周珂正大榜书", False, "7265577040110162492", "20373112", "5c78e7cf1982aa68487d1675159b73f6")
|
||||
优设标题黑 = Effect_meta("优设标题黑", False, "7068207165277737502", "1588336", "d9f1238f50005595eff5f545aa54776c")
|
||||
俊雅体 = Effect_meta("俊雅体", False, "7078971008769593887", "1648731", "4f96b92a0023d2da2a4c9cb4e09e9565")
|
||||
元气泡泡体 = Effect_meta("元气泡泡体", False, "7203664981080937021", "9898775", "3af8af39c55aa4109263fd49a00f3885")
|
||||
元瑶体 = Effect_meta("元瑶体", False, "7290447082886795832", "25999023", "b981cfd05bb12209521b5aeac9d3740f")
|
||||
先锋体 = Effect_meta("先锋体", False, "7043775345333375519", "1488720", "85da61942dcc96f5eddad1c3826b5f0c")
|
||||
兰亭圆 = Effect_meta("兰亭圆", False, "7173608955527041567", "6949825", "211a5b4aed3f2ac8412d6f9f7e9d8244")
|
||||
凌东齐伋体_combo = Effect_meta("凌东齐伋体-combo", False, "7265611544820453948", "20379306", "6ca3f118d0415aa1f0be2e9ee2800890")
|
||||
凌东齐伋体_fallback = Effect_meta("凌东齐伋体-fallback", False, "7265611310132367931", "20379309", "5717be837d5f541193816ad6b421f7fc")
|
||||
匹喏曹 = Effect_meta("匹喏曹", False, "7043773350555947551", "1488716", "4f6d74dc7cb2208981569c0842124038")
|
||||
半梦体 = Effect_meta("半梦体", False, "7290439421625635385", "25999018", "ed70a8440c036e4f95d41ac34846f229")
|
||||
卡酷体 = Effect_meta("卡酷体", False, "7045187669847970341", "1494864", "514acd68e036f48781d209d84cc7728e")
|
||||
古典体 = Effect_meta("古典体", False, "7035911487646339598", "1459456", "37cd7f9d7364c200a37c7f9ee2192ae9")
|
||||
古印宋简 = Effect_meta("古印宋简", False, "7216598368791827002", "11443545", "aafc0b7c13e1c5b790d090e57afcff76")
|
||||
古雅体 = Effect_meta("古雅体", False, "7025895760583463438", "1425152", "dc99fbcf0d0a7c179313e6289d95ebaf")
|
||||
古风小楷 = Effect_meta("古风小楷", False, "7216598671016596029", "11443543", "97e1ab8a11b337dc9e8369a40c936e19")
|
||||
台北黑体_Light = Effect_meta("台北黑体-Light", False, "7265536169083933242", "20356619", "3367383fa78c478b88ab81a18746ee85")
|
||||
台北黑体_Regular = Effect_meta("台北黑体-Regular", False, "7265536307932172861", "20356621", "640ca1b520ae3f08b77de45dab99ba33")
|
||||
后现代体 = Effect_meta("后现代体", False, "6740435494053614093", "349307", "35b4b7201d26c9a26a038be8813efdd2")
|
||||
喜悦体 = Effect_meta("喜悦体", False, "7045187886924173861", "1494856", "71a8ba6a406a0c02fc2a31dceb4921d0")
|
||||
嘉木体 = Effect_meta("嘉木体", False, "7290443820041245241", "25999016", "a5ac5235fec9d01bbb280ab9b37b7b93")
|
||||
圆体 = Effect_meta("圆体", False, "6740436583247254029", "349313", "6622f87ce830dd89234522a0d9db5104")
|
||||
基础像素 = Effect_meta("基础像素", False, "7203638484752405049", "9893377", "f76ecb363595e5321389d3ed29df1c9f")
|
||||
墩墩体 = Effect_meta("墩墩体", False, "7043772438898807304", "1488712", "377365df3340b4b642a0c199fcbb3882")
|
||||
大字报 = Effect_meta("大字报", False, "7054126026267300382", "1530068", "bb2f51e267dce8ffd369e1721f2a6371")
|
||||
大梁体 = Effect_meta("大梁体", False, "7057028912252981791", "1542202", "ceeaca2dfb033c79a261ac9e7950ec72")
|
||||
妙黑体 = Effect_meta("妙黑体", False, "7203638484756599333", "9893375", "ff39549fdcdf9528ce1d0137384eb906")
|
||||
字制区喜脉体 = Effect_meta("字制区喜脉体", False, "7391765808835203647", "75248650", "9e6dcd6301144426671b86797a1cfd7a")
|
||||
孤月体 = Effect_meta("孤月体", False, "7290441418395357754", "25999015", "e48e0b0bf5ff728a46405176e1d5030f")
|
||||
宋体 = Effect_meta("宋体", False, "6740513279296147982", "349517", "02a4eb96fa9d82bbba5906c35521f6f4")
|
||||
小薇体 = Effect_meta("小薇体", False, "7265594602311127607", "20373097", "db03f70f2fc5177f552d46ab3648af3f")
|
||||
尔雅新大黑 = Effect_meta("尔雅新大黑", False, "7217732136894206501", "11593555", "c3dc73e45b7b16cae8e867a0a73f35dd")
|
||||
峰骨体 = Effect_meta("峰骨体", False, "7054126189211816462", "1530066", "b5a3bb8585981e629732ca53d6d3be36")
|
||||
幼萱体 = Effect_meta("幼萱体", False, "7290446812442268217", "25998999", "ab1b9e358069f4187427aaecbcca1467")
|
||||
得意黑 = Effect_meta("得意黑", False, "7399865900821647935", "77844112", "5219d1f012f4944aaaa2ec19556fdea6")
|
||||
快乐体 = Effect_meta("快乐体", False, "6740499472523989512", "349463", "eff4f43e9bfa0adbe1cc2454ac57e98f")
|
||||
快速体 = Effect_meta("快速体", False, "7197366121069023804", "9182766", "462692b2efb28f3cf411edbef8f7f6ff")
|
||||
思源中宋 = Effect_meta("思源中宋", False, "6807743192671195655", "643579", "e8b002bff0884028c9f13a9d6eeb03bc")
|
||||
思源粗宋 = Effect_meta("思源粗宋", False, "6807742980271641102", "643575", "e4387517f584be39bb2e1ca4ede6cbe3")
|
||||
悠悠然 = Effect_meta("悠悠然", False, "7081924596999393805", "1665070", "f38c316a2e5f0e059094bbe18a252ce1")
|
||||
悦妍体 = Effect_meta("悦妍体", False, "7290447167821451813", "25998984", "3c6344b0d77c47511e5b177675761c7b")
|
||||
惊鸿体 = Effect_meta("惊鸿体", False, "7203638484756599356", "9893376", "d06a0ac2a94160c8e6d88bf6d1c436e6")
|
||||
抖音美好体 = Effect_meta("抖音美好体", False, "7244518590332801592", "15332487", "1a9c90e65d4ac34436d90a1b19d94d5a")
|
||||
招牌体 = Effect_meta("招牌体", False, "7035914068053463565", "1459526", "d591f14dd0bf7486dc318195299706a4")
|
||||
挥墨体 = Effect_meta("挥墨体", False, "7037018943218782757", "1464398", "162b2fc5a67b2f7b664001030b16828a")
|
||||
文研体 = Effect_meta("文研体", False, "6990293257540342302", "1203468", "bcadf482b4045f8d47bf373fc01479a0")
|
||||
文艺繁体 = Effect_meta("文艺繁体", False, "6740437797456318983", "349321", "b15dc9e0411a83b2c63f983a2fb3b7a6")
|
||||
文轩体 = Effect_meta("文轩体", False, "7290445778273702455", "25998976", "d5ea95d6a862335c917a93b4fc741c89")
|
||||
文雅体 = Effect_meta("文雅体", False, "7068208151488631309", "1588334", "6f0ccd9662b4b0eb41318fd8547699de")
|
||||
新青年体 = Effect_meta("新青年体", False, "6740435892441190919", "349309", "71a73f7e297831936018c928d61ce2b8")
|
||||
方糖体 = Effect_meta("方糖体", False, "7037017159280628231", "1464396", "49573e8f5bb7ae96ce913040780803e3")
|
||||
无界黑 = Effect_meta("无界黑", False, "7203638485670957629", "9893370", "1e04097242afd9dea436e390c2b8d89d")
|
||||
日式标题 = Effect_meta("日式标题", False, "7081925137355772453", "1665068", "b21c3e5dcee4cbd5aa5606f1e04fe382")
|
||||
星光体 = Effect_meta("星光体", False, "7216598789103030821", "11443542", "cc578f4ebfa6ec1d814f50b8ab99ce5e")
|
||||
有猫在 = Effect_meta("有猫在", False, "6766524065151717901", "459290", "0880173b6edb03abadc473b64ec80316")
|
||||
李李体 = Effect_meta("李李体", False, "7203638484752405053", "9893380", "87985cec317b243b34472455eb35e061")
|
||||
极简拼音 = Effect_meta("极简拼音", False, "7070430470667768333", "1600484", "d9bd33e2a246c62cfae5b75504c5d7c0")
|
||||
梅雨煎茶 = Effect_meta("梅雨煎茶", False, "7081925245099053604", "1665067", "7adeea403a9002c92bdb071f07506f5d")
|
||||
梦桃体 = Effect_meta("梦桃体", False, "7290444545689391653", "25998998", "58f48899950d28f609bef42bcab15575")
|
||||
楚辰体 = Effect_meta("楚辰体", False, "7070430593925779981", "1600482", "ced7a98a9bcc8984318a2c215192b0c5")
|
||||
欣然体 = Effect_meta("欣然体", False, "7068531082265629197", "1589146", "f1d3dde1819db78d7f4bde16daf52fe3")
|
||||
毡笔体 = Effect_meta("毡笔体", False, "7035924520854622757", "1459716", "171016edaee58043c22552d32579f154")
|
||||
汇文明朝体 = Effect_meta("汇文明朝体", False, "7444913491762221577", "95241741", "dff19164a0e4822b2320a900db9c1c2e")
|
||||
汉仪英雄体 = Effect_meta("汉仪英雄体", False, "6740499052644798984", "349471", "3f63a7b1ab4699bf11c88b284939e661")
|
||||
江户招牌 = Effect_meta("江户招牌", False, "7080096840875512334", "1654205", "a98a329c2a52154b6c50b06e66d60b12")
|
||||
江湖体 = Effect_meta("江湖体", False, "7080097079397192228", "1654203", "50957d5102cb4f2ea1459e140826eb0c")
|
||||
油漆体 = Effect_meta("油漆体", False, "7035906361040835079", "1459392", "f3f06c4b538c534a498c5e3712a949fa")
|
||||
海岛森林_全字符 = Effect_meta("海岛森林-全字符", False, "7445240658693984805", "95365506", "91a93794d0970a1acdb8822729ae5965")
|
||||
清刻本悦 = Effect_meta("清刻本悦", False, "7086429206543864350", "1698068", "2e70579a0538bde91edc1eaedc68c02f")
|
||||
温柔体 = Effect_meta("温柔体", False, "7050009415155454500", "1511616", "eb4b8ebef19e89895193d930e7c607c1")
|
||||
港风繁体 = Effect_meta("港风繁体", False, "6740438140432945675", "349323", "9bfde9a789862114b6055ed475688908")
|
||||
游园体 = Effect_meta("游园体", False, "7290446760739082789", "25998988", "b9e3537ea657978bc1963e76b66312a9")
|
||||
漫语体 = Effect_meta("漫语体", False, "7081925440264213000", "1665066", "e91bd31939be0dbbcae085a64d151ad6")
|
||||
点宋体 = Effect_meta("点宋体", False, "7080096967543493150", "1654204", "e5338c6ec760fc059b257d8dc31e7279")
|
||||
烈金体 = Effect_meta("烈金体", False, "7043773114546655781", "1488714", "dd0bc895570589984077890ab098ef15")
|
||||
烟波宋 = Effect_meta("烟波宋", False, "7068531367386026526", "1589144", "4ee19f0d46c10ccc70bac084226e6f82")
|
||||
特黑体 = Effect_meta("特黑体", False, "6740439840254333443", "349329", "92988aefce8a45c8fd7fe58a60fc72cc")
|
||||
琉璃宋 = Effect_meta("琉璃宋", False, "7020719089999942157", "1402720", "a3bd369495563713486e56b7f550af87")
|
||||
瑞意宋 = Effect_meta("瑞意宋", False, "7130447431891685895", "3997461", "a73364889c89bd6be1d08a92cb49245a")
|
||||
瑶蝶体 = Effect_meta("瑶蝶体", False, "7290446536050217532", "25998987", "04e3d3e0eae3de5c859e8c00d2b48759")
|
||||
甜甜圈 = Effect_meta("甜甜圈", False, "7130634783163421215", "4009729", "bbe904649c122449f4ea360030b603a6")
|
||||
目光体 = Effect_meta("目光体", False, "7035921361348334117", "1459640", "39e69d115d15e598c11d2686067dc70d")
|
||||
真言体 = Effect_meta("真言体", False, "7003588300720050696", "1349505", "9ae1a1787978c3b8e2a06a9d0c55906a")
|
||||
研宋体 = Effect_meta("研宋体", False, "7130644288047682085", "4010355", "06458c13377d445fe3368cd2c786c7a5")
|
||||
禅影体 = Effect_meta("禅影体", False, "7278963576167993916", "22902355", "438c78fb511d6993217961e53a281c0a")
|
||||
童趣体 = Effect_meta("童趣体", False, "7035888265290846756", "1459176", "07911c7bc89d724503b88c6fbafaccc5")
|
||||
简中圆 = Effect_meta("简中圆", False, "7050009066717844005", "1511618", "f26eb8bd135d147bb7700a560f1a5470")
|
||||
糯米团 = Effect_meta("糯米团", False, "6934225430266253837", "1053146", "aee9551fab5ef01c45dbe3335869db1d")
|
||||
纯真体 = Effect_meta("纯真体", False, "7045185581772444174", "1494870", "b33e32b8733e27775849ee5d7f92d7e7")
|
||||
细体 = Effect_meta("细体", False, "6740511815358222859", "349521", "3d80be25a18fb67455744136c1262c91")
|
||||
经典雅黑 = Effect_meta("经典雅黑", False, "7043775037559542279", "1488718", "ba7bbfabf030860ee4a23d6596a6c6e3")
|
||||
综艺字 = Effect_meta("综艺字", False, "7130642664080282149", "4010283", "74671c7987f56ba9a6ab93f95856973a")
|
||||
美佳体 = Effect_meta("美佳体", False, "7203665054338650685", "9898774", "69a5666d4ab91113ea146e71bc3e42c9")
|
||||
聚珍体 = Effect_meta("聚珍体", False, "7203638484752405051", "9893381", "7e024261e2d38e87bc78e6843ad2e6b3")
|
||||
芋圆体 = Effect_meta("芋圆体", False, "7039989971796628005", "1478272", "c47882a0a6781f00b6b152c456844413")
|
||||
若烟体 = Effect_meta("若烟体", False, "7290445344557503033", "25999000", "001f25aa8dc71e9221433f2ff6c8e540")
|
||||
荔枝体 = Effect_meta("荔枝体", False, "6740498118342611464", "349483", "9beb006988541f18a560f8029d47defa")
|
||||
萌趣体 = Effect_meta("萌趣体", False, "7045186231122006535", "1494868", "005466971691f729c2a0927ffe6f81b7")
|
||||
蒹葭体 = Effect_meta("蒹葭体", False, "7290443923556667959", "25999014", "04660ff6d07b1fd3437128caf3adfbb8")
|
||||
薯条少年 = Effect_meta("薯条少年", False, "7068530728467698213", "1589148", "8842c4ca3fde9cefeaa17fa5bb99a77b")
|
||||
蝉影隶书 = Effect_meta("蝉影隶书", False, "7045186520738697742", "1494867", "afcec5248968e5b3fd7d7eb3a670eadc")
|
||||
装甲明朝 = Effect_meta("装甲明朝", False, "7265536455655559739", "20356625", "3f334186c4522694108e7ab9534201fd")
|
||||
谷秋体 = Effect_meta("谷秋体", False, "7290442742822343205", "25999008", "233d1f80de91946da3c59527a61b1c87")
|
||||
超重要体 = Effect_meta("超重要体", False, "7203638484752405048", "9893378", "d21f913df460b6a9332a1520f7fe2d0c")
|
||||
轻吟体 = Effect_meta("轻吟体", False, "7035927184275411464", "1459730", "205a76c590ab163af423468e7f416a91")
|
||||
追光体 = Effect_meta("追光体", False, "7203638485666763325", "9893371", "5e0b49b0a3e33e04769cabbee228f6f4")
|
||||
逸致拼音 = Effect_meta("逸致拼音", False, "7070430706689643038", "1600480", "e15bf3763fb346f8b60eebabf04bdeee")
|
||||
金陵体 = Effect_meta("金陵体", False, "7086699209738424840", "1698067", "599831579b8aa5b5f0608d5e7d4ec5ce")
|
||||
锦瑟体 = Effect_meta("锦瑟体", False, "7290443998345302586", "25999022", "eb465dc5d9f045c5ff3ce34d480a2529")
|
||||
雁兰体 = Effect_meta("雁兰体", False, "7290446084780855867", "25998990", "6198e5f40da27fec116ee785c23b837e")
|
||||
雅酷黑简 = Effect_meta("雅酷黑简", False, "7130640934366089758", "4010137", "35ddec41ffa518033484f219e324a6bd")
|
||||
霸燃手书 = Effect_meta("霸燃手书", False, "7045187409960505886", "1494865", "e4f6766608951c7184a5d2a56aa370fa")
|
||||
青松体 = Effect_meta("青松体", False, "7290444911940211237", "25998985", "f4e7026acbdb7edd1003d24561f2add7")
|
||||
风雅宋 = Effect_meta("风雅宋", False, "7208056673317950011", "10379505", "c4624c3d535a1801e0992ccb25de6ac4")
|
||||
飒爽手写 = Effect_meta("飒爽手写", False, "7054125855676568095", "1530070", "86756c9b0c71fd513bcc163893b56d7e")
|
||||
飞扬行书 = Effect_meta("飞扬行书", False, "7035922620969128479", "1459678", "0532175b5a7a61e379d6b1f23c212f43")
|
||||
飞驰体 = Effect_meta("飞驰体", False, "7045186745100407310", "1494866", "1e9478384005377f087abf035cdffe64")
|
||||
高字标志黑 = Effect_meta("高字标志黑", False, "7268259518427959866", "20885841", "4843f24f22c8d22c984533e347be275a")
|
||||
高字湘黑体 = Effect_meta("高字湘黑体", False, "7268259657167147577", "20885842", "2f0c093261b368846aae47cf8a8f74ba")
|
||||
黄令东齐伋复刻体 = Effect_meta("黄令东齐伋复刻体", False, "7265535655105532476", "20356605", "e7830741b741962e5c43105ea25e3612")
|
||||
黄金时代 = Effect_meta("黄金时代", False, "7050010418932093471", "1511614", "269a3b6801b4e0b8e43d2d786f729da5")
|
||||
黑糖体 = Effect_meta("黑糖体", False, "7070430083919385119", "1600490", "c79b375905670f3012ae371583680109")
|
||||
默陌手写 = Effect_meta("默陌手写", False, "7025886295524119053", "1424938", "64b0eee1f99387b2d7a27f9c961e6bba")
|
||||
아기 = Effect_meta("아기", False, "6808056941458231815", "645451", "79273a8d31ec91b9f110243bd1096291")
|
||||
セリフ太字 = Effect_meta("セリフ太字", False, "7020729846334493215", "1402800", "569bf7220b9170da8dd45c2241740140")
|
||||
一笔壹画加油体 = Effect_meta("一笔壹画加油体", True, "7390218575979483659", "74697345", "f3020b0f6e2995f787a4fab6faef0e33")
|
||||
一笔壹画潮黑体 = Effect_meta("一笔壹画潮黑体", True, "7390218461990883876", "74696981", "97a3a570222328a8dd97b3921d3716bd")
|
||||
三极力量体简_粗 = Effect_meta("三极力量体简-粗", True, "7405555944769196595", "79942352", "4c26fb32e20e6796d98a3ee30dfb5635")
|
||||
三极妙漫体 = Effect_meta("三极妙漫体", True, "7405556011081142822", "79942353", "d4ea5fbd89d90037a8d6500469023d96")
|
||||
三极宋黑体超粗 = Effect_meta("三极宋黑体超粗", True, "7312720224510284326", "34549526", "8b847b757e21edd8f0189782f8dd97b4")
|
||||
三极拙墨体 = Effect_meta("三极拙墨体", True, "7405556255906861605", "79942349", "8096b3c9dc67f62af7715b1d266ae1c7")
|
||||
三极极宋超粗 = Effect_meta("三极极宋超粗", True, "7312719981911740954", "34549536", "433365b2542fd9472e2b74bc82c0423f")
|
||||
三极榜楷简体 = Effect_meta("三极榜楷简体", True, "7410300778990015027", "81318537", "1b1aadca917f42578fb41d5d95c6539c")
|
||||
三极欢乐体 = Effect_meta("三极欢乐体", True, "7405555876368486939", "79942350", "e4acf0240f647779c23d3cd70452df5b")
|
||||
三极正雅黑粗 = Effect_meta("三极正雅黑粗", True, "7312720421177004571", "34549517", "705aa06a0c64ac4348cf575e3921faf9")
|
||||
三极气泡体 = Effect_meta("三极气泡体", True, "7405556128832033317", "79942351", "f1120030bd9df3fc5e58adfb2be96c26")
|
||||
三极泼墨体 = Effect_meta("三极泼墨体", True, "7405556071848219186", "79942347", "ecbcf36e6184d1306dc75dcc9391f4b7")
|
||||
三极浓密仙粗 = Effect_meta("三极浓密仙粗", True, "7312720141865718282", "34549529", "d65312a270f2f970f94b453b0e05949f")
|
||||
三极湘乡体 = Effect_meta("三极湘乡体", True, "7410300778994209289", "81318538", "c817812de4b4be06462070c0af0e9ab0")
|
||||
三极萌喵简体 = Effect_meta("三极萌喵简体", True, "7410300778994225674", "81318536", "d56f4a0c1c39de0bc7d5c9fb6e9b1400")
|
||||
三极行楷简体_粗 = Effect_meta("三极行楷简体-粗", True, "7405556194279952905", "79942348", "e901f6b29261b596fc8e7f85b1ea572b")
|
||||
三极黑宋体中粗 = Effect_meta("三极黑宋体中粗", True, "7312719852194501158", "34549520", "4577355bc0adeb1763ad581f05e7c5ea")
|
||||
云书法三行魏碑体 = Effect_meta("云书法三行魏碑体", True, "7316822178538721830", "36880893", "8d1f5570b333f80196ec40fde68fd190")
|
||||
云书法手书建刚静心楷简= Effect_meta("云书法手书建刚静心楷简", True, "7316823183905002010", "36880886", "5b5b4250553e98394d9e01644ec47320")
|
||||
云书法生如夏花简 = Effect_meta("云书法生如夏花简", True, "7316822784103944713", "36880894", "460bd3cafc980d468c35c960dd50a2d3")
|
||||
云书法罗西硬笔楷书体= Effect_meta("云书法罗西硬笔楷书体", True, "7316819473019703859", "36880892", "a8554d938efd7655890ddb5c413b1d47")
|
||||
亦然体 = Effect_meta("亦然体", True, "7290457372814742073", "26003134", "a4922f5c3dbd6998261cbbf9dcb51139")
|
||||
仓耳丝柔体 = Effect_meta("仓耳丝柔体", True, "7423616269384946186", "85757836", "4cc0c3a634c7888ada2991778315963c")
|
||||
仓耳体 = Effect_meta("仓耳体", True, "7423616268759994890", "85757842", "7d450c06b110c67f359ddbb2a6377ae4")
|
||||
仓耳力士 = Effect_meta("仓耳力士", True, "7423616269326225946", "85757837", "e29302f3d11350964083cc128799dd8e")
|
||||
凌丝体 = Effect_meta("凌丝体", True, "7290455877864133157", "26003145", "92fc337d10907e56437c0da3f6d10a78")
|
||||
利飞体 = Effect_meta("利飞体", True, "7423616268764189193", "85757848", "b269aadd970b3705e5aaa54d0343117d")
|
||||
剪映新年体 = Effect_meta("剪映新年体", True, "7463380715107783206", "102584862", "259e955ebb6238cf8b3a70e160fc26f9")
|
||||
励字大黑简繁 = Effect_meta("励字大黑简繁", True, "7316745335257174578", "36825420", "78f653837bfd529904d56cfd77521eee")
|
||||
励字姚体简繁 = Effect_meta("励字姚体简繁", True, "7316817407664722441", "36880881", "22b55c6dc66142309168297e2633ec9b")
|
||||
励字志向黑简_特粗 = Effect_meta("励字志向黑简 特粗", True, "7316819223840297481", "36880880", "ba409eae71d9d99f370175f283002307")
|
||||
励字憨憨简 = Effect_meta("励字憨憨简", True, "7316745679055884837", "36825429", "b316a0c93d766f2bcefb9962ebb92f46")
|
||||
励字敲可爱简_中粗 = Effect_meta("励字敲可爱简 中粗", True, "7316746541820023306", "36825430", "e7226d59672ac424570ad6504c8241a0")
|
||||
励字行楷简繁 = Effect_meta("励字行楷简繁", True, "7316817018030658075", "36880877", "63abf61c61a93772e2a0feff194c1785")
|
||||
励字趣石简 = Effect_meta("励字趣石简", True, "7316746949489594931", "36825427", "e2dc9006d5e08c9c3714b9107568bddd")
|
||||
励字造梦简_特粗 = Effect_meta("励字造梦简 特粗", True, "7316818766493389339", "36880891", "a21754e4d75eaa9ea07f12512f0a1df1")
|
||||
励字隶书简繁 = Effect_meta("励字隶书简繁", True, "7316746076373914139", "36825425", "28d5ed8c5392b325a5f22823917e2aa7")
|
||||
华书体 = Effect_meta("华书体", True, "7290455554504266298", "26003140", "2854f0774cf3b780304708ee46625fa9")
|
||||
听露体 = Effect_meta("听露体", True, "7290456595102700089", "26003132", "adfad625c852fca682e02463bd7d0bbc")
|
||||
字由爱驾公路体 = Effect_meta("字由爱驾公路体", True, "7311912714970862107", "34131532", "2c6b6b843410224e98e99e3d1ab427e1")
|
||||
字语古兰体 = Effect_meta("字语古兰体", True, "7312718551096234523", "34549527", "b1130cae36f0b2bad353e96af5850c78")
|
||||
字语咏宋体 = Effect_meta("字语咏宋体", True, "7312719367769166386", "34549533", "12fe695be021ad4406276e85f32de4be")
|
||||
字语咏楷体 = Effect_meta("字语咏楷体", True, "7312719210373714459", "34549530", "06ab9abe9d2e6f4d10152bafe691738c")
|
||||
字语嘟嘟体 = Effect_meta("字语嘟嘟体", True, "7312718329347576347", "34549523", "ce70e138b40294d5f159ddbdfd2f5e23")
|
||||
字语文韵体 = Effect_meta("字语文韵体", True, "7312719046229627402", "34549537", "bc5a66d2265466330a836fc862b0c518")
|
||||
字语软糖体 = Effect_meta("字语软糖体", True, "7312718629982704166", "34549535", "a126d5a78f08f65afdcea6f0b6d3928c")
|
||||
宜宋 = Effect_meta("宜宋", True, "7423616269825348122", "85757843", "6b5fdc1a70b0b3a461bff3db1ccbbae7")
|
||||
小可爱体 = Effect_meta("小可爱体", True, "7423616269267505691", "85757845", "0eb3ee4fdd0c5a415e73a7e82dd9dcd8")
|
||||
少年南波万 = Effect_meta("少年南波万", True, "7441547528870302258", "93697433", "fc594dc0e1764159fff35321944e907d")
|
||||
山雁体 = Effect_meta("山雁体", True, "7290456514370736698", "26003150", "c29a5195061ec2b2f72aa4fe97e04f43")
|
||||
幽梦体 = Effect_meta("幽梦体", True, "7290457477873668666", "26003126", "1f23a06aada2e64a9dc3cd490aadaf07")
|
||||
归雁体 = Effect_meta("归雁体", True, "7290455353756488247", "26003136", "5d364212ce7ad920f858d615448a3981")
|
||||
景曜体 = Effect_meta("景曜体", True, "7290455645264810555", "26003133", "5320f82421f4ef64d62f27272241b8cf")
|
||||
月亮供电不足 = Effect_meta("月亮供电不足", True, "7312720704959418930", "34549519", "65bb1af80161acd665444de74af896d8")
|
||||
未光体 = Effect_meta("未光体", True, "7290456683027894839", "26003147", "2e77e4633f21a02e0a70b90977a7b01a")
|
||||
毛体行楷 = Effect_meta("毛体行楷", True, "7452649447441306121", "98548489", "06e8ecfb9262f12693c90d29dc501111")
|
||||
汉字之美棒棒糖粗简 = Effect_meta("汉字之美棒棒糖粗简", True, "7316732709747823114", "36795730", "296fc38d5559dba8cb8ed33daf6ea93f")
|
||||
汉字之美郝刚牡丹体简= Effect_meta("汉字之美郝刚牡丹体简", True, "7316816467062690330", "36880888", "1b67a99e701e335a08536e499dfe91ff")
|
||||
点字佳楷 = Effect_meta("点字佳楷", True, "7311912796520714779", "34131531", "c218de2cbf3e51caf8b425bfaf174bbf")
|
||||
点字奇巧 = Effect_meta("点字奇巧", True, "7311913943188902427", "34131533", "b6ef0e1abe473dd27bde5fbdb12fa6f8")
|
||||
点字小隶书 = Effect_meta("点字小隶书", True, "7311914134109426203", "34131539", "adecd49c062bfd7c94790bf7ba0b16be")
|
||||
点字玄真宋 = Effect_meta("点字玄真宋", True, "7311914225767551498", "34131530", "eb6a86ba326391dc111882da9659f355")
|
||||
点字艺圆 = Effect_meta("点字艺圆", True, "7311914298060575283", "34131536", "0cc2de74fd8ed8a72a0c0cbf3bb9b5ff")
|
||||
点字青花楷 = Effect_meta("点字青花楷", True, "7311913734081876506", "34131534", "8de5c66831c1c08a3a0db17abffdc090")
|
||||
点字青花隶 = Effect_meta("点字青花隶", True, "7311913858942112306", "34131535", "1c21f23c85ea5473322cfb2b856c686b")
|
||||
烟客体 = Effect_meta("烟客体", True, "7290457082921226811", "26003138", "b6c9e51a0caeda7546833874c4f6d3f4")
|
||||
爱你是无解命题 = Effect_meta("爱你是无解命题", True, "7311911945655816730", "34131537", "4d2d4673e42ced2e43c6e6d5d4a3d5d6")
|
||||
爱民小楷 = Effect_meta("爱民小楷", True, "7423616268760011314", "85757851", "e1e9bb52f3cc75124b4e668bbbeed5ab")
|
||||
玄鸟体 = Effect_meta("玄鸟体", True, "7290456889668670013", "26003129", "aa8b1188f865f250cce24a09f0105af8")
|
||||
知新体 = Effect_meta("知新体", True, "7423616268952932902", "85757852", "ab6662733ccf500d7de099211e31423c")
|
||||
竹言体 = Effect_meta("竹言体", True, "7423616269850513947", "85757835", "abf26da51a47d5dc399680cc09253f62")
|
||||
花锦体 = Effect_meta("花锦体", True, "7290455460186952251", "26003144", "202627efd4e86fcac13b028297319013")
|
||||
莫雪体 = Effect_meta("莫雪体", True, "7290456347177390629", "26003143", "e6df6d9922211e1b9cd907930569a320")
|
||||
造字侠今朝醉简 = Effect_meta("造字侠今朝醉简", True, "7316824086712160806", "36880876", "2b98cf117f555d4789b65c865d9f5f9a")
|
||||
造字侠寻味江湖简 = Effect_meta("造字侠寻味江湖简", True, "7316824437930594867", "36880883", "8335b615c4eb7b246b7aa564899c368d")
|
||||
造字侠陈坤风行简繁 = Effect_meta("造字侠陈坤风行简繁", True, "7316823545399480841", "36880887", "c266c8a01c258c85c5f7d022300015e0")
|
||||
阳华体 = Effect_meta("阳华体", True, "7290457161887388219", "26003127", "6ec8135c696317264510d2725a6fc83a")
|
||||
阳煦体 = Effect_meta("阳煦体", True, "7290457267030200869", "26003130", "4622bd24edf2f817730e108e625b6e05")
|
||||
雅月体 = Effect_meta("雅月体", True, "7423616268764189234", "85757855", "0f70f20df8d9be821e294a862be67304")
|
||||
青鸟华光书宋2 = Effect_meta("青鸟华光书宋2", True, "7410326723780153893", "81332684", "6850473b134099c8049bd646c990fe44")
|
||||
青鸟华光仿宋2 = Effect_meta("青鸟华光仿宋2", True, "7410326723327185435", "81332685", "96b32125bb5d11e8fe83565b5dc917fe")
|
||||
青鸟华光细黑 = Effect_meta("青鸟华光细黑", True, "7410326723792736795", "81332678", "54e6e6a69da14b6a9a4a01e2bc3ba4fb")
|
||||
青鸟华光美黑 = Effect_meta("青鸟华光美黑", True, "7410326723327169034", "81332683", "184e84f286db37d6ea31502521740644")
|
||||
青鸟华光黑变 = Effect_meta("青鸟华光黑变", True, "7410326723322991154", "81332672", "6ca836ce90531a01adfd2909d6d119e3")
|
||||
高字标志圆 = Effect_meta("高字标志圆", True, "7312720780599497225", "34549540", "b063783985f84f53748319de1532b926")
|
||||
鱼太闲躺平体 = Effect_meta("鱼太闲躺平体", True, "7312720611694875162", "34549531", "928979b4f0c9ba5ac430fc2990d0ea9d")
|
||||
42
pyJianYingDraft/metadata/mask_meta.py
Normal file
42
pyJianYingDraft/metadata/mask_meta.py
Normal file
@@ -0,0 +1,42 @@
|
||||
"""视频蒙版元数据"""
|
||||
|
||||
from .effect_meta import Effect_enum
|
||||
|
||||
class Mask_meta:
|
||||
"""蒙版元数据"""
|
||||
|
||||
name: str
|
||||
"""转场名称"""
|
||||
|
||||
resource_type: str
|
||||
"""资源类型, 与蒙版形状相关"""
|
||||
|
||||
resource_id: str
|
||||
"""资源ID"""
|
||||
effect_id: str
|
||||
"""效果ID"""
|
||||
md5: str
|
||||
|
||||
default_aspect_ratio: float
|
||||
"""默认宽高比(宽高都是相对素材的比例)"""
|
||||
|
||||
def __init__(self, name: str, resource_type: str, resource_id: str, effect_id: str, md5: str, default_aspect_ratio: float):
|
||||
self.name = name
|
||||
self.resource_type = resource_type
|
||||
self.resource_id = resource_id
|
||||
self.effect_id = effect_id
|
||||
self.md5 = md5
|
||||
|
||||
self.default_aspect_ratio = default_aspect_ratio
|
||||
|
||||
class Mask_type(Effect_enum):
|
||||
"""蒙版类型"""
|
||||
|
||||
线性 = Mask_meta("线性", "line", "6791652175668843016", "636071", "1f467b8b9bb94cecc46d916219b7940a", 1.0)
|
||||
"""默认遮挡下方部分"""
|
||||
镜面 = Mask_meta("镜面", "mirror", "6791699060140020232", "636073", "b2c0516d1f737f4542fb9b2862907817", 1.0)
|
||||
"""默认保留两线之间部分"""
|
||||
圆形 = Mask_meta("圆形", "circle", "6791700663249146381", "636075", "9a55eae0e99ee6d1ecbc6defaf0501ec", 1.0)
|
||||
矩形 = Mask_meta("矩形", "rectangle", "6791700809454195207", "636077", "ef361d96c456cd6077c76d737f98898d", 1.0)
|
||||
爱心 = Mask_meta("爱心", "geometric_shape", "6794051276482023949", "636079", "0bf09fa1e3a32464fed4f71e49a8ab01", 1.115)
|
||||
星形 = Mask_meta("星形", "geometric_shape", "6794051169434997255", "636081", "155612dee601d3f5422a3fbeabc7610c", 1.05)
|
||||
762
pyJianYingDraft/metadata/transition_meta.py
Normal file
762
pyJianYingDraft/metadata/transition_meta.py
Normal file
@@ -0,0 +1,762 @@
|
||||
"""转场效果元数据"""
|
||||
|
||||
from .effect_meta import Effect_enum
|
||||
|
||||
class Transition_meta:
|
||||
"""转场元数据"""
|
||||
|
||||
name: str
|
||||
"""转场名称"""
|
||||
is_vip: bool
|
||||
"""是否为VIP特权"""
|
||||
|
||||
resource_id: str
|
||||
"""资源ID"""
|
||||
effect_id: str
|
||||
"""效果ID"""
|
||||
md5: str
|
||||
|
||||
default_duration: int
|
||||
"""默认持续时间, 单位为微秒"""
|
||||
is_overlap: bool
|
||||
"""是否允许重叠(?)"""
|
||||
|
||||
def __init__(self, name: str, is_vip: bool, resource_id: str, effect_id: str, md5: str, default_duration: float, is_overlap: bool):
|
||||
self.name = name
|
||||
self.is_vip = is_vip
|
||||
self.resource_id = resource_id
|
||||
self.effect_id = effect_id
|
||||
self.md5 = md5
|
||||
|
||||
self.default_duration = int(round(default_duration * 1e6))
|
||||
self.is_overlap = is_overlap
|
||||
|
||||
class Transition_type(Effect_enum):
|
||||
"""转场类型"""
|
||||
|
||||
_3D空间 = Transition_meta("3D空间", False, "7049979667406656014", "1506926", "aaecc038f6543411f601608fc5539f0b", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
# 万花筒 = Transition_meta("万花筒", False, "6748220601061609996", "369155", "25c54ddf8de53d927375656c3fd5a7d3", 0.500000, True)
|
||||
# """默认时长: 0.50s"""
|
||||
上移 = Transition_meta("上移", False, "6724846395116753416", "2917279", "df9bc16697464de201a4924de49234a2", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
下移 = Transition_meta("下移", False, "6724849276100284942", "2917280", "9c042543d4846e7c17e8f950ce6f91c2", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
中心旋转 = Transition_meta("中心旋转", False, "6858191434294497805", "878914", "b43f5b2e59f966a3b110222773c2942d", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
云朵 = Transition_meta("云朵", False, "6955722927161479694", "2912469", "283bb4bbe729f19f933cb705024a0983", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
倒影 = Transition_meta("倒影", False, "6748313807031898627", "369691", "0ee10b771dc0443c41a90bb9fd6b3c25", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
冰雪结晶 = Transition_meta("冰雪结晶", False, "6919369228701143559", "1017910", "a0fd9d6eb0cb5596cac4f54d0ba59eaf", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
冲鸭 = Transition_meta("冲鸭", False, "7030714241359286821", "1441672", "784b284f040f61ae95f4e8e660f3a873", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
分割 = Transition_meta("分割", False, "6968372308419285540", "4211683", "ca45695f29bacf2dc29a6eb959e9e968", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
分割_II = Transition_meta("分割 II", False, "6969782622868214302", "4211740", "5ba1cb89bcf4a0898f86494864348e13", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
分割_III = Transition_meta("分割 III", False, "6969793843403166215", "4211739", "942fd71d67ca576384b2cd068157ca45", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
分割_IV = Transition_meta("分割 IV", False, "6969793934356648455", "4211738", "62d08c08542fe62e6a8429f9501e76fa", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
前后对比_II = Transition_meta("前后对比 II", False, "7299290706277831218", "28895844", "64e8f4a060901fd4349301f97fbdd172", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
动漫云朵 = Transition_meta("动漫云朵", False, "6777178865119793678", "2911876", "e835cbc7fa7b15af90a2a7090bbf68c3", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
动漫漩涡 = Transition_meta("动漫漩涡", False, "6858191448827761160", "878913", "fa7ba99b13036c0ff167ea3b7d5c31a2", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
动漫火焰 = Transition_meta("动漫火焰", False, "6777178765643485709", "2911875", "8e7c247c5ebd58aa5c3582273e9c840b", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
动漫闪电 = Transition_meta("动漫闪电", False, "6777178696609436174", "2911874", "3fd5d0c7c48668ba5305c57ac0b5d596", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
压缩 = Transition_meta("压缩", False, "6751618376780485133", "4212466", "337d4cd9be4e1860bd1e7e50a9a93841", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
叠加 = Transition_meta("叠加", False, "6914112332205396488", "1003369", "4f7e4bd421e382860b49e3e34eb4e4aa", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
叠化 = Transition_meta("叠化", False, "6724845717472416269", "322577", "2d641adc4bb63e37e3a0067d8c8cc3c3", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
右移 = Transition_meta("右移", False, "6726711296063967748", "2917287", "4cfd965c25e33c7df9b2c1b3b4cbdf31", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
向上 = Transition_meta("向上", False, "6724227090872275463", "359459", "349746a951e130fe896415f51c9eb36a", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
向上擦除 = Transition_meta("向上擦除", False, "6724849456891564557", "2917281", "9a2e4ebf7309c80be332e3c62594dcd6", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向下 = Transition_meta("向下", False, "6724227330190873100", "359449", "9c263958ef3b5762db6ffd94a665f9e8", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
向下擦除 = Transition_meta("向下擦除", False, "6724849752921346573", "2917282", "ce1fb8739d1fbff3d86498fc18321933", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向下流动 = Transition_meta("向下流动", False, "6858191469807669773", "878912", "45f28ed2995ca15cfe027784b55d34f2", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
向右 = Transition_meta("向右", False, "6724227599616184836", "359527", "55af58a9b04ff458c3a9ae3ddb358152", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
向右上 = Transition_meta("向右上", False, "6724227870559834635", "359567", "19d72649fe9bc3b272e1d874a93a0e9b", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向右下 = Transition_meta("向右下", False, "6724228621742903815", "359537", "4291e21aefc6d87a232441d38cabacc5", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向右拉伸 = Transition_meta("向右拉伸", False, "6987299127025472031", "4211782", "6c3d17aa182e6238ee3a48c2fdf4a627", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向右擦除 = Transition_meta("向右擦除", False, "6724849898857959950", "2917284", "a10153bd2b569c49ddd7c055e8c9eba9", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向右流动 = Transition_meta("向右流动", False, "6858191483573375495", "878911", "8d3508f6e570dc73d3e771d234796cb8", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
向左 = Transition_meta("向左", False, "6724227717195108867", "359529", "323fadc45da03741e6b393b3e3b34e75", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
向左上 = Transition_meta("向左上", False, "6724230442679013902", "359533", "4ed73d43829eb496f6885ac0b882a391", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向左下 = Transition_meta("向左下", False, "6724230577211314695", "359535", "c76650d4ea9bc4e3b0530c9b9f05f28e", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向左拉伸 = Transition_meta("向左拉伸", False, "6987201429622493732", "4211781", "b0dd96c3c203104a2df46d83dd91b7bd", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向左擦除 = Transition_meta("向左擦除", False, "6724849999336706573", "2917283", "316c2a1c1783f51505c793b13381b445", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
吸入 = Transition_meta("吸入", False, "7246288124110705209", "15653345", "fb75bf696e19a04795ae9a06b43a09f2", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
回忆下滑 = Transition_meta("回忆下滑", False, "7309840407406318117", "33106283", "7e8f1b10bb9979d7ed184d29f301b93d", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
圆形分割_II = Transition_meta("圆形分割 II", False, "7317206886053319194", "37127313", "05017adee9a3798b4fb207bb3206187e", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
圆形扫描 = Transition_meta("圆形扫描", False, "6851775006418932238", "813992", "0260ab98d7a840c3344cb5b3e70b7d4b", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
圆形遮罩 = Transition_meta("圆形遮罩", False, "6725767129519362573", "2916676", "a7eb1d47f97049b17f49669622d07f3d", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
圆形遮罩_II = Transition_meta("圆形遮罩 II", False, "6724850215364334083", "2916675", "2772ad7c8c7e30c6421be7c2e5dd3f15", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
复古放映 = Transition_meta("复古放映", False, "7237068402945167909", "14192091", "44c3d405f4961d843c74c69e241df643", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
岁月的痕迹 = Transition_meta("岁月的痕迹", False, "6982750240663147044", "1185194", "0b228af1ebde4909bb6ff545ddd89023", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
左下角_II = Transition_meta("左下角 II", False, "7304868316252738098", "30874190", "e0296196f0ec6666a33b33fead4f63d6", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
左移 = Transition_meta("左移", False, "6726711499676455435", "2917286", "9562c0ea301229d43f9dca6f6590f306", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
开幕 = Transition_meta("开幕", False, "6750893890712113677", "391781", "d5f097e701ddaa984a590249896fc51a", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
弹幕转场 = Transition_meta("弹幕转场", False, "7028877116259176974", "1433950", "7b5385070a42a218f194d9daddb59f32", 4.000000, False)
|
||||
"""默认时长: 4.00s"""
|
||||
弹跳 = Transition_meta("弹跳", False, "6747865141120864779", "368205", "4b3b8b53bc1f947d57a30489d81387eb", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
打板转场_I = Transition_meta("打板转场 I", False, "7028143517570437668", "1432322", "355d5c4df581f6c4940c9b999e010f81", 4.000000, False)
|
||||
"""默认时长: 4.00s"""
|
||||
打板转场_II = Transition_meta("打板转场 II", False, "7029592645538157086", "1437264", "021dfc9a6541d8d08bac631749f9e87d", 4.000000, False)
|
||||
"""默认时长: 4.00s"""
|
||||
抖动 = Transition_meta("抖动", False, "7252544245444121148", "17223925", "a1b79bbc99afca7c9e5372cd050ad61d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
抖动_II = Transition_meta("抖动 II", False, "7252544309830881851", "17223924", "37319b02a398332e7159f323ea93ba88", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
抠像旋转 = Transition_meta("抠像旋转", False, "7386584387128660506", "73423370", "290a8f067f8039b1060df3d1e8d07ca0", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
拉伸 = Transition_meta("拉伸", False, "7231391397717217851", "13402655", "4fd21b4a2e6382ee8851c51c8f65ed73", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
拉伸_II = Transition_meta("拉伸 II", False, "7259735372039459389", "19137130", "d28fee612c51edf28da804983d220f8d", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
拉远 = Transition_meta("拉远", False, "6724226338418332167", "359365", "9661d5321722495c0a98959a0d617b0f", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
拍摄器 = Transition_meta("拍摄器", False, "7100849808784495135", "2057168", "b64bebe75d492161875d4fd54725b31d", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
推近 = Transition_meta("推近", False, "6724226861666144779", "359359", "4d5a316f2eae582e7d0604b47feb8c32", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
撕纸拉屏 = Transition_meta("撕纸拉屏", False, "7254847807465460280", "17934952", "c500d2310388b63f3a4e66ff0b15f6dc", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
放射 = Transition_meta("放射", False, "6724239584663704071", "4212630", "06cc8d49c558d57e21207f68a6a7dbc0", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
故障 = Transition_meta("故障", False, "6725771847444468236", "2918080", "7bec08ae5dae8806e3ba0c66622d0fd3", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
斜向分割 = Transition_meta("斜向分割", False, "7085250093527339557", "4211687", "6ae9eb3ee4b08afa67e3d079a2ece505", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
星星 = Transition_meta("星星", False, "6751564373317128708", "2916678", "5ad3a484b1784e3f5391bf3fa7b188f4", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
星星_II = Transition_meta("星星 II", False, "6789847494898487822", "2916679", "16a4697aef243c1524e9581fb2f038c9", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
模糊 = Transition_meta("模糊", False, "6911569618171597320", "4212596", "fc1352435f88c6f284b6c6dce8552ffe", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
横向分割 = Transition_meta("横向分割", False, "7083771238564237861", "4211685", "aa0aa4a72fc236611d3fd4bf75a12ca3", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
横向拉幕 = Transition_meta("横向拉幕", False, "6724492948144132621", "2917278", "de63aa2d5225bb6a65b5bab8702aa1f5", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
横线 = Transition_meta("横线", False, "6724845810892149251", "2918076", "36c1c8edb0171ea082c98d38ffa8bd36", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
气泡转场 = Transition_meta("气泡转场", False, "7028880945671311903", "1433968", "66489506132d1314f3c7264bcd947cad", 4.000000, False)
|
||||
"""默认时长: 4.00s"""
|
||||
水波卷动 = Transition_meta("水波卷动", False, "6858191497280360973", "878910", "cf9bac91349a227a6155eca9d94a8af8", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
水波向右 = Transition_meta("水波向右", False, "6858191510865711629", "878909", "e9301bacebc6dc444aa4e6f835dd4a31", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
水波向左 = Transition_meta("水波向左", False, "6858191524312650248", "878908", "6b6499879310b6d29e9595799829cb15", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
泛光 = Transition_meta("泛光", False, "6914112263645303303", "4202527", "c978e2e22e9a9768813f5fd8d486b792", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
泛白 = Transition_meta("泛白", False, "6949828109663212045", "4202528", "1bf6b83628ff6416a4d87865107b739e", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
波点向右 = Transition_meta("波点向右", False, "6858191541706428941", "878907", "74c13e6250cdff7a4e860625d1098e0c", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
渐变擦除 = Transition_meta("渐变擦除", False, "6919369138800431629", "1017911", "2fff9b60c929559bce574ab8ef2c14a7", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
滑动 = Transition_meta("滑动", False, "6757982416649851399", "4212349", "b99916e2936aeb2e56892ca617888694", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
漩涡 = Transition_meta("漩涡", False, "6851810799510360583", "4211780", "31d2de43e6711a9eeb831d60529d0393", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
爱心 = Transition_meta("爱心", False, "6748289440130535947", "2916677", "2382e2096918b63a0f8e75f720d7d892", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
爱心_II = Transition_meta("爱心 II", False, "6789846472343949837", "2916682", "0c04684566638932cb6f6d86cdfabda6", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
爱心上升 = Transition_meta("爱心上升", False, "6789846246069637640", "2916681", "2a3c5439ce79e6113843a2b7135bd21a", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
电视故障_I = Transition_meta("电视故障 I", False, "7046293801123451405", "2918081", "feaf2e85b909a123ea71728f9b61fb03", 1.600000, True)
|
||||
"""默认时长: 1.60s"""
|
||||
电视故障_II = Transition_meta("电视故障 II", False, "7042278078415901192", "2918082", "a082bdaea1122bbf1aba730278d50250", 1.600000, True)
|
||||
"""默认时长: 1.60s"""
|
||||
画笔擦除 = Transition_meta("画笔擦除", False, "6789846828788486664", "2912467", "4fafb5343d5c9e726278e90b5e0c1c93", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
白光快闪 = Transition_meta("白光快闪", False, "7343136487182963211", "49272367", "c1f7073a94d22565ace1ab3023d1c154", 0.400000, True)
|
||||
"""默认时长: 0.40s"""
|
||||
白色墨花 = Transition_meta("白色墨花", False, "6858191556055142919", "878906", "775ccf71576e2b8fb075f0e61e980923", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
白色烟雾 = Transition_meta("白色烟雾", False, "6885646856672514567", "947664", "9b679b32ec03c42932fa37b10c141bda", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
百叶窗 = Transition_meta("百叶窗", False, "6789847331060584974", "521326", "9f37c3f6f5e84b37b3a0560803a16c30", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
眨眼 = Transition_meta("眨眼", False, "6864867302936941064", "2917719", "bf695506c8091f7a01ee7b1323a4d601", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
矩形分割 = Transition_meta("矩形分割", False, "6858191571196580359", "878905", "82d6235324f8c5f830f8ccf7b1cc036b", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
窗格 = Transition_meta("窗格", False, "6747989545448378888", "368721", "cd6a7ff53319efa1c57690f61c8737a0", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
立方体 = Transition_meta("立方体", False, "6785042367498949127", "519784", "be45578bb628a21eaae268a8d8df868f", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
竖向分割 = Transition_meta("竖向分割", False, "7083771107706147364", "4211686", "7cc017d4e1b6ab58ec4b6900432522ff", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
竖向拉幕 = Transition_meta("竖向拉幕", False, "6726711903684399619", "2917285", "84f91be5a43cc6a9d03505a465418206", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
竖向模糊 = Transition_meta("竖向模糊", False, "7125661387568714247", "3796327", "cda4099e3f207ef1509f27d0b1ab01c1", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
竖向模糊_II = Transition_meta("竖向模糊 II", False, "7280837008421818936", "23404229", "85e381982a94778e003f3acc9527d5cf", 0.660000, True)
|
||||
"""默认时长: 0.66s"""
|
||||
竖线 = Transition_meta("竖线", False, "6724846536041173511", "2918077", "75019c1486b2366675d95602f58430e2", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
箭头向右 = Transition_meta("箭头向右", False, "6858191587554365966", "878904", "fa0cfb9e822393af86c6df4a8477cd63", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
粒子 = Transition_meta("粒子", False, "6855565313715474952", "4212632", "389d08f0700dd3e646a1e92289d84d58", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
翻篇 = Transition_meta("翻篇", False, "7034446419641504264", "4212350", "e3a2c5e0bd63416b5f64e489beb8a702", 1.300000, True)
|
||||
"""默认时长: 1.30s"""
|
||||
翻页 = Transition_meta("翻页", False, "6747979085894390279", "368701", "413b2cafe7a0c6309286845c559b3066", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
色差逆时针 = Transition_meta("色差逆时针", False, "6940500629013926413", "1069274", "b235f0bc4c9eb6e090358c09c7b0ffb0", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
色差顺时针 = Transition_meta("色差顺时针", False, "6940520116035523080", "1069374", "8661a7a8b19762d35506cd6513d8ed3e", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
色彩溶解 = Transition_meta("色彩溶解", False, "6724846004274729480", "322583", "b5f962a334dcc141bbc3dae0f5777564", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
色彩溶解_II = Transition_meta("色彩溶解 II", False, "6724866927933526542", "322625", "8179e342f9b24dd1817c56f7ef1f8f9b", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
色彩溶解_III= Transition_meta("色彩溶解 III", False, "6724867032312975875", "322627", "293a03bd140d09b0c616f879bda235e1", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
蓝色线条 = Transition_meta("蓝色线条", False, "6858191605384352263", "878903", "d4d2996c3f6cf97fb8602f825d98a4da", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
逆时针旋转 = Transition_meta("逆时针旋转", False, "6724226603372515853", "359437", "048170ae8df06f9d6964691b1e472c6a", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
逆时针旋转_II= Transition_meta("逆时针旋转 II", False, "7252544659245765179", "17224251", "1b2c634ea54e81de34cb6d31848908af", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
镜像翻转 = Transition_meta("镜像翻转", False, "6848792278710882824", "2917288", "1109c08965141f90b9174c38e85c8cab", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
闪白 = Transition_meta("闪白", False, "6724845376098013708", "322575", "b033ea56618d5b0f098071fb326bb02a", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
闪白_II = Transition_meta("闪白 II", False, "7306818286413419017", "31619869", "9a1089fc9fefe2a79a71c37c1bc5831a", 0.300000, True)
|
||||
"""默认时长: 0.30s"""
|
||||
闪黑 = Transition_meta("闪黑", False, "6724239388189921806", "321493", "3bca53e9f3dfa2c184fbee96438ea097", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
雪花故障 = Transition_meta("雪花故障", False, "6724866446842663431", "2918079", "71cabe836d9c88afd44f43654ba67fa7", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
雾化 = Transition_meta("雾化", False, "7216171159589491259", "11387229", "945e1560e2c65277b4bd4127cd479746", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
震动 = Transition_meta("震动", False, "7198100561235808825", "9261771", "e46204ca1e4fcf76d1b1c86e852e862d", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
顺时针旋转 = Transition_meta("顺时针旋转", False, "6724226684721041932", "359421", "d6d0c76fb82ca2a355de138d94a94780", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
顺时针旋转_II= Transition_meta("顺时针旋转 II", False, "7252544556799889975", "17224317", "5e81c58bf217a2bdaf479275e412ea93", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
频闪 = Transition_meta("频闪", False, "7083767957662208549", "1674710", "35a76b77dd0812f7012911109db35799", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
风车 = Transition_meta("风车", False, "6748286529921094157", "369485", "367b8b51b2eeb63eb2009bf5b356bc2f", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
马赛克 = Transition_meta("马赛克", False, "6724866519022440967", "4212631", "eed93b26d9cd6296b10d2f5065ee396e", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
黑色块 = Transition_meta("黑色块", False, "6724866346569437710", "2918078", "357e865f3bb0c6529ee882ebf279d7c6", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
黑色烟雾 = Transition_meta("黑色烟雾", False, "6885647017452769805", "947663", "fa02f80c28a9671a206c2ccf17b41c58", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
万花筒 = Transition_meta("万花筒", True, "7257806429086552632", "18722268", "0aa1d28fdb90725586089436e6ccd243", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
三屏放大 = Transition_meta("三屏放大", True, "7320254175466492467", "38586528", "b59a3df958aeeba78f1ceb075be189f0", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
三屏滑入 = Transition_meta("三屏滑入", True, "7312438185261273650", "34443818", "09dc4fee56acca3e6f1c104277b8695d", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
三屏闪切 = Transition_meta("三屏闪切", True, "7252599996254523959", "17242682", "2bc234d945f15d93f3d292e64042d69d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
下滑 = Transition_meta("下滑", True, "7309694074015977993", "32998125", "9c54ccb7b27ab98f7c3bb03a5d4acc4b", 0.550000, True)
|
||||
"""默认时长: 0.55s"""
|
||||
云朵_II = Transition_meta("云朵 II", True, "6955760408737092132", "2912470", "5a8914a3658f88265bbeda060a7c79aa", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
亮点模糊 = Transition_meta("亮点模糊", True, "7123135366504124936", "3705757", "b48f47c097e83842d1c0f919d9c67af6", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
便利贴 = Transition_meta("便利贴", True, "7302023728441856549", "29871972", "a5a04de1e339c4d4907e26ff6b229563", 1.100000, True)
|
||||
"""默认时长: 1.10s"""
|
||||
信号故障 = Transition_meta("信号故障", True, "7288149307197231676", "25265947", "f23f60f3bee4fac6368268a1406ccaf7", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
信号故障_II = Transition_meta("信号故障 II", True, "7342791345162949183", "49094731", "b5537d48d5d72d9707bb4641d51ecc73", 0.670000, False)
|
||||
"""默认时长: 0.67s"""
|
||||
倾斜拉伸 = Transition_meta("倾斜拉伸", True, "7383960886131560960", "72481265", "c87e594192131b1b82e1c34cd383f807", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
倾斜模糊 = Transition_meta("倾斜模糊", True, "7355762441533264394", "56268173", "0b88f86366c21c3ebd2bcc8df140810d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
像素冲屏 = Transition_meta("像素冲屏", True, "6981689835534684702", "1182216", "b7f8e6cd03560d1f52e1270dcf7c9ba4", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
光束 = Transition_meta("光束", True, "6982127832042312206", "4202531", "84525ee78728b5cce44c8404d9f50b0d", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
全息投影 = Transition_meta("全息投影", True, "7298230450768581129", "28518430", "95a2a049736e0843b5984e0090276f7b", 0.400000, True)
|
||||
"""默认时长: 0.40s"""
|
||||
六边形变焦 = Transition_meta("六边形变焦", True, "7182413216276812346", "7824963", "faf521d87b90c79031bfd08d687df52a", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
冲屏扭曲 = Transition_meta("冲屏扭曲", True, "7359133728313971227", "58099421", "2fb5734ab118c745bfa0596264533e54", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
几何分割 = Transition_meta("几何分割", True, "7130139199394550303", "3985085", "4f6209fcc7e8746a7c1e43d8a1704827", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
分屏下滑 = Transition_meta("分屏下滑", True, "7337974537683735080", "46873416", "eb4e4368773f40a8c807e77497acab4f", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
前后对比 = Transition_meta("前后对比", True, "7205856572994490935", "10139297", "f38bc39938f58a4ee3f9c7bfcf4f524f", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
剧烈摇晃 = Transition_meta("剧烈摇晃", True, "7367356130307084838", "63047898", "4ffdc4b55688e65262a229d5e7b987ca", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
卡片弹出 = Transition_meta("卡片弹出", True, "7384334283659285032", "72605929", "67660fa9cdb387454a59d3a747cff6ef", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
可爱爆炸 = Transition_meta("可爱爆炸", True, "7187674415268631101", "8375167", "75942cf09b7e84526a357898a47c18bb", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
吃掉 = Transition_meta("吃掉", True, "7372506069328728585", "66629623", "64b8f472cc109cccd9c50e210331af43", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
后台切换 = Transition_meta("后台切换", True, "7320129407799005734", "38530921", "c5092413343f5e808ffc27ab8b02e7c4", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
向上波动 = Transition_meta("向上波动", True, "7148734739807998495", "4861515", "69a520845b900b142b203cf2e677abd5", 5.000000, True)
|
||||
"""默认时长: 5.00s"""
|
||||
向下抖动 = Transition_meta("向下抖动", True, "7338709911791997480", "47241669", "1a44879e265bc89746e30f59d2ff0245", 1.300000, True)
|
||||
"""默认时长: 1.30s"""
|
||||
向下拖拽 = Transition_meta("向下拖拽", True, "7199528468244075067", "9382531", "f1d490e1e2a87013bee63a8aa4191f9f", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
向左拉屏 = Transition_meta("向左拉屏", True, "7089311972235153950", "1722934", "21538bc8fa278603f8e944fc405a65c9", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
向左波动 = Transition_meta("向左波动", True, "7126772940451877406", "3971081", "cbffe80a580575becb3beb3bcbd5cc09", 5.000000, True)
|
||||
"""默认时长: 5.00s"""
|
||||
喜欢 = Transition_meta("喜欢", True, "7070430644563612191", "1600478", "945ee55ddc4b7c9762b55c0ee302bdce", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
四屏转换 = Transition_meta("四屏转换", True, "7337612480610308649", "46644610", "e7bd3aacd0daeafdf20d93d4a171a846", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
回忆 = Transition_meta("回忆", True, "6748220149284737550", "4211778", "48a73d2ca44a59d8faf88ab0c4bb39f6", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
回忆_II = Transition_meta("回忆 II", True, "6748220462746046989", "4211779", "bfb17d87ed3db6332a6e0855299809d9", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
回忆拉屏 = Transition_meta("回忆拉屏", True, "7184682990901924410", "8027945", "3bc26bcea93ea43b349c60c28bea394f", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
回忆拉屏_II = Transition_meta("回忆拉屏 II", True, "7306440470119322139", "31456359", "2464d4afc9c5f43072935915c6a86c29", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
圆形分割 = Transition_meta("圆形分割", True, "7083435788322476581", "4211684", "2bb3ad90a4eb3a2563b87c300e0ae8a1", 1.500000, False)
|
||||
"""默认时长: 1.50s"""
|
||||
圣诞树 = Transition_meta("圣诞树", True, "7302357935902954035", "29976594", "8c40262df8758d19446264aa5749008a", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
复古叠影 = Transition_meta("复古叠影", True, "7200638304591548985", "9529419", "078be6db2b8d8abded47cbd72f5635df", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
复古放映_II = Transition_meta("复古放映 II", True, "7240050497804046908", "14607947", "9891a08898646c3795cab650979bf0dc", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
复古漏光 = Transition_meta("复古漏光", True, "7181752495150993957", "8104139", "0af78adb0da721bbe253b096b8152851", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
复古漏光_II = Transition_meta("复古漏光 II", True, "7287881053534949943", "25193261", "1789e06f18340fbcbd30e6757f10ba75", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
复古胶片 = Transition_meta("复古胶片", True, "7261814111816651322", "19552395", "c5686c7e832a5e8c178c5cadb42d9ab4", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
多层环形 = Transition_meta("多层环形", True, "7373523970538082866", "67116644", "cf6da6be1066054f86c4524fa6494d8e", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
多屏定格 = Transition_meta("多屏定格", True, "7287860606395224613", "25184085", "c12aeac3828eb06fd5d0f865ee7041d1", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
大圆盘 = Transition_meta("大圆盘", True, "7362104359682839055", "59713023", "9d6a02b47846369cec6d19a35826570d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
射灯 = Transition_meta("射灯", True, "7368775489445433883", "63886272", "23706ad60c2258a524da320eca564d12", 1.600000, True)
|
||||
"""默认时长: 1.60s"""
|
||||
小喇叭 = Transition_meta("小喇叭", True, "7070430823597478407", "1600476", "3707101142d3069789f3d821cdb7bc35", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
小恶魔 = Transition_meta("小恶魔", True, "7075598043252265509", "1628344", "c9a87dfafa58fbc0d401fc182fbaf6fc", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
幻影 = Transition_meta("幻影", True, "7218040359715082809", "11634125", "4a1a61e615eb94e37e2c198dd4602107", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
幻觉 = Transition_meta("幻觉", True, "7395044376621093391", "76465118", "cb9796c59a719185df8c9c5d1922b061", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
开心 = Transition_meta("开心", True, "7073053544839909919", "1610838", "0d80e7d2b7171236732668e91b849120", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
弹出 = Transition_meta("弹出", True, "7394709307842892303", "76381219", "5c7ab5f82d4253e2225b57ba734edd3a", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
弹动发光 = Transition_meta("弹动发光", True, "7347897562436735503", "51950360", "31bdfcfe5852df71426d22fc02293698", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
彩色像素 = Transition_meta("彩色像素", True, "7096015235953201701", "4212518", "d91c7ef4be8808bddec8a1a119f78da7", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
微抖动 = Transition_meta("微抖动", True, "7368739347845091877", "63860874", "9870ae40f2c8a325debc06d25ef46895", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
心形叠化 = Transition_meta("心形叠化", True, "7264829174601224764", "20224653", "24559e84f2cfae6bbfd86d47bb8f60f9", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
快速缩放 = Transition_meta("快速缩放", True, "7382154814144123392", "71890617", "bbedbf5ac1b865d1e1395d4d402ce5fa", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
快门 = Transition_meta("快门", True, "6882983860615778823", "2917720", "2df569fefb5004c041af5509c10d6c53", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
扫光 = Transition_meta("扫光", True, "7106765945305043463", "4202535", "333aa7e9d8b24e358ea60784ce47b6fe", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
扭曲溶解 = Transition_meta("扭曲溶解", True, "7374259106502152741", "67617874", "756df14869da51538ed41e2bfac3b779", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
扭转弹动 = Transition_meta("扭转弹动", True, "7344986966145896994", "50231600", "e5d36f065e3f0e8801c43a625a7d9947", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
抖动放大 = Transition_meta("抖动放大", True, "7260415521852494397", "19272888", "e4cafc076ecab223a39a26fe6f05b6db", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
抖动缩小 = Transition_meta("抖动缩小", True, "7291972229087105563", "26488746", "6e78a0c97c60562573a30342882a240f", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
抖动缩小__II= Transition_meta("抖动缩小 II", True, "7316783851206873651", "36841926", "137d3f03fbd4dddbc6a2a0dd1f371e17", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
抽象前景 = Transition_meta("抽象前景", True, "7104215831919202853", "2459634", "88b3ead3e00313684cd868d51c1173c9", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
抽象前景_II = Transition_meta("抽象前景 II", True, "7108564115529929229", "2870170", "b8628f4b1d6fc27447dfad6a5f25beb4", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
拉开 = Transition_meta("拉开", True, "7384323685026370098", "72601002", "828b81127e669508f999900bff18cf2a", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
拉框入屏 = Transition_meta("拉框入屏", True, "7297077423487586826", "28115429", "bfc8a51d2b304be3dd36a68331f8d0f8", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
拍摄器_II = Transition_meta("拍摄器 II", True, "7109727014780670495", "2958464", "5483f878a302c6d7879bd566cebab543", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
拍摄器_III = Transition_meta("拍摄器 III", True, "7107542030976291336", "2792048", "36c9b870a00e16365421398ac4e51652", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
推近_II = Transition_meta("推近 II", True, "7290852476259930685", "26135688", "94815943a86e741a5fec1737fbb46d60", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
推远_II = Transition_meta("推远 II", True, "7360987817066893862", "59043083", "0a10553e75180add06fd336bf16fa8aa", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
摄像机 = Transition_meta("摄像机", True, "7070047850960261668", "1598384", "bb0b9fa428e5a3fde828c03022b5082d", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
摇晃描边 = Transition_meta("摇晃描边", True, "7372137986877559335", "66403340", "0a5449cf1ca4c9fb473ff664ea23185b", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
摇晃震动 = Transition_meta("摇晃震动", True, "7343618757530489379", "49545855", "c911cc41c158afbd43636d1aa465e1d2", 1.300000, True)
|
||||
"""默认时长: 1.30s"""
|
||||
摇镜 = Transition_meta("摇镜", True, "7305969268259033609", "31254345", "f215c106100f76dcf6c550d0f8217ecb", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
撕纸 = Transition_meta("撕纸", True, "6875627914444935694", "2912468", "131ae40c737ab9f5c79e35e3639a4bad", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
撕纸掉落 = Transition_meta("撕纸掉落", True, "7218114518314914365", "11661051", "42fa2f7a99a392e2801ad5ec5f62d73a", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
收缩抖动 = Transition_meta("收缩抖动", True, "7347676775633130024", "51859926", "88939867fef0a71b39f549558d724d31", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
放大左移 = Transition_meta("放大左移", True, "7347582471111709236", "51784590", "a2c4ddc0f96c5694e941d738ed52cdf4", 1.300000, True)
|
||||
"""默认时长: 1.30s"""
|
||||
放大镜 = Transition_meta("放大镜", True, "7313974602156216858", "35244988", "91aee5fc06c85dda958101a677f19c0b", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
故障模糊 = Transition_meta("故障模糊", True, "7302270954602762789", "29927992", "fc3fae70595c7bb6f943aca08dc7b9f1", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
数字矩阵 = Transition_meta("数字矩阵", True, "7268870949548593725", "20983534", "f39bf079c6066cbfee7c5eca1491b276", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
斜向模糊 = Transition_meta("斜向模糊", True, "7125661284762128910", "3796323", "b14d9650ca6eef79d6b19c16c65166d3", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
斜向闪光 = Transition_meta("斜向闪光", True, "7384331194978013711", "72603864", "eba796256a96c4ff0d1b331a8819c6f2", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
斜线翻页 = Transition_meta("斜线翻页", True, "7339900424956154403", "47905855", "46d525166125a781ce8cf9c6e6370454", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
新篇章 = Transition_meta("新篇章", True, "7174756125902901797", "7089439", "74716b2d52b85799f78903818eb3c98f", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
新篇章_II = Transition_meta("新篇章 II", True, "7174754977544409657", "7089435", "6c1c52a50f842600c69417cf38adc113", 1.600000, True)
|
||||
"""默认时长: 1.60s"""
|
||||
方形分割 = Transition_meta("方形分割", True, "7127901205820346917", "3895735", "9f29e50ac72b66f4b0320ee1ea9d112f", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
方形模糊 = Transition_meta("方形模糊", True, "7122721406210544164", "3686479", "8e3579bda4787d20d8c8ab1b0c68112d", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
方形模糊_II = Transition_meta("方形模糊 II", True, "7384005295770440201", "72501238", "301fe868bf7b1549d6d07af9405beb4a", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
旋焦 = Transition_meta("旋焦", True, "7215424325036282428", "11286537", "917c209246e975d4f10d9b8c8c78035f", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
旋转圆球 = Transition_meta("旋转圆球", True, "7377722094806635048", "69481298", "34211e59f420adb42bc00b9a8d36bb6a", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
旋转圆盘 = Transition_meta("旋转圆盘", True, "7261828356386067005", "19556167", "86ce95075986170812258b247969c972", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
旋转圆盘_II = Transition_meta("旋转圆盘 II", True, "7262674749258469949", "19727008", "17d1ac181dd7b623059b8aed82d2ef13", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
旋转快门 = Transition_meta("旋转快门", True, "7350577049968316979", "53358879", "f2b536b7d3f17bc58e0e4957f517ece0", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
旋转拨盘 = Transition_meta("旋转拨盘", True, "7368844683256009242", "63924504", "88ac2494e5cdec7f874c4157555d2d2b", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
旋转模糊 = Transition_meta("旋转模糊", True, "7332480491058106943", "44259414", "1a28e7fbb2a177240786bd945fb9ca7e", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
旋转穿越 = Transition_meta("旋转穿越", True, "7343092798993732148", "49228871", "e05493559e59bf7f4c4a9ea5a5d212de", 1.800000, True)
|
||||
"""默认时长: 1.80s"""
|
||||
旋转纵深 = Transition_meta("旋转纵深", True, "7368687055225754153", "63822177", "e717dfe6ccb3c6a6c6a6f70987b1a894", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
旋转翻页 = Transition_meta("旋转翻页", True, "7320577375752688165", "38717232", "31a897fbdd402adaf84724fb28ef606b", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
旋转震动 = Transition_meta("旋转震动", True, "7326861725213397514", "41492871", "70bea2644a8dc8bc2b24102d8fa90ca4", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
无限穿越_I = Transition_meta("无限穿越 I", True, "7036984568536109581", "1465694", "3ee3fc9318dc2315d250f0baa1763e5b", 1.600000, True)
|
||||
"""默认时长: 1.60s"""
|
||||
无限穿越_II = Transition_meta("无限穿越 II", True, "7034717113130422791", "1458828", "b87498756c478952cf7c804234f97bbb", 1.600000, True)
|
||||
"""默认时长: 1.60s"""
|
||||
旧胶片 = Transition_meta("旧胶片", True, "7099310030138118687", "1933296", "782110cae96a4f9ed73f6a85d0610a7a", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
旧胶片_II = Transition_meta("旧胶片 II", True, "7111634884153578014", "3114014", "79901fab61f0b8c2960c73a78e84e5a3", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
时光穿梭 = Transition_meta("时光穿梭", True, "7306853312400200229", "31645629", "74eab27c1dc1a568b851a2e543682058", 1.100000, True)
|
||||
"""默认时长: 1.10s"""
|
||||
星光 = Transition_meta("星光", True, "7177201869612126777", "7339355", "2215320b9ba4138c53f1f7b9d0c58b54", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
星光叠化 = Transition_meta("星光叠化", True, "7321658733497422363", "39173243", "f6d691dd1f991655b2826964c3883772", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
星星_III = Transition_meta("星星 III", True, "7293358903176204851", "26885516", "1ece838a7bfd2c8b1b0daf25d5776d22", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
星星吸入 = Transition_meta("星星吸入", True, "7312716430875562506", "34540914", "6ce2a58bc6a3df532a3c1ca890c97394", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
星星模糊 = Transition_meta("星星模糊", True, "7206157339253019197", "10169537", "28556f2cabd470e0da1a9ddf16d76198", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
春日光斑 = Transition_meta("春日光斑", True, "7330599151685603875", "43351778", "5d872c46167c2f25f897ae1fc7625c8d", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
暧昧光晕 = Transition_meta("暧昧光晕", True, "7268613185337299513", "20954940", "ab82749d799477631ae63c081ad569d1", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
曝光拉丝 = Transition_meta("曝光拉丝", True, "7308617539452408358", "32432969", "56eaaf319007193c199f17554890abb4", 2.000000, True)
|
||||
"""默认时长: 2.00s"""
|
||||
曝光摇镜 = Transition_meta("曝光摇镜", True, "7283720497513108025", "24147753", "e0ee1d0a29d1138f7a3b673ffbad91d5", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
未来光谱 = Transition_meta("未来光谱", True, "7176890183940313658", "7307905", "7974c984bf60d60079cc03be5928f74d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
未来光谱II = Transition_meta("未来光谱II", True, "7176914791267570232", "7312585", "524895c4bce265b44ffa8ac92bf0dd6a", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
条形模糊 = Transition_meta("条形模糊", True, "7122387202725646862", "3675841", "0a5742430e336b3a1e1b6ff9983c5d25", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
模糊放大 = Transition_meta("模糊放大", True, "7301280654015074842", "29614872", "7c0ef1a54495f7cd9343efe2acc57b26", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
模糊缩小 = Transition_meta("模糊缩小", True, "7297133348567126566", "28141206", "742e708ac73c3a335a41133684c488ed", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
横条挤压 = Transition_meta("横条挤压", True, "7369507828668568116", "64687184", "6bbc30d59ef4fd16e4ba6656129cfd95", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
横移模糊 = Transition_meta("横移模糊", True, "7316901787762430491", "36950128", "aa2ce5c9b13a62881d04f9c23aa30678", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
水墨 = Transition_meta("水墨", True, "6789847231873683976", "2912466", "d1dd3dd8905f0b96be756bd34be1a84d", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
水滴 = Transition_meta("水滴", True, "7218875183413596730", "11765299", "d5fa6a1daecd2c45b0414626a69e7674", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
水滴_II = Transition_meta("水滴 II", True, "7231860840452854332", "13482623", "eebf40246476d57ccbf8bbdf15864864", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
水滴_III = Transition_meta("水滴 III", True, "7337571999885038130", "46608908", "32eea5171000b838f2eb74941fb751d7", 1.100000, True)
|
||||
"""默认时长: 1.10s"""
|
||||
汇聚 = Transition_meta("汇聚", True, "7308666709932511753", "32470148", "3bb1668888e7e87764d03b15733370fb", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
泡泡模糊 = Transition_meta("泡泡模糊", True, "7159097688955294222", "5663559", "10478b300821fa6eccadf67b07b63208", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
波光粼粼 = Transition_meta("波光粼粼", True, "7361758664182469157", "59511491", "da913924bc6975821de103b371d540ff", 1.166600, True)
|
||||
"""默认时长: 1.17s"""
|
||||
波动 = Transition_meta("波动", True, "7169480114860724773", "6500749", "af314da6343d025cc0f5d668d2fa0a7b", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
波动_II = Transition_meta("波动 II", True, "7308652550574576138", "32459394", "dd709d2dd83add664f3cbd45893438f7", 0.400000, True)
|
||||
"""默认时长: 0.40s"""
|
||||
波动故障 = Transition_meta("波动故障", True, "7223312837320380983", "12349835", "bd7d819531a9d2b044f823080aa0fc1c", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
流光 = Transition_meta("流光", True, "7316789832833831461", "36847370", "686a5ae873f34ac400ee8ad6a8658d68", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
涂鸦放大 = Transition_meta("涂鸦放大", True, "7239925851335168569", "14573363", "2a29109cf3c013e6f7770a28cba4154a", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
溶解推进 = Transition_meta("溶解推进", True, "7348406367394206271", "52246665", "e6c9fda251c612d8cdf69ddef055e410", 0.806000, True)
|
||||
"""默认时长: 0.81s"""
|
||||
滑动弹出 = Transition_meta("滑动弹出", True, "7343237606043292200", "49343171", "bb190e71a692bc20d9060b22b4311896", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
滑动放大 = Transition_meta("滑动放大", True, "7327132595190239759", "41576555", "a746b6b7c2e83275d90864d0b28173aa", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
滑块拼贴 = Transition_meta("滑块拼贴", True, "7239990715307004477", "14594823", "c8552ba32a7e8804013a8a1b977e23c1", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
漩涡扭曲 = Transition_meta("漩涡扭曲", True, "7308653984888132123", "32460372", "fedeb478c6e4d39282dfe1ad13ee653a", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
炫光 = Transition_meta("炫光", True, "6726707814028284423", "4202524", "a3fd6266c293496fd9480884a93fb90e", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
炫光_II = Transition_meta("炫光 II", True, "6950255790762496548", "4202530", "aafb556352016d087cddd1939ada20f8", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
炫光_III = Transition_meta("炫光 III", True, "6950255930160189988", "4202529", "5ed29701053e9f7640ecf8dcfc34c7cc", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
炫光弹动 = Transition_meta("炫光弹动", True, "7348337133838406194", "52201950", "113a7490b314d57a7dea4826e056ff99", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
炫光扫描 = Transition_meta("炫光扫描", True, "7371717412736995903", "66131585", "4bd676f9001765af20ac02b252da5575", 1.466660, True)
|
||||
"""默认时长: 1.47s"""
|
||||
炸弹 = Transition_meta("炸弹", True, "7076321483282190878", "1632990", "e0a1a6b556395c054ce97d73b6d1ef25", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
烟雾弹 = Transition_meta("烟雾弹", True, "7366189026677625359", "62284094", "58dced44162cefabdc709058b7583d65", 1.400000, True)
|
||||
"""默认时长: 1.40s"""
|
||||
热成像 = Transition_meta("热成像", True, "7112344011737666061", "3141662", "9ddbaf68f325c10f04ba84f22272cf40", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
燃烧 = Transition_meta("燃烧", True, "7089309494550729253", "1722848", "0f42e514001c30186e1c9c68e1ebfee9", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
燃烧_II = Transition_meta("燃烧 II", True, "7089307363806548510", "1722824", "164c1073bde892dcd9f21d8026fb3cbd", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
燃烧_III = Transition_meta("燃烧 III", True, "7088523814102897188", "1714536", "da10f2f4ae0aa70ad4d61b2c750aef6b", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
爆米花 = Transition_meta("爆米花", True, "7075173004560306724", "1623902", "3b70ab38b467c15d463b018b05a420e2", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
爆闪 = Transition_meta("爆闪", True, "7255132261584998969", "18010162", "68768628ef11bee5b3887f0dbd7f7c6c", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
爆闪_II = Transition_meta("爆闪 II", True, "7259635767096382011", "19102212", "96e672a98b09ef157224e8b1399ae316", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
爱心冲击 = Transition_meta("爱心冲击", True, "6789846355742298632", "2916680", "6ca91f7bba738e2e4a67cbf8104eb7b0", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
爱心模糊 = Transition_meta("爱心模糊", True, "7226945634312393274", "12851969", "3dfdf5cbfe44b5271b9e41acb15ddc37", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
爱心气球 = Transition_meta("爱心气球", True, "7267895649599754808", "20810100", "6b969705ffc616c0ad03c1e0fc039bd7", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
环形色散 = Transition_meta("环形色散", True, "7384745397022888488", "72761824", "608a4f0f4729821ff115f72bfb57a909", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
玻璃破碎 = Transition_meta("玻璃破碎", True, "7242225450628420133", "14930013", "55aa86f7d52f2e3471574b51aedfffe8", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
玻璃破碎_II = Transition_meta("玻璃破碎 II", True, "7249622034878042661", "16373363", "f77fe839adb1ca6cddc086834a514b79", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
珠光模糊 = Transition_meta("珠光模糊", True, "7181370814594290234", "7738323", "75984d0cab40abfd59ec5d7ede711496", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
生气 = Transition_meta("生气", True, "7070430937900651016", "1600475", "be7a4f8a24aafb10db343e51e72fead2", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
电光 = Transition_meta("电光", True, "7186953120490983997", "8298317", "6142261f8bd0361a56d15a3d408c20ab", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
电光_II = Transition_meta("电光 II", True, "7292990637350064690", "26773684", "e8a9edb89dae57afad5dfd6b707a6b57", 1.300000, True)
|
||||
"""默认时长: 1.30s"""
|
||||
百叶窗_II = Transition_meta("百叶窗 II", True, "7389190159989740072", "74345085", "0786c1d4057bf47fbdb5f6bfeab8a0f3", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
相片切换 = Transition_meta("相片切换", True, "7324946677305971226", "40583461", "0bcab7309cd00dc17a95071b62282d0a", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
相片拼贴 = Transition_meta("相片拼贴", True, "7212523710685647420", "10917367", "bdff0041ed99b812568c15e5a7c5d798", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
空间弹动 = Transition_meta("空间弹动", True, "7265321906830578235", "20330329", "e86c774726c177ee17fd90f63750cf78", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
空间弹动_II = Transition_meta("空间弹动 II", True, "7269664953584325179", "21121644", "adf0c9abb5c1399909318bb603f28ad1", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
空间弹动_III= Transition_meta("空间弹动 III", True, "7265322078276948535", "20330339", "d8c4ad960be7cfbe8093fa26076ce000", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
空间弹动_IV = Transition_meta("空间弹动 IV", True, "7270393974517404215", "21261060", "fb42b8f0a30fe4a0c81c292460aabdbd", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
空间旋转 = Transition_meta("空间旋转", True, "7127563142359421471", "3878325", "07c37c8bcf40b83415aa6f223de2cd8a", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
空间旋转_II = Transition_meta("空间旋转 II", True, "7137983390896099871", "4360464", "43927ed137278ab2c3cf8a4933cb4169", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
空间旋转_III= Transition_meta("空间旋转 III", True, "7138602593751667207", "4382158", "7baa76e42959ee273c278389d359fc59", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
空间翻转 = Transition_meta("空间翻转", True, "7218870491400901157", "11764147", "0ea4c7c316341196f21440967330f063", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
空间翻转_II = Transition_meta("空间翻转 II", True, "7223591053973000761", "12371701", "ee9309f01cc53522243198c4ba69ab96", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
空间跳跃 = Transition_meta("空间跳跃", True, "7309399317662405146", "32858947", "82c5ef6e77c7178c7ca45d8549b87578", 0.633000, True)
|
||||
"""默认时长: 0.63s"""
|
||||
穿越 = Transition_meta("穿越", True, "7152422191944962567", "5083535", "80fb974789637e8175557c7c3e649c0e", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
穿越_II = Transition_meta("穿越 II", True, "7152354215132664357", "5076093", "aa3181f829fe16f72540cc0ec7dfb171", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
穿越_III = Transition_meta("穿越 III", True, "7341295618863665690", "48498880", "6d6fa95fe1414d4b4a45db9ddec0ee9b", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
立体翻转 = Transition_meta("立体翻转", True, "7353088031705797159", "54820217", "3746e458c37ab10f2aaa1ac83dee99f6", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
立体翻页 = Transition_meta("立体翻页", True, "7156512800867619335", "5379189", "ac010354774404d6b8e092120ab76772", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
立体翻页_II = Transition_meta("立体翻页 II", True, "7156527319274754568", "5381749", "a033fe7038252ba812a4377ff3326acf", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
竖向拉伸 = Transition_meta("竖向拉伸", True, "7384005384349946418", "72501228", "ac2563343aceb1b399c6b97b2b21f567", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
竖移模糊 = Transition_meta("竖移模糊", True, "7270505237935297085", "21300860", "4f77c735f448ec5f6df27f21d88e4ee6", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
粉色反转片 = Transition_meta("粉色反转片", True, "7200360240393491000", "9504701", "80529c6e270d25d9fa6e4babb45346c7", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
纸团 = Transition_meta("纸团", True, "7238905266912105019", "14451527", "283ecb29f26d13d371658f0b8b476776", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
翻转冲屏 = Transition_meta("翻转冲屏", True, "7275914638267519525", "22253379", "c1ebaab317335c387d342a3d0b42a65b", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
翻页_II = Transition_meta("翻页 II", True, "7221478593803588152", "12108759", "7720214c69eaa3203c3edda2027b28d4", 0.900000, True)
|
||||
"""默认时长: 0.90s"""
|
||||
聚光灯 = Transition_meta("聚光灯", True, "7325700559556579878", "40923539", "43853a772e195442e07760b04fb236dd", 1.100000, True)
|
||||
"""默认时长: 1.10s"""
|
||||
胶片定格 = Transition_meta("胶片定格", True, "7211146962513433147", "10764691", "1a96476b4a04acd24a1b5a7f293fc2eb", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
胶片擦除 = Transition_meta("胶片擦除", True, "7308265370480022026", "32274061", "4bbb3dcb507832529d7a18020c8fc88d", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
胶片融化 = Transition_meta("胶片融化", True, "7346474643827462667", "51067351", "563d0dfa49528bb59646384d8a18552a", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
胶片闪光 = Transition_meta("胶片闪光", True, "7356486482271408666", "56656394", "d3eb0fe7d4088694cc0f9ca02cad07b2", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
色块故障 = Transition_meta("色块故障", True, "7104539089629614606", "2483334", "1f60c6b995a4cf2212dfd9038f738706", 3.000000, False)
|
||||
"""默认时长: 3.00s"""
|
||||
色差故障 = Transition_meta("色差故障", True, "6724239785205961228", "2918075", "9de90519d59e432b81c38423aa0393d7", 1.000000, False)
|
||||
"""默认时长: 1.00s"""
|
||||
色彩溶解_IV = Transition_meta("色彩溶解 IV", True, "7171714374912971271", "6736571", "a113cd4e04b969f3d988d76899885d42", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
色彩溶解_V = Transition_meta("色彩溶解 V", True, "7171714652248740365", "6736575", "da37129b95501377039f01acfded91fc", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
色散晃镜 = Transition_meta("色散晃镜", True, "7340477409478578738", "48127374", "554ea6d10cd7fbb24ccd24bd91d8c7e1", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
色散闪烁 = Transition_meta("色散闪烁", True, "7234416277974946365", "13830295", "2d9f72076aeefe8f52dfd1a012cd5127", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
色散闪烁_II = Transition_meta("色散闪烁 II", True, "7281584246882308665", "23586159", "5f501bb3da1bcbd2ffadca8b916eba81", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
荧光爆闪 = Transition_meta("荧光爆闪", True, "7342499359503684150", "48938221", "a2d70591b5f8dcc52298426ca626c931", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
菱格翻转 = Transition_meta("菱格翻转", True, "6983867136510792206", "1187052", "99c0d1524575c7f7020cd77d36a6b008", 1.450000, True)
|
||||
"""默认时长: 1.45s"""
|
||||
蓝光扫描 = Transition_meta("蓝光扫描", True, "7275176500381356599", "22119723", "95462badbbb87bd7dc4e1d7b04e58306", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
蓝色反转片 = Transition_meta("蓝色反转片", True, "7200358812316865085", "9504705", "41e718fd6dbac560c6c7a23afc66e50b", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
融化 = Transition_meta("融化", True, "7198096122970116663", "9261283", "a0db335169668ca09f5244aa487730c0", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
融化_II = Transition_meta("融化 II", True, "7200339965442527803", "9503051", "74a83d45bdccf5d27bd4b55ddd2733f3", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
负片下滑 = Transition_meta("负片下滑", True, "7302412902181376539", "29999964", "e2db0036d057c27aea3460f3442aedf9", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
超赞 = Transition_meta("超赞", True, "7070430749547041293", "1600477", "e0bd13b237d73eb121473c442c752a23", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
透镜故障 = Transition_meta("透镜故障", True, "7097849004062413343", "1889546", "bc652327bcde0e6bf9db8a89d371dd05", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
重叠上滑 = Transition_meta("重叠上滑", True, "7232587870672785980", "13582109", "aea42365eeb8cd0df3e4e422cde45e8a", 1.200000, True)
|
||||
"""默认时长: 1.20s"""
|
||||
金色光斑 = Transition_meta("金色光斑", True, "7317211103652483621", "37131315", "f9224f91ef353fefa3bae96af26a447e", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
钱兔无量 = Transition_meta("钱兔无量", True, "7189608212193088060", "8605167", "a6c068f7790c563231b8df2b5796d60c", 1.500000, True)
|
||||
"""默认时长: 1.50s"""
|
||||
长曝光 = Transition_meta("长曝光", True, "7306435255286633010", "31452163", "c239e26c5f99cf83cabd28f63d04b93f", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
闪光灯 = Transition_meta("闪光灯", True, "6986584807543149063", "4202532", "9abfb7452d046a1dafd4d9525b58ec3a", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
闪光灯_II = Transition_meta("闪光灯 II", True, "7244074212158083641", "15250161", "1fcc7fccf7829d94f2747938fcb84706", 1.900000, True)
|
||||
"""默认时长: 1.90s"""
|
||||
闪光灯_III = Transition_meta("闪光灯 III", True, "7246234663755190839", "15638113", "5af30d0f877301d5235b925ccbda0703", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
闪动光斑 = Transition_meta("闪动光斑", True, "6777178510050988551", "4202525", "06560e9ea51f532b18b7e5ae23bd2b9c", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
闪动光斑_II = Transition_meta("闪动光斑 II", True, "7148374073716773407", "4840333", "ffeb2bd8b46b0a212c1fbf004aeac626", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
闪回 = Transition_meta("闪回", True, "7250427149318885945", "16638473", "0a22de17ce5c2fd97f2bd77aa115de77", 0.200000, True)
|
||||
"""默认时长: 0.20s"""
|
||||
闪屏故障 = Transition_meta("闪屏故障", True, "7348352782744687130", "52211013", "a76337e1d1e2301f5d13fd7c90c41282", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
闪黑_II = Transition_meta("闪黑 II", True, "7264932863613604412", "20257185", "1ecd9bf4057919c5aa78002f97e715de", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
闹钟 = Transition_meta("闹钟", True, "7074854214479909390", "1621980", "eabbd46c7d68fe93406dd55d4178a574", 0.500000, False)
|
||||
"""默认时长: 0.50s"""
|
||||
雪雾 = Transition_meta("雪雾", True, "7309372378096603699", "32838061", "776c40711e9f0f6f32570bc12ea50f91", 1.700000, True)
|
||||
"""默认时长: 1.70s"""
|
||||
震动_II = Transition_meta("震动 II", True, "7195815265337086520", "9041507", "f5685f90de96d6541417f0331f84de8a", 1.000000, True)
|
||||
"""默认时长: 1.00s"""
|
||||
震动缩小 = Transition_meta("震动缩小", True, "7339865466506056207", "47887388", "3cb961ebfd78ef43742e78bca2d04d06", 1.100000, True)
|
||||
"""默认时长: 1.10s"""
|
||||
霓虹闪光 = Transition_meta("霓虹闪光", True, "7337938801882305074", "46839548", "60cee393e1ddf8c117ca6856e474d47d", 0.600000, True)
|
||||
"""默认时长: 0.60s"""
|
||||
霓虹闪光_II = Transition_meta("霓虹闪光 II", True, "7337946710041170470", "46846588", "b87a9bf7d6c8e93cc9873ccb47ffc4d0", 0.500000, True)
|
||||
"""默认时长: 0.50s"""
|
||||
飘雪 = Transition_meta("飘雪", True, "7169510140138230285", "6506905", "b373d6de281f9cc9cec4b52b0f498517", 2.000000, True)
|
||||
"""默认时长: 2.00s"""
|
||||
飘雪_II = Transition_meta("飘雪 II", True, "7170983464416580133", "6658449", "f6e6d83024f30ae2ecf739e15e98813a", 2.000000, True)
|
||||
"""默认时长: 2.00s"""
|
||||
马赛克_II = Transition_meta("马赛克 II", True, "7322278354579624486", "39369063", "c2c4fdb0da65e27a073eaba6fcf8dd2a", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
鱼眼 = Transition_meta("鱼眼", True, "7158359902950265352", "5508285", "0319d3f53fd0e79e7e7165f27d7eb9bb", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
鱼眼_II = Transition_meta("鱼眼 II", True, "7152723523721499167", "5096381", "6705e7c01ad8518db1428a34b1357d8f", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
鱼眼_III = Transition_meta("鱼眼 III", True, "7270399429297836605", "21261750", "cdaf9cd4712f5f8061110dfed13738fd", 1.333300, True)
|
||||
"""默认时长: 1.33s"""
|
||||
黑白摇镜 = Transition_meta("黑白摇镜", True, "7306819191724577331", "31620427", "cc6bea0aa49c6824aa42d0448d6d0080", 0.700000, True)
|
||||
"""默认时长: 0.70s"""
|
||||
黑色反转片 = Transition_meta("黑色反转片", True, "7202075814085530149", "9683173", "8e31bcdedda0fe123ad1a71a967ecaa1", 0.800000, True)
|
||||
"""默认时长: 0.80s"""
|
||||
9619
pyJianYingDraft/metadata/video_effect_meta.py
Normal file
9619
pyJianYingDraft/metadata/video_effect_meta.py
Normal file
File diff suppressed because it is too large
Load Diff
914
pyJianYingDraft/script_file.py
Normal file
914
pyJianYingDraft/script_file.py
Normal file
@@ -0,0 +1,914 @@
|
||||
import os
|
||||
import json
|
||||
import math
|
||||
from copy import deepcopy
|
||||
|
||||
from typing import Optional, Literal, Union, overload
|
||||
from typing import Type, Dict, List, Any
|
||||
|
||||
from . import util
|
||||
from . import exceptions
|
||||
from .template_mode import ImportedTrack, EditableTrack, ImportedMediaTrack, ImportedTextTrack, Shrink_mode, Extend_mode, import_track
|
||||
from .time_util import Timerange, tim, srt_tstamp
|
||||
from .local_materials import Video_material, Audio_material
|
||||
from .segment import Base_segment, Speed, Clip_settings
|
||||
from .audio_segment import Audio_segment, Audio_fade, Audio_effect
|
||||
from .video_segment import Video_segment, Sticker_segment, Segment_animations, Video_effect, Transition, Filter, BackgroundFilling
|
||||
from .effect_segment import Effect_segment, Filter_segment
|
||||
from .text_segment import Text_segment, Text_style, TextBubble, Text_border, Text_background, TextEffect
|
||||
from .track import Track_type, Base_track, Track
|
||||
|
||||
from settings.local import IS_CAPCUT_ENV
|
||||
from .metadata import Video_scene_effect_type, Video_character_effect_type, Filter_type
|
||||
|
||||
class Script_material:
|
||||
"""草稿文件中的素材信息部分"""
|
||||
|
||||
audios: List[Audio_material]
|
||||
"""音频素材列表"""
|
||||
videos: List[Video_material]
|
||||
"""视频素材列表"""
|
||||
stickers: List[Dict[str, Any]]
|
||||
"""贴纸素材列表"""
|
||||
texts: List[Dict[str, Any]]
|
||||
"""文本素材列表"""
|
||||
|
||||
audio_effects: List[Audio_effect]
|
||||
"""音频特效列表"""
|
||||
audio_fades: List[Audio_fade]
|
||||
"""音频淡入淡出效果列表"""
|
||||
animations: List[Segment_animations]
|
||||
"""动画素材列表"""
|
||||
video_effects: List[Video_effect]
|
||||
"""视频特效列表"""
|
||||
|
||||
speeds: List[Speed]
|
||||
"""变速列表"""
|
||||
masks: List[Dict[str, Any]]
|
||||
"""蒙版列表"""
|
||||
transitions: List[Transition]
|
||||
"""转场效果列表"""
|
||||
filters: List[Union[Filter, TextBubble]]
|
||||
"""滤镜/文本花字/文本气泡列表, 导出到`effects`中"""
|
||||
canvases: List[BackgroundFilling]
|
||||
"""背景填充列表"""
|
||||
|
||||
def __init__(self):
|
||||
self.audios = []
|
||||
self.videos = []
|
||||
self.stickers = []
|
||||
self.texts = []
|
||||
|
||||
self.audio_effects = []
|
||||
self.audio_fades = []
|
||||
self.animations = []
|
||||
self.video_effects = []
|
||||
|
||||
self.speeds = []
|
||||
self.masks = []
|
||||
self.transitions = []
|
||||
self.filters = []
|
||||
self.canvases = []
|
||||
|
||||
@overload
|
||||
def __contains__(self, item: Union[Video_material, Audio_material]) -> bool: ...
|
||||
@overload
|
||||
def __contains__(self, item: Union[Audio_fade, Audio_effect]) -> bool: ...
|
||||
@overload
|
||||
def __contains__(self, item: Union[Segment_animations, Video_effect, Transition, Filter]) -> bool: ...
|
||||
|
||||
def __contains__(self, item) -> bool:
|
||||
if isinstance(item, Video_material):
|
||||
return item.material_id in [video.material_id for video in self.videos]
|
||||
elif isinstance(item, Audio_material):
|
||||
return item.material_id in [audio.material_id for audio in self.audios]
|
||||
elif isinstance(item, Audio_fade):
|
||||
return item.fade_id in [fade.fade_id for fade in self.audio_fades]
|
||||
elif isinstance(item, Audio_effect):
|
||||
return item.effect_id in [effect.effect_id for effect in self.audio_effects]
|
||||
elif isinstance(item, Segment_animations):
|
||||
return item.animation_id in [ani.animation_id for ani in self.animations]
|
||||
elif isinstance(item, Video_effect):
|
||||
return item.global_id in [effect.global_id for effect in self.video_effects]
|
||||
elif isinstance(item, Transition):
|
||||
return item.global_id in [transition.global_id for transition in self.transitions]
|
||||
elif isinstance(item, Filter):
|
||||
return item.global_id in [filter_.global_id for filter_ in self.filters]
|
||||
else:
|
||||
raise TypeError("Invalid argument type '%s'" % type(item))
|
||||
|
||||
def export_json(self) -> Dict[str, List[Any]]:
|
||||
result = {
|
||||
"ai_translates": [],
|
||||
"audio_balances": [],
|
||||
"audio_effects": [effect.export_json() for effect in self.audio_effects],
|
||||
"audio_fades": [fade.export_json() for fade in self.audio_fades],
|
||||
"audio_track_indexes": [],
|
||||
"audios": [audio.export_json() for audio in self.audios],
|
||||
"beats": [],
|
||||
"canvases": [canvas.export_json() for canvas in self.canvases],
|
||||
"chromas": [],
|
||||
"color_curves": [],
|
||||
"digital_humans": [],
|
||||
"drafts": [],
|
||||
"effects": [_filter.export_json() for _filter in self.filters],
|
||||
"flowers": [],
|
||||
"green_screens": [],
|
||||
"handwrites": [],
|
||||
"hsl": [],
|
||||
"images": [],
|
||||
"log_color_wheels": [],
|
||||
"loudnesses": [],
|
||||
"manual_deformations": [],
|
||||
"material_animations": [ani.export_json() for ani in self.animations],
|
||||
"material_colors": [],
|
||||
"multi_language_refs": [],
|
||||
"placeholders": [],
|
||||
"plugin_effects": [],
|
||||
"primary_color_wheels": [],
|
||||
"realtime_denoises": [],
|
||||
"shapes": [],
|
||||
"smart_crops": [],
|
||||
"smart_relights": [],
|
||||
"sound_channel_mappings": [],
|
||||
"speeds": [spd.export_json() for spd in self.speeds],
|
||||
"stickers": self.stickers,
|
||||
"tail_leaders": [],
|
||||
"text_templates": [],
|
||||
"texts": self.texts,
|
||||
"time_marks": [],
|
||||
"transitions": [transition.export_json() for transition in self.transitions],
|
||||
"video_effects": [effect.export_json() for effect in self.video_effects],
|
||||
"video_trackings": [],
|
||||
"videos": [video.export_json() for video in self.videos],
|
||||
"vocal_beautifys": [],
|
||||
"vocal_separations": []
|
||||
}
|
||||
|
||||
# 根据IS_CAPCUT_ENV决定使用common_mask还是masks
|
||||
if IS_CAPCUT_ENV:
|
||||
result["common_mask"] = self.masks
|
||||
else:
|
||||
result["masks"] = self.masks
|
||||
|
||||
return result
|
||||
|
||||
class Script_file:
|
||||
"""剪映草稿文件, 大部分接口定义在此"""
|
||||
|
||||
save_path: Optional[str]
|
||||
"""草稿文件保存路径, 仅在模板模式下有效"""
|
||||
content: Dict[str, Any]
|
||||
"""草稿文件内容"""
|
||||
|
||||
width: int
|
||||
"""视频的宽度, 单位为像素"""
|
||||
height: int
|
||||
"""视频的高度, 单位为像素"""
|
||||
fps: int
|
||||
"""视频的帧率"""
|
||||
duration: int
|
||||
"""视频的总时长, 单位为微秒"""
|
||||
|
||||
materials: Script_material
|
||||
"""草稿文件中的素材信息部分"""
|
||||
tracks: Dict[str, Track]
|
||||
"""轨道信息"""
|
||||
|
||||
imported_materials: Dict[str, List[Dict[str, Any]]]
|
||||
"""导入的素材信息"""
|
||||
imported_tracks: List[Track]
|
||||
"""导入的轨道信息"""
|
||||
|
||||
TEMPLATE_FILE = "draft_content_template.json"
|
||||
|
||||
def __init__(self, width: int, height: int, fps: int = 30):
|
||||
"""创建一个剪映草稿
|
||||
|
||||
Args:
|
||||
width (int): 视频宽度, 单位为像素
|
||||
height (int): 视频高度, 单位为像素
|
||||
fps (int, optional): 视频帧率. 默认为30.
|
||||
"""
|
||||
self.save_path = None
|
||||
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.fps = fps
|
||||
self.duration = 0
|
||||
|
||||
self.materials = Script_material()
|
||||
self.tracks = {}
|
||||
|
||||
self.imported_materials = {}
|
||||
self.imported_tracks = []
|
||||
|
||||
with open(os.path.join(os.path.dirname(__file__), self.TEMPLATE_FILE), "r", encoding="utf-8") as f:
|
||||
self.content = json.load(f)
|
||||
|
||||
@staticmethod
|
||||
def load_template(json_path: str) -> "Script_file":
|
||||
"""从JSON文件加载草稿模板
|
||||
|
||||
Args:
|
||||
json_path (str): JSON文件路径
|
||||
|
||||
Raises:
|
||||
`FileNotFoundError`: JSON文件不存在
|
||||
"""
|
||||
obj = Script_file(**util.provide_ctor_defaults(Script_file))
|
||||
obj.save_path = json_path
|
||||
if not os.path.exists(json_path):
|
||||
raise FileNotFoundError("JSON文件 '%s' 不存在" % json_path)
|
||||
with open(json_path, "r", encoding="utf-8") as f:
|
||||
obj.content = json.load(f)
|
||||
|
||||
util.assign_attr_with_json(obj, ["fps", "duration"], obj.content)
|
||||
util.assign_attr_with_json(obj, ["width", "height"], obj.content["canvas_config"])
|
||||
|
||||
obj.imported_materials = deepcopy(obj.content["materials"])
|
||||
obj.imported_tracks = [import_track(track_data, obj.imported_materials) for track_data in obj.content["tracks"]]
|
||||
|
||||
return obj
|
||||
|
||||
def add_material(self, material: Union[Video_material, Audio_material]) -> "Script_file":
|
||||
"""向草稿文件中添加一个素材"""
|
||||
if material in self.materials: # 素材已存在
|
||||
return self
|
||||
if isinstance(material, Video_material):
|
||||
self.materials.videos.append(material)
|
||||
elif isinstance(material, Audio_material):
|
||||
self.materials.audios.append(material)
|
||||
else:
|
||||
raise TypeError("错误的素材类型: '%s'" % type(material))
|
||||
return self
|
||||
|
||||
def add_track(self, track_type: Track_type, track_name: Optional[str] = None, *,
|
||||
mute: bool = False,
|
||||
relative_index: int = 0, absolute_index: Optional[int] = None) -> "Script_file":
|
||||
"""向草稿文件中添加一个指定类型、指定名称的轨道, 可以自定义轨道层级
|
||||
|
||||
注意: 主视频轨道(最底层的视频轨道)上的视频片段必须从0s开始, 否则会被剪映强制对齐至0s.
|
||||
|
||||
为避免混淆, 仅在创建第一个同类型轨道时允许不指定名称
|
||||
|
||||
Args:
|
||||
track_type (Track_type): 轨道类型
|
||||
track_name (str, optional): 轨道名称. 仅在创建第一个同类型轨道时允许不指定.
|
||||
mute (bool, optional): 轨道是否静音. 默认不静音.
|
||||
relative_index (int, optional): 相对(同类型轨道的)图层位置, 越高越接近前景. 默认为0.
|
||||
absolute_index (int, optional): 绝对图层位置, 越高越接近前景. 此参数将直接覆盖相应片段的`render_index`属性, 供有经验的用户使用.
|
||||
此参数不能与`relative_index`同时使用.
|
||||
|
||||
Raises:
|
||||
`NameError`: 已存在同类型轨道且未指定名称, 或已存在同名轨道
|
||||
"""
|
||||
|
||||
if track_name is None:
|
||||
if track_type in [track.track_type for track in self.tracks.values()]:
|
||||
raise NameError("'%s' 类型的轨道已存在, 请为新轨道指定名称以避免混淆" % track_type)
|
||||
track_name = track_type.name
|
||||
if track_name in [track.name for track in self.tracks.values()]:
|
||||
print("名为 '%s' 的轨道已存在" % track_name)
|
||||
return self
|
||||
|
||||
render_index = track_type.value.render_index + relative_index
|
||||
if absolute_index is not None:
|
||||
render_index = absolute_index
|
||||
|
||||
self.tracks[track_name] = Track(track_type, track_name, render_index, mute)
|
||||
return self
|
||||
|
||||
def get_track(self, segment_type: Type[Base_segment], track_name: Optional[str]) -> Track:
|
||||
# 指定轨道名称
|
||||
if track_name is not None:
|
||||
if track_name not in self.tracks:
|
||||
raise NameError("不存在名为 '%s' 的轨道" % track_name)
|
||||
return self.tracks[track_name]
|
||||
# 寻找唯一的同类型的轨道
|
||||
count = sum([1 for track in self.tracks.values() if track.track_type == segment_type])
|
||||
if count == 0: raise exceptions.TrackNotFound(f"不存在接受 '{segment_type}' 的轨道")
|
||||
if count > 1: raise NameError(f"存在多个接受 '{segment_type}' 的轨道, 请指定轨道名称")
|
||||
|
||||
return next(track for track in self.tracks.values() if track.accept_segment_type == segment_type)
|
||||
|
||||
def _get_track_and_imported_track(self, segment_type: Type[Base_segment], track_name: Optional[str]) -> List[Track]:
|
||||
"""获取指定类型的所有轨道(包括普通轨道和导入的轨道)
|
||||
|
||||
Args:
|
||||
segment_type (Type[Base_segment]): 片段类型
|
||||
track_name (Optional[str]): 轨道名称,如果指定则只返回该名称的轨道
|
||||
|
||||
Returns:
|
||||
List[Track]: 符合条件的轨道列表
|
||||
|
||||
Raises:
|
||||
NameError: 指定了轨道名称但未找到对应轨道
|
||||
"""
|
||||
result_tracks = []
|
||||
|
||||
# 如果指定了轨道名称
|
||||
if track_name is not None:
|
||||
# 在普通轨道中查找
|
||||
if track_name in self.tracks:
|
||||
result_tracks.append(self.tracks[track_name])
|
||||
# 在导入的轨道中查找
|
||||
for track in self.imported_tracks:
|
||||
if track.name == track_name:
|
||||
result_tracks.append(track)
|
||||
if not result_tracks:
|
||||
raise NameError("不存在名为 '%s' 的轨道" % track_name)
|
||||
else:
|
||||
# 在普通轨道中查找接受该类型片段的轨道
|
||||
for track in self.tracks.values():
|
||||
if track.accept_segment_type == segment_type:
|
||||
result_tracks.append(track)
|
||||
# 在导入的轨道中查找接受该类型片段的轨道
|
||||
for track in self.imported_tracks:
|
||||
if track.accept_segment_type == segment_type:
|
||||
result_tracks.append(track)
|
||||
if not result_tracks:
|
||||
raise NameError("不存在接受 '%s' 的轨道" % segment_type)
|
||||
if len(result_tracks) > 1:
|
||||
raise NameError("存在多个接受 '%s' 的轨道, 请指定轨道名称" % segment_type)
|
||||
|
||||
return result_tracks
|
||||
|
||||
def add_segment(self, segment: Union[Video_segment, Sticker_segment, Audio_segment, Text_segment],
|
||||
track_name: Optional[str] = None) -> "Script_file":
|
||||
"""向指定轨道中添加一个片段
|
||||
|
||||
Args:
|
||||
segment (`Video_segment`, `Sticker_segment`, `Audio_segment`, or `Text_segment`): 要添加的片段
|
||||
track_name (`str`, optional): 添加到的轨道名称. 当此类型的轨道仅有一条时可省略.
|
||||
|
||||
Raises:
|
||||
`NameError`: 未找到指定名称的轨道, 或必须提供`track_name`参数时未提供
|
||||
`TypeError`: 片段类型不匹配轨道类型
|
||||
`SegmentOverlap`: 新片段与已有片段重叠
|
||||
"""
|
||||
tracks = self._get_track_and_imported_track(type(segment), track_name)
|
||||
target = tracks[0]
|
||||
|
||||
# 加入轨道并更新时长
|
||||
target.add_segment(segment)
|
||||
self.duration = max(self.duration, segment.end)
|
||||
|
||||
# 自动添加相关素材
|
||||
if isinstance(segment, Video_segment):
|
||||
# 出入场等动画
|
||||
if (segment.animations_instance is not None) and (segment.animations_instance not in self.materials):
|
||||
self.materials.animations.append(segment.animations_instance)
|
||||
# 特效
|
||||
for effect in segment.effects:
|
||||
if effect not in self.materials:
|
||||
self.materials.video_effects.append(effect)
|
||||
# 滤镜
|
||||
for filter_ in segment.filters:
|
||||
if filter_ not in self.materials:
|
||||
self.materials.filters.append(filter_)
|
||||
# 蒙版
|
||||
if segment.mask is not None:
|
||||
self.materials.masks.append(segment.mask.export_json())
|
||||
# 转场
|
||||
if (segment.transition is not None) and (segment.transition not in self.materials):
|
||||
self.materials.transitions.append(segment.transition)
|
||||
# 背景填充
|
||||
if segment.background_filling is not None:
|
||||
self.materials.canvases.append(segment.background_filling)
|
||||
|
||||
self.materials.speeds.append(segment.speed)
|
||||
elif isinstance(segment, Sticker_segment):
|
||||
self.materials.stickers.append(segment.export_material())
|
||||
elif isinstance(segment, Audio_segment):
|
||||
# 淡入淡出
|
||||
if (segment.fade is not None) and (segment.fade not in self.materials):
|
||||
self.materials.audio_fades.append(segment.fade)
|
||||
# 特效
|
||||
for effect in segment.effects:
|
||||
if effect not in self.materials:
|
||||
self.materials.audio_effects.append(effect)
|
||||
self.materials.speeds.append(segment.speed)
|
||||
elif isinstance(segment, Text_segment):
|
||||
# 出入场等动画
|
||||
if (segment.animations_instance is not None) and (segment.animations_instance not in self.materials):
|
||||
self.materials.animations.append(segment.animations_instance)
|
||||
# 气泡效果
|
||||
if segment.bubble is not None:
|
||||
self.materials.filters.append(segment.bubble)
|
||||
# 花字效果
|
||||
if segment.effect is not None:
|
||||
self.materials.filters.append(segment.effect)
|
||||
# 字体样式
|
||||
self.materials.texts.append(segment.export_material())
|
||||
|
||||
# 添加片段素材
|
||||
if isinstance(segment, (Video_segment, Audio_segment)):
|
||||
self.add_material(segment.material_instance)
|
||||
|
||||
return self
|
||||
|
||||
def add_effect(self, effect: Union[Video_scene_effect_type, Video_character_effect_type],
|
||||
t_range: Timerange, track_name: Optional[str] = None, *,
|
||||
params: Optional[List[Optional[float]]] = None) -> "Script_file":
|
||||
"""向指定的特效轨道中添加一个特效片段
|
||||
|
||||
Args:
|
||||
effect (`Video_scene_effect_type` or `Video_character_effect_type`): 特效类型
|
||||
t_range (`Timerange`): 特效片段的时间范围
|
||||
track_name (`str`, optional): 添加到的轨道名称. 当特效轨道仅有一条时可省略.
|
||||
params (`List[Optional[float]]`, optional): 特效参数列表, 参数列表中未提供或为None的项使用默认值.
|
||||
参数取值范围(0~100)与剪映中一致. 某个特效类型有何参数以及具体参数顺序以枚举类成员的annotation为准.
|
||||
|
||||
Raises:
|
||||
`NameError`: 未找到指定名称的轨道, 或必须提供`track_name`参数时未提供
|
||||
`TypeError`: 指定的轨道不是特效轨道
|
||||
`ValueError`: 新片段与已有片段重叠、提供的参数数量超过了该特效类型的参数数量, 或参数值超出范围.
|
||||
"""
|
||||
target = self.get_track(Effect_segment, track_name)
|
||||
|
||||
# 加入轨道并更新时长
|
||||
segment = Effect_segment(effect, t_range, params)
|
||||
target.add_segment(segment)
|
||||
self.duration = max(self.duration, t_range.start + t_range.duration)
|
||||
|
||||
# 自动添加相关素材
|
||||
if segment.effect_inst not in self.materials:
|
||||
self.materials.video_effects.append(segment.effect_inst)
|
||||
return self
|
||||
|
||||
def add_filter(self, filter_meta: Filter_type, t_range: Timerange,
|
||||
track_name: Optional[str] = None, intensity: float = 100.0) -> "Script_file":
|
||||
"""向指定的滤镜轨道中添加一个滤镜片段
|
||||
|
||||
Args:
|
||||
filter_meta (`Filter_type`): 滤镜类型
|
||||
t_range (`Timerange`): 滤镜片段的时间范围
|
||||
track_name (`str`, optional): 添加到的轨道名称. 当滤镜轨道仅有一条时可省略.
|
||||
intensity (`float`, optional): 滤镜强度(0-100). 仅当所选滤镜能够调节强度时有效. 默认为100.
|
||||
|
||||
Raises:
|
||||
`NameError`: 未找到指定名称的轨道, 或必须提供`track_name`参数时未提供
|
||||
`TypeError`: 指定的轨道不是滤镜轨道
|
||||
`ValueError`: 新片段与已有片段重叠
|
||||
"""
|
||||
target = self.get_track(Filter_segment, track_name)
|
||||
|
||||
# 加入轨道并更新时长
|
||||
segment = Filter_segment(filter_meta, t_range, intensity / 100.0) # 转换为0-1范围
|
||||
target.add_segment(segment)
|
||||
self.duration = max(self.duration, t_range.end)
|
||||
|
||||
# 自动添加相关素材
|
||||
self.materials.filters.append(segment.material)
|
||||
return self
|
||||
|
||||
def import_srt(self, srt_content: str, track_name: str, *,
|
||||
time_offset: Union[str, float] = 0.0,
|
||||
style_reference: Optional[Text_segment] = None,
|
||||
text_style: Text_style = Text_style(size=5, align=1),
|
||||
clip_settings: Optional[Clip_settings] = Clip_settings(transform_y=-0.8),
|
||||
border: Optional[Text_border] = None,
|
||||
background: Optional[Text_background] = None,
|
||||
bubble: Optional[TextBubble] = None,
|
||||
effect: Optional[TextEffect] = None) -> "Script_file":
|
||||
"""从SRT文件中导入字幕, 支持传入一个`Text_segment`作为样式参考
|
||||
|
||||
注意: 默认不会使用参考片段的`clip_settings`属性, 若需要请显式为此函数传入`clip_settings=None`
|
||||
|
||||
Args:
|
||||
srt_content (`str`): SRT字幕内容或本地文件路径
|
||||
track_name (`str`): 导入到的文本轨道名称, 若不存在则自动创建
|
||||
style_reference (`Text_segment`, optional): 作为样式参考的文本片段, 若提供则使用其样式.
|
||||
time_offset (`Union[str, float]`, optional): 字幕整体时间偏移, 单位为微秒, 默认为0.
|
||||
text_style (`Text_style`, optional): 字幕样式, 默认模仿剪映导入字幕时的样式, 会被`style_reference`覆盖.
|
||||
clip_settings (`Clip_settings`, optional): 图像调节设置, 默认模仿剪映导入字幕时的设置, 会覆盖`style_reference`的设置除非指定为`None`.
|
||||
border (`Text_border`, optional): 描边设置, 默认不修改样式参考中的描边设置
|
||||
background (`Text_background`, optional): 背景设置, 默认不修改样式参考中的背景设置
|
||||
bubble (`TextBubble`, optional): 气泡效果, 默认不添加气泡效果
|
||||
effect (`TextEffect`, optional): 花字效果, 默认不添加花字效果
|
||||
|
||||
Raises:
|
||||
`NameError`: 已存在同名轨道
|
||||
`TypeError`: 轨道类型不匹配
|
||||
"""
|
||||
if style_reference is None and clip_settings is None:
|
||||
raise ValueError("未提供样式参考时请提供`clip_settings`参数")
|
||||
|
||||
time_offset = tim(time_offset)
|
||||
# 检查 track_name 是否存在于 self.tracks 或 self.imported_tracks
|
||||
track_exists = (track_name in self.tracks) or any(track.name == track_name for track in self.imported_tracks)
|
||||
if not track_exists:
|
||||
self.add_track(Track_type.text, track_name, relative_index=999) # 在所有文本轨道的最上层
|
||||
|
||||
# 检查是否为本地文件路径
|
||||
if os.path.exists(srt_content):
|
||||
with open(srt_content, "r", encoding="utf-8-sig") as srt_file:
|
||||
lines = srt_file.readlines()
|
||||
else:
|
||||
# 直接将内容按行分割
|
||||
lines = srt_content.splitlines()
|
||||
|
||||
def __add_text_segment(text: str, t_range: Timerange) -> None:
|
||||
if style_reference:
|
||||
seg = Text_segment.create_from_template(text, t_range, style_reference)
|
||||
if clip_settings is not None:
|
||||
seg.clip_settings = deepcopy(clip_settings)
|
||||
# 复制其他可选属性
|
||||
if border:
|
||||
seg.border = deepcopy(border)
|
||||
if background:
|
||||
seg.background = deepcopy(background)
|
||||
if bubble:
|
||||
seg.bubble = deepcopy(bubble)
|
||||
if effect:
|
||||
seg.effect = deepcopy(effect)
|
||||
else:
|
||||
seg = Text_segment(text, t_range, style=text_style, clip_settings=clip_settings,
|
||||
border=border, background=background)
|
||||
# 添加气泡和花字效果
|
||||
if bubble:
|
||||
seg.bubble = deepcopy(bubble)
|
||||
if effect:
|
||||
seg.effect = deepcopy(effect)
|
||||
# 如果有气泡或花字效果,需要将它们添加到素材列表中
|
||||
if bubble:
|
||||
self.materials.filters.append(bubble)
|
||||
if effect:
|
||||
self.materials.filters.append(effect)
|
||||
self.add_segment(seg, track_name)
|
||||
|
||||
index = 0
|
||||
text: str = ""
|
||||
text_trange: Timerange
|
||||
read_state: Literal["index", "timestamp", "content"] = "index"
|
||||
while index < len(lines):
|
||||
line = lines[index].strip()
|
||||
if read_state == "index":
|
||||
if len(line) == 0:
|
||||
index += 1
|
||||
continue
|
||||
if not line.isdigit():
|
||||
raise ValueError("Expected a number at line %d, got '%s'" % (index+1, line))
|
||||
index += 1
|
||||
read_state = "timestamp"
|
||||
elif read_state == "timestamp":
|
||||
# 读取时间戳
|
||||
start_str, end_str = line.split(" --> ")
|
||||
start, end = srt_tstamp(start_str), srt_tstamp(end_str)
|
||||
text_trange = Timerange(start + time_offset, end - start)
|
||||
|
||||
index += 1
|
||||
read_state = "content"
|
||||
elif read_state == "content":
|
||||
# 内容结束, 生成片段
|
||||
if len(line) == 0:
|
||||
__add_text_segment(text.strip(), text_trange)
|
||||
|
||||
text = ""
|
||||
read_state = "index"
|
||||
else:
|
||||
text += line + "\n"
|
||||
index += 1
|
||||
|
||||
# 添加最后一个片段
|
||||
if len(text) > 0:
|
||||
__add_text_segment(text.strip(), text_trange)
|
||||
|
||||
return self
|
||||
|
||||
def get_imported_track(self, track_type: Literal[Track_type.video, Track_type.audio, Track_type.text],
|
||||
name: Optional[str] = None, index: Optional[int] = None) -> Track:
|
||||
"""获取指定类型的导入轨道, 以便在其上进行替换
|
||||
|
||||
推荐使用轨道名称进行筛选(若已知轨道名称)
|
||||
|
||||
Args:
|
||||
track_type (`Track_type.video`, `Track_type.audio` or `Track_type.text`): 轨道类型, 目前只支持音视频和文本轨道
|
||||
name (`str`, optional): 轨道名称, 不指定则不根据名称筛选.
|
||||
index (`int`, optional): 轨道在**同类型的导入轨道**中的下标, 以0为最下层轨道. 不指定则不根据下标筛选.
|
||||
|
||||
Raises:
|
||||
`TrackNotFound`: 未找到满足条件的轨道
|
||||
`AmbiguousTrack`: 找到多个满足条件的轨道
|
||||
"""
|
||||
tracks_of_same_type: List[Track] = []
|
||||
for track in self.imported_tracks:
|
||||
if track.track_type == track_type:
|
||||
assert isinstance(track, Track)
|
||||
tracks_of_same_type.append(track)
|
||||
|
||||
ret: List[Track] = []
|
||||
for ind, track in enumerate(tracks_of_same_type):
|
||||
if (name is not None) and (track.name != name): continue
|
||||
if (index is not None) and (ind != index): continue
|
||||
ret.append(track)
|
||||
|
||||
if len(ret) == 0:
|
||||
raise exceptions.TrackNotFound(
|
||||
"没有找到满足条件的轨道: track_type=%s, name=%s, index=%s" % (track_type, name, index))
|
||||
if len(ret) > 1:
|
||||
raise exceptions.AmbiguousTrack(
|
||||
"找到多个满足条件的轨道: track_type=%s, name=%s, index=%s" % (track_type, name, index))
|
||||
|
||||
return ret[0]
|
||||
|
||||
def import_track(self, source_file: "Script_file", track: EditableTrack, *,
|
||||
offset: Union[str, int] = 0,
|
||||
new_name: Optional[str] = None, relative_index: Optional[int] = None) -> "Script_file":
|
||||
"""将一个`Editable_track`导入到当前`Script_file`中, 如从模板草稿中导入特定的文本或视频轨道到当前正在编辑的草稿文件中
|
||||
|
||||
注意: 本方法会保留各片段及其素材的id, 因而不支持向同一草稿多次导入同一轨道
|
||||
|
||||
Args:
|
||||
source_file (`Script_file`): 源文件,包含要导入的轨道
|
||||
track (`EditableTrack`): 要导入的轨道, 可通过`get_imported_track`方法获取.
|
||||
offset (`str | int`, optional): 轨道的时间偏移量(微秒), 可以是整数微秒值或时间字符串(如"1s"). 默认不添加偏移.
|
||||
new_name (`str`, optional): 新轨道名称, 默认使用源轨道名称.
|
||||
relative_index (`int`, optional): 相对索引,用于调整导入轨道的渲染层级. 默认保持原有层级.
|
||||
"""
|
||||
# 直接拷贝原始轨道结构, 按需修改渲染层级
|
||||
imported_track = deepcopy(track)
|
||||
if relative_index is not None:
|
||||
imported_track.render_index = track.track_type.value.render_index + relative_index
|
||||
if new_name is not None:
|
||||
imported_track.name = new_name
|
||||
|
||||
# 应用偏移量
|
||||
offset_us = tim(offset)
|
||||
if offset_us != 0:
|
||||
for seg in imported_track.segments:
|
||||
seg.target_timerange.start = max(0, seg.target_timerange.start + offset_us)
|
||||
self.imported_tracks.append(imported_track)
|
||||
|
||||
# 收集所有需要复制的素材ID
|
||||
material_ids = set()
|
||||
segments: List[Dict[str, Any]] = track.raw_data.get("segments", [])
|
||||
for segment in segments:
|
||||
# 主素材ID
|
||||
material_id = segment.get("material_id")
|
||||
if material_id:
|
||||
material_ids.add(material_id)
|
||||
|
||||
# extra_material_refs中的素材ID
|
||||
extra_refs: List[str] = segment.get("extra_material_refs", [])
|
||||
material_ids.update(extra_refs)
|
||||
|
||||
# 复制素材
|
||||
for material_type, material_list in source_file.imported_materials.items():
|
||||
for material in material_list:
|
||||
if material.get("id") in material_ids:
|
||||
self.imported_materials[material_type].append(deepcopy(material))
|
||||
material_ids.remove(material.get("id"))
|
||||
|
||||
assert len(material_ids) == 0, "未找到以下素材: %s" % material_ids
|
||||
|
||||
# 更新总时长
|
||||
self.duration = max(self.duration, track.end_time)
|
||||
|
||||
return self
|
||||
|
||||
def replace_material_by_name(self, material_name: str, material: Union[Video_material, Audio_material],
|
||||
replace_crop: bool = False) -> "Script_file":
|
||||
"""替换指定名称的素材, 并影响所有引用它的片段
|
||||
|
||||
这种方法不会改变相应片段的时长和引用范围(`source_timerange`), 尤其适合于图片素材
|
||||
|
||||
Args:
|
||||
material_name (`str`): 要替换的素材名称
|
||||
material (`Video_material` or `Audio_material`): 新素材, 目前只支持视频和音频
|
||||
replace_crop (`bool`, optional): 是否替换原素材的裁剪设置, 默认为否. 仅对视频素材有效.
|
||||
|
||||
Raises:
|
||||
`MaterialNotFound`: 根据指定名称未找到与新素材同类的素材
|
||||
`AmbiguousMaterial`: 根据指定名称找到多个与新素材同类的素材
|
||||
"""
|
||||
video_mode = isinstance(material, Video_material)
|
||||
# 查找素材
|
||||
target_json_obj: Optional[Dict[str, Any]] = None
|
||||
target_material_list = self.imported_materials["videos" if video_mode else "audios"]
|
||||
name_key = "material_name" if video_mode else "name"
|
||||
for mat in target_material_list:
|
||||
if mat[name_key] == material_name:
|
||||
if target_json_obj is not None:
|
||||
raise exceptions.AmbiguousMaterial(
|
||||
"找到多个名为 '%s', 类型为 '%s' 的素材" % (material_name, type(material)))
|
||||
target_json_obj = mat
|
||||
if target_json_obj is None:
|
||||
raise exceptions.MaterialNotFound("没有找到名为 '%s', 类型为 '%s' 的素材" % (material_name, type(material)))
|
||||
|
||||
# 更新素材信息
|
||||
target_json_obj.update({name_key: material.material_name, "path": material.path, "duration": material.duration})
|
||||
if video_mode:
|
||||
target_json_obj.update({"width": material.width, "height": material.height, "material_type": material.material_type})
|
||||
if replace_crop:
|
||||
target_json_obj.update({"crop": material.crop_settings.export_json()})
|
||||
|
||||
return self
|
||||
|
||||
def replace_material_by_seg(self, track: EditableTrack, segment_index: int, material: Union[Video_material, Audio_material],
|
||||
source_timerange: Optional[Timerange] = None, *,
|
||||
handle_shrink: Shrink_mode = Shrink_mode.cut_tail,
|
||||
handle_extend: Union[Extend_mode, List[Extend_mode]] = Extend_mode.cut_material_tail) -> "Script_file":
|
||||
"""替换指定音视频轨道上指定片段的素材, 暂不支持变速片段的素材替换
|
||||
|
||||
Args:
|
||||
track (`Editable_track`): 要替换素材的轨道, 由`get_imported_track`获取
|
||||
segment_index (`int`): 要替换素材的片段下标, 从0开始
|
||||
material (`Video_material` or `Audio_material`): 新素材, 必须与原素材类型一致
|
||||
source_timerange (`Timerange`, optional): 从原素材中截取的时间范围, 默认为全时段, 若是图片素材则默认与原片段等长.
|
||||
handle_shrink (`Shrink_mode`, optional): 新素材比原素材短时的处理方式, 默认为裁剪尾部, 使片段长度与素材一致.
|
||||
handle_extend (`Extend_mode` or `List[Extend_mode]`, optional): 新素材比原素材长时的处理方式, 将按顺序逐个尝试直至成功或抛出异常.
|
||||
默认为截断素材尾部, 使片段维持原长不变
|
||||
|
||||
Raises:
|
||||
`IndexError`: `segment_index`越界
|
||||
`TypeError`: 轨道或素材类型不正确
|
||||
`ExtensionFailed`: 新素材比原素材长时处理失败
|
||||
"""
|
||||
if not isinstance(track, ImportedMediaTrack):
|
||||
raise TypeError("指定的轨道(类型为 %s)不支持素材替换" % track.track_type)
|
||||
if not 0 <= segment_index < len(track):
|
||||
raise IndexError("片段下标 %d 超出 [0, %d) 的范围" % (segment_index, len(track)))
|
||||
if not track.check_material_type(material):
|
||||
raise TypeError("指定的素材类型 %s 不匹配轨道类型 %s", (type(material), track.track_type))
|
||||
seg = track.segments[segment_index]
|
||||
|
||||
if isinstance(handle_extend, Extend_mode):
|
||||
handle_extend = [handle_extend]
|
||||
if source_timerange is None:
|
||||
if isinstance(material, Video_material) and (material.material_type == "photo"):
|
||||
source_timerange = Timerange(0, seg.duration)
|
||||
else:
|
||||
source_timerange = Timerange(0, material.duration)
|
||||
|
||||
# 处理时间变化
|
||||
track.process_timerange(segment_index, source_timerange, handle_shrink, handle_extend)
|
||||
|
||||
# 最后替换素材链接
|
||||
track.segments[segment_index].material_id = material.material_id
|
||||
self.add_material(material)
|
||||
|
||||
# TODO: 更新总长
|
||||
return self
|
||||
|
||||
def replace_text(self, track: EditableTrack, segment_index: int, text: Union[str, List[str]],
|
||||
recalc_style: bool = True) -> "Script_file":
|
||||
"""替换指定文本轨道上指定片段的文字内容, 支持普通文本片段或文本模板片段
|
||||
|
||||
Args:
|
||||
track (`Editable_track`): 要替换文字的文本轨道, 由`get_imported_track`获取
|
||||
segment_index (`int`): 要替换文字的片段下标, 从0开始
|
||||
text (`str` or `List[str]`): 新的文字内容, 对于文本模板而言应传入一个字符串列表.
|
||||
recalc_style (`bool`): 是否重新计算字体样式分布, 即调整各字体样式应用范围以尽量维持原有占比不变, 默认开启.
|
||||
|
||||
Raises:
|
||||
`IndexError`: `segment_index`越界
|
||||
`TypeError`: 轨道类型不正确
|
||||
`ValueError`: 文本模板片段的文本数量不匹配
|
||||
"""
|
||||
if not isinstance(track, ImportedTextTrack):
|
||||
raise TypeError("指定的轨道(类型为 %s)不支持文本内容替换" % track.track_type)
|
||||
if not 0 <= segment_index < len(track):
|
||||
raise IndexError("片段下标 %d 超出 [0, %d) 的范围" % (segment_index, len(track)))
|
||||
|
||||
def __recalc_style_range(old_len: int, new_len: int, styles: List[Dict[str, Any]]) -> List[Dict[str, Any]]:
|
||||
"""调整字体样式分布"""
|
||||
new_styles: List[Dict[str, Any]] = []
|
||||
for style in styles:
|
||||
start = math.ceil(style["range"][0] / old_len * new_len)
|
||||
end = math.ceil(style["range"][1] / old_len * new_len)
|
||||
style["range"] = [start, end]
|
||||
if start != end:
|
||||
new_styles.append(style)
|
||||
return new_styles
|
||||
|
||||
replaced: bool = False
|
||||
material_id: str = track.segments[segment_index].material_id
|
||||
# 尝试在文本素材中替换
|
||||
for mat in self.imported_materials["texts"]:
|
||||
if mat["id"] != material_id:
|
||||
continue
|
||||
|
||||
if isinstance(text, list):
|
||||
if len(text) != 1:
|
||||
raise ValueError(f"正常文本片段只能有一个文字内容, 但替换内容是 {text}")
|
||||
text = text[0]
|
||||
|
||||
content = json.loads(mat["content"])
|
||||
if recalc_style:
|
||||
content["styles"] = __recalc_style_range(len(content["text"]), len(text), content["styles"])
|
||||
content["text"] = text
|
||||
mat["content"] = json.dumps(content, ensure_ascii=False)
|
||||
replaced = True
|
||||
break
|
||||
if replaced:
|
||||
return self
|
||||
|
||||
# 尝试在文本模板中替换
|
||||
for template in self.imported_materials["text_templates"]:
|
||||
if template["id"] != material_id:
|
||||
continue
|
||||
|
||||
resources = template["text_info_resources"]
|
||||
if isinstance(text, str):
|
||||
text = [text]
|
||||
if len(text) > len(resources):
|
||||
raise ValueError(f"文字模板'{template['name']}'只有{len(resources)}段文本, 但提供了{len(text)}段替换内容")
|
||||
|
||||
for sub_material_id, new_text in zip(map(lambda x: x["text_material_id"], resources), text):
|
||||
for mat in self.imported_materials["texts"]:
|
||||
if mat["id"] != sub_material_id:
|
||||
continue
|
||||
|
||||
if isinstance(mat["content"], str):
|
||||
mat["content"] = new_text
|
||||
else:
|
||||
content = json.loads(mat["content"])
|
||||
if recalc_style:
|
||||
content["styles"] = __recalc_style_range(len(content["text"]), len(new_text), content["styles"])
|
||||
content["text"] = new_text
|
||||
mat["content"] = json.dumps(content, ensure_ascii=False)
|
||||
break
|
||||
replaced = True
|
||||
break
|
||||
|
||||
assert replaced, f"未找到指定片段的素材 {material_id}"
|
||||
|
||||
return self
|
||||
|
||||
def inspect_material(self) -> None:
|
||||
"""输出草稿中导入的贴纸、文本气泡以及花字素材的元数据"""
|
||||
print("贴纸素材:")
|
||||
for sticker in self.imported_materials["stickers"]:
|
||||
print("\tResource id: %s '%s'" % (sticker["resource_id"], sticker.get("name", "")))
|
||||
|
||||
print("文字气泡效果:")
|
||||
for effect in self.imported_materials["effects"]:
|
||||
if effect["type"] == "text_shape":
|
||||
print("\tEffect id: %s ,Resource id: %s '%s'" %
|
||||
(effect["effect_id"], effect["resource_id"], effect.get("name", "")))
|
||||
|
||||
print("花字效果:")
|
||||
for effect in self.imported_materials["effects"]:
|
||||
if effect["type"] == "text_effect":
|
||||
print("\tResource id: %s '%s'" % (effect["resource_id"], effect.get("name", "")))
|
||||
|
||||
def dumps(self) -> str:
|
||||
"""将草稿文件内容导出为JSON字符串"""
|
||||
self.content["fps"] = self.fps
|
||||
self.content["duration"] = self.duration
|
||||
self.content["canvas_config"] = {"width": self.width, "height": self.height, "ratio": "original"}
|
||||
self.content["materials"] = self.materials.export_json()
|
||||
|
||||
self.content["last_modified_platform"] = {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
}
|
||||
|
||||
self.content["platform"] = {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
}
|
||||
|
||||
# 合并导入的素材
|
||||
for material_type, material_list in self.imported_materials.items():
|
||||
if material_type not in self.content["materials"]:
|
||||
self.content["materials"][material_type] = material_list
|
||||
else:
|
||||
self.content["materials"][material_type].extend(material_list)
|
||||
|
||||
# 对轨道排序并导出
|
||||
track_list: List[Base_track] = list(self.tracks.values())
|
||||
track_list.extend(self.imported_tracks)
|
||||
track_list.sort(key=lambda track: track.render_index)
|
||||
self.content["tracks"] = [track.export_json() for track in track_list]
|
||||
|
||||
return json.dumps(self.content, ensure_ascii=False, indent=4)
|
||||
|
||||
def dump(self, file_path: str) -> None:
|
||||
"""将草稿文件内容写入文件"""
|
||||
with open(file_path, "w", encoding="utf-8") as f:
|
||||
f.write(self.dumps())
|
||||
|
||||
def save(self) -> None:
|
||||
"""保存草稿文件至打开时的路径, 仅在模板模式下可用
|
||||
|
||||
Raises:
|
||||
`ValueError`: 不在模板模式下
|
||||
"""
|
||||
if self.save_path is None:
|
||||
raise ValueError("没有设置保存路径, 可能不在模板模式下")
|
||||
self.dump(self.save_path)
|
||||
256
pyJianYingDraft/segment.py
Normal file
256
pyJianYingDraft/segment.py
Normal file
@@ -0,0 +1,256 @@
|
||||
"""定义片段基类及部分比较通用的属性类"""
|
||||
|
||||
import uuid
|
||||
from typing import Optional, Dict, List, Any, Union
|
||||
|
||||
from .animation import Segment_animations
|
||||
from .time_util import Timerange, tim
|
||||
from .keyframe import Keyframe_list, Keyframe_property
|
||||
|
||||
class Base_segment:
|
||||
"""片段基类"""
|
||||
|
||||
segment_id: str
|
||||
"""片段全局id, 由程序自动生成"""
|
||||
material_id: str
|
||||
"""使用的素材id"""
|
||||
target_timerange: Timerange
|
||||
"""片段在轨道上的时间范围"""
|
||||
|
||||
common_keyframes: List[Keyframe_list]
|
||||
"""各属性的关键帧列表"""
|
||||
|
||||
def __init__(self, material_id: str, target_timerange: Timerange):
|
||||
self.segment_id = uuid.uuid4().hex
|
||||
self.material_id = material_id
|
||||
self.target_timerange = target_timerange
|
||||
|
||||
self.common_keyframes = []
|
||||
|
||||
@property
|
||||
def start(self) -> int:
|
||||
"""片段开始时间, 单位为微秒"""
|
||||
return self.target_timerange.start
|
||||
@start.setter
|
||||
def start(self, value: int):
|
||||
self.target_timerange.start = value
|
||||
|
||||
@property
|
||||
def duration(self) -> int:
|
||||
"""片段持续时间, 单位为微秒"""
|
||||
return self.target_timerange.duration
|
||||
@duration.setter
|
||||
def duration(self, value: int):
|
||||
self.target_timerange.duration = value
|
||||
|
||||
@property
|
||||
def end(self) -> int:
|
||||
"""片段结束时间, 单位为微秒"""
|
||||
return self.target_timerange.end
|
||||
|
||||
def overlaps(self, other: "Base_segment") -> bool:
|
||||
"""判断是否与另一个片段有重叠"""
|
||||
return self.target_timerange.overlaps(other.target_timerange)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
"""返回通用于各种片段的属性"""
|
||||
return {
|
||||
"enable_adjust": True,
|
||||
"enable_color_correct_adjust": False,
|
||||
"enable_color_curves": True,
|
||||
"enable_color_match_adjust": False,
|
||||
"enable_color_wheels": True,
|
||||
"enable_lut": True,
|
||||
"enable_smart_color_adjust": False,
|
||||
"last_nonzero_volume": 1.0,
|
||||
"reverse": False,
|
||||
"track_attribute": 0,
|
||||
"track_render_index": 0,
|
||||
"visible": True,
|
||||
# 写入自定义字段
|
||||
"id": self.segment_id,
|
||||
"material_id": self.material_id,
|
||||
"target_timerange": self.target_timerange.export_json(),
|
||||
|
||||
"common_keyframes": [kf_list.export_json() for kf_list in self.common_keyframes],
|
||||
"keyframe_refs": [], # 意义不明
|
||||
}
|
||||
|
||||
class Speed:
|
||||
"""播放速度对象, 目前只支持固定速度"""
|
||||
|
||||
global_id: str
|
||||
"""全局id, 由程序自动生成"""
|
||||
speed: float
|
||||
"""播放速度"""
|
||||
|
||||
def __init__(self, speed: float):
|
||||
self.global_id = uuid.uuid4().hex
|
||||
self.speed = speed
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"curve_speed": None,
|
||||
"id": self.global_id,
|
||||
"mode": 0,
|
||||
"speed": self.speed,
|
||||
"type": "speed"
|
||||
}
|
||||
|
||||
class Clip_settings:
|
||||
"""素材片段的图像调节设置"""
|
||||
|
||||
alpha: float
|
||||
"""图像不透明度, 0-1"""
|
||||
flip_horizontal: bool
|
||||
"""是否水平翻转"""
|
||||
flip_vertical: bool
|
||||
"""是否垂直翻转"""
|
||||
rotation: float
|
||||
"""顺时针旋转的**角度**, 可正可负"""
|
||||
scale_x: float
|
||||
"""水平缩放比例"""
|
||||
scale_y: float
|
||||
"""垂直缩放比例"""
|
||||
transform_x: float
|
||||
"""水平位移, 单位为半个画布宽"""
|
||||
transform_y: float
|
||||
"""垂直位移, 单位为半个画布高"""
|
||||
|
||||
def __init__(self, *, alpha: float = 1.0,
|
||||
flip_horizontal: bool = False, flip_vertical: bool = False,
|
||||
rotation: float = 0.0,
|
||||
scale_x: float = 1.0, scale_y: float = 1.0,
|
||||
transform_x: float = 0.0, transform_y: float = 0.0):
|
||||
"""初始化图像调节设置, 默认不作任何图像变换
|
||||
|
||||
Args:
|
||||
alpha (float, optional): 图像不透明度, 0-1. 默认为1.0.
|
||||
flip_horizontal (bool, optional): 是否水平翻转. 默认为False.
|
||||
flip_vertical (bool, optional): 是否垂直翻转. 默认为False.
|
||||
rotation (float, optional): 顺时针旋转的**角度**, 可正可负. 默认为0.0.
|
||||
scale_x (float, optional): 水平缩放比例. 默认为1.0.
|
||||
scale_y (float, optional): 垂直缩放比例. 默认为1.0.
|
||||
transform_x (float, optional): 水平位移, 单位为半个画布宽. 默认为0.0.
|
||||
transform_y (float, optional): 垂直位移, 单位为半个画布高. 默认为0.0.
|
||||
参考: 剪映导入的字幕似乎取此值为-0.8
|
||||
"""
|
||||
self.alpha = alpha
|
||||
self.flip_horizontal, self.flip_vertical = flip_horizontal, flip_vertical
|
||||
self.rotation = rotation
|
||||
self.scale_x, self.scale_y = scale_x, scale_y
|
||||
self.transform_x, self.transform_y = transform_x, transform_y
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
clip_settings_json = {
|
||||
"alpha": self.alpha,
|
||||
"flip": {"horizontal": self.flip_horizontal, "vertical": self.flip_vertical},
|
||||
"rotation": self.rotation,
|
||||
"scale": {"x": self.scale_x, "y": self.scale_y},
|
||||
"transform": {"x": self.transform_x, "y": self.transform_y}
|
||||
}
|
||||
return clip_settings_json
|
||||
|
||||
class Media_segment(Base_segment):
|
||||
"""媒体片段基类"""
|
||||
|
||||
source_timerange: Optional[Timerange]
|
||||
"""截取的素材片段的时间范围, 对贴纸而言不存在"""
|
||||
speed: Speed
|
||||
"""播放速度设置"""
|
||||
volume: float
|
||||
"""音量"""
|
||||
|
||||
extra_material_refs: List[str]
|
||||
"""附加的素材id列表, 用于链接动画/特效等"""
|
||||
|
||||
def __init__(self, material_id: str, source_timerange: Optional[Timerange], target_timerange: Timerange, speed: float, volume: float):
|
||||
super().__init__(material_id, target_timerange)
|
||||
|
||||
self.source_timerange = source_timerange
|
||||
self.speed = Speed(speed)
|
||||
self.volume = volume
|
||||
|
||||
self.extra_material_refs = [self.speed.global_id]
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
"""返回通用于音频和视频片段的默认属性"""
|
||||
ret = super().export_json()
|
||||
ret.update({
|
||||
"source_timerange": self.source_timerange.export_json() if self.source_timerange else None,
|
||||
"speed": self.speed.speed,
|
||||
"volume": self.volume,
|
||||
"extra_material_refs": self.extra_material_refs,
|
||||
})
|
||||
return ret
|
||||
|
||||
class Visual_segment(Media_segment):
|
||||
"""视觉片段基类,用于处理所有可见片段(视频、贴纸、文本)的共同属性和行为"""
|
||||
|
||||
clip_settings: Clip_settings
|
||||
"""图像调节设置, 其效果可被关键帧覆盖"""
|
||||
|
||||
uniform_scale: bool
|
||||
"""是否锁定XY轴缩放比例"""
|
||||
|
||||
animations_instance: Optional[Segment_animations]
|
||||
"""动画实例, 可能为空
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
|
||||
def __init__(self, material_id: str, source_timerange: Optional[Timerange], target_timerange: Timerange,
|
||||
speed: float, volume: float, *, clip_settings: Optional[Clip_settings]):
|
||||
"""初始化视觉片段基类
|
||||
|
||||
Args:
|
||||
material_id (`str`): 素材id
|
||||
source_timerange (`Timerange`, optional): 截取的素材片段的时间范围
|
||||
target_timerange (`Timerange`): 片段在轨道上的目标时间范围
|
||||
speed (`float`): 播放速度
|
||||
volume (`float`): 音量
|
||||
clip_settings (`Clip_settings`, optional): 图像调节设置, 默认不作任何变换
|
||||
"""
|
||||
super().__init__(material_id, source_timerange, target_timerange, speed, volume)
|
||||
|
||||
self.clip_settings = clip_settings if clip_settings is not None else Clip_settings()
|
||||
self.uniform_scale = True
|
||||
self.animations_instance = None
|
||||
|
||||
def add_keyframe(self, _property: Keyframe_property, time_offset: Union[int, str], value: float) -> "Visual_segment":
|
||||
"""为给定属性创建一个关键帧, 并自动加入到关键帧列表中
|
||||
|
||||
Args:
|
||||
_property (`Keyframe_property`): 要控制的属性
|
||||
time_offset (`int` or `str`): 关键帧的时间偏移量, 单位为微秒. 若传入字符串则会调用`tim()`函数进行解析.
|
||||
value (`float`): 属性在`time_offset`处的值
|
||||
|
||||
Raises:
|
||||
`ValueError`: 试图同时设置`uniform_scale`以及`scale_x`或`scale_y`其中一者
|
||||
"""
|
||||
if (_property == Keyframe_property.scale_x or _property == Keyframe_property.scale_y) and self.uniform_scale:
|
||||
self.uniform_scale = False
|
||||
elif _property == Keyframe_property.uniform_scale:
|
||||
if not self.uniform_scale:
|
||||
raise ValueError("已设置 scale_x 或 scale_y 时, 不能再设置 uniform_scale")
|
||||
_property = Keyframe_property.scale_x
|
||||
|
||||
if isinstance(time_offset, str): time_offset = tim(time_offset)
|
||||
|
||||
for kf_list in self.common_keyframes:
|
||||
if kf_list.keyframe_property == _property:
|
||||
kf_list.add_keyframe(time_offset, value)
|
||||
return self
|
||||
kf_list = Keyframe_list(_property)
|
||||
kf_list.add_keyframe(time_offset, value)
|
||||
self.common_keyframes.append(kf_list)
|
||||
return self
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
"""导出通用于所有视觉片段的JSON数据"""
|
||||
json_dict = super().export_json()
|
||||
json_dict.update({
|
||||
"clip": self.clip_settings.export_json(),
|
||||
"uniform_scale": {"on": self.uniform_scale, "value": 1.0},
|
||||
})
|
||||
return json_dict
|
||||
327
pyJianYingDraft/template_mode.py
Normal file
327
pyJianYingDraft/template_mode.py
Normal file
@@ -0,0 +1,327 @@
|
||||
"""与模板模式相关的类及函数等"""
|
||||
|
||||
from enum import Enum
|
||||
from copy import deepcopy
|
||||
|
||||
from . import util
|
||||
from . import exceptions
|
||||
from .time_util import Timerange
|
||||
from .segment import Base_segment
|
||||
from .track import Base_track, Track_type, Track
|
||||
from .local_materials import Video_material, Audio_material
|
||||
from .video_segment import Video_segment, Clip_settings
|
||||
from .audio_segment import Audio_segment
|
||||
from .keyframe import Keyframe_list, Keyframe_property, Keyframe
|
||||
from .metadata import Audio_scene_effect_type, Tone_effect_type, Speech_to_song_type, Effect_param_instance
|
||||
|
||||
from typing import List, Dict, Any
|
||||
|
||||
class Shrink_mode(Enum):
|
||||
"""处理替换素材时素材变短情况的方法"""
|
||||
|
||||
cut_head = "cut_head"
|
||||
"""裁剪头部, 即后移片段起始点"""
|
||||
cut_tail = "cut_tail"
|
||||
"""裁剪尾部, 即前移片段终止点"""
|
||||
|
||||
cut_tail_align = "cut_tail_align"
|
||||
"""裁剪尾部并消除间隙, 即前移片段终止点, 后续片段也依次前移"""
|
||||
|
||||
shrink = "shrink"
|
||||
"""保持中间点不变, 两端点向中间靠拢"""
|
||||
|
||||
class Extend_mode(Enum):
|
||||
"""处理替换素材时素材变长情况的方法"""
|
||||
|
||||
cut_material_tail = "cut_material_tail"
|
||||
"""裁剪素材尾部(覆盖`source_timerange`参数), 使得片段维持原长不变, 此方法总是成功"""
|
||||
|
||||
extend_head = "extend_head"
|
||||
"""延伸头部, 即尝试前移片段起始点, 与前续片段重合时失败"""
|
||||
extend_tail = "extend_tail"
|
||||
"""延伸尾部, 即尝试后移片段终止点, 与后续片段重合时失败"""
|
||||
|
||||
push_tail = "push_tail"
|
||||
"""延伸尾部, 若有必要则依次后移后续片段, 此方法总是成功"""
|
||||
|
||||
class ImportedSegment(Base_segment):
|
||||
"""导入的片段"""
|
||||
|
||||
raw_data: Dict[str, Any]
|
||||
"""原始json数据"""
|
||||
|
||||
__DATA_ATTRS = ["material_id", "target_timerange"]
|
||||
def __init__(self, json_data: Dict[str, Any]):
|
||||
self.raw_data = deepcopy(json_data)
|
||||
|
||||
util.assign_attr_with_json(self, self.__DATA_ATTRS, json_data)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
json_data = deepcopy(self.raw_data)
|
||||
json_data.update(util.export_attr_to_json(self, self.__DATA_ATTRS))
|
||||
return json_data
|
||||
|
||||
class ImportedMediaSegment(ImportedSegment):
|
||||
"""导入的视频/音频片段"""
|
||||
|
||||
source_timerange: Timerange
|
||||
"""片段取用的素材时间范围"""
|
||||
|
||||
__DATA_ATTRS = ["source_timerange"]
|
||||
def __init__(self, json_data: Dict[str, Any]):
|
||||
super().__init__(json_data)
|
||||
|
||||
util.assign_attr_with_json(self, self.__DATA_ATTRS, json_data)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
json_data = super().export_json()
|
||||
json_data.update(util.export_attr_to_json(self, self.__DATA_ATTRS))
|
||||
return json_data
|
||||
|
||||
|
||||
class ImportedTrack(Base_track):
|
||||
"""模板模式下导入的轨道"""
|
||||
|
||||
raw_data: Dict[str, Any]
|
||||
"""原始轨道数据"""
|
||||
|
||||
def __init__(self, json_data: Dict[str, Any]):
|
||||
self.track_type = Track_type.from_name(json_data["type"])
|
||||
self.name = json_data["name"]
|
||||
self.track_id = json_data["id"]
|
||||
self.render_index = max([int(seg["render_index"]) for seg in json_data["segments"]], default=0)
|
||||
|
||||
self.raw_data = deepcopy(json_data)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
ret = deepcopy(self.raw_data)
|
||||
ret.update({
|
||||
"name": self.name,
|
||||
"id": self.track_id
|
||||
})
|
||||
return ret
|
||||
|
||||
class EditableTrack(ImportedTrack):
|
||||
"""模板模式下导入且可修改的轨道(音视频及文本轨道)"""
|
||||
|
||||
segments: List[ImportedSegment]
|
||||
"""该轨道包含的片段列表"""
|
||||
|
||||
def __len__(self):
|
||||
return len(self.segments)
|
||||
|
||||
@property
|
||||
def start_time(self) -> int:
|
||||
"""轨道起始时间, 微秒"""
|
||||
if len(self.segments) == 0:
|
||||
return 0
|
||||
return self.segments[0].target_timerange.start
|
||||
|
||||
@property
|
||||
def end_time(self) -> int:
|
||||
"""轨道结束时间, 微秒"""
|
||||
if len(self.segments) == 0:
|
||||
return 0
|
||||
return self.segments[-1].target_timerange.end
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
ret = super().export_json()
|
||||
# 为每个片段写入render_index
|
||||
segment_exports = [seg.export_json() for seg in self.segments]
|
||||
for seg in segment_exports:
|
||||
seg["render_index"] = self.render_index
|
||||
ret["segments"] = segment_exports
|
||||
return ret
|
||||
|
||||
class ImportedTextTrack(EditableTrack):
|
||||
"""模板模式下导入的文本轨道"""
|
||||
|
||||
def __init__(self, json_data: Dict[str, Any]):
|
||||
super().__init__(json_data)
|
||||
self.segments = [ImportedSegment(seg) for seg in json_data["segments"]]
|
||||
|
||||
class ImportedMediaTrack(EditableTrack):
|
||||
"""模板模式下导入的音频/视频轨道"""
|
||||
|
||||
segments: List[ImportedMediaSegment]
|
||||
"""该轨道包含的片段列表"""
|
||||
|
||||
def __init__(self, json_data: Dict[str, Any]):
|
||||
super().__init__(json_data)
|
||||
self.segments = [ImportedMediaSegment(seg) for seg in json_data["segments"]]
|
||||
|
||||
def check_material_type(self, material: object) -> bool:
|
||||
"""检查素材类型是否与轨道类型匹配"""
|
||||
if self.track_type == Track_type.video and isinstance(material, Video_material):
|
||||
return True
|
||||
if self.track_type == Track_type.audio and isinstance(material, Audio_material):
|
||||
return True
|
||||
return False
|
||||
|
||||
def process_timerange(self, seg_index: int, src_timerange: Timerange,
|
||||
shrink: Shrink_mode, extend: List[Extend_mode]) -> None:
|
||||
"""处理素材替换的时间范围变更"""
|
||||
seg = self.segments[seg_index]
|
||||
new_duration = src_timerange.duration
|
||||
|
||||
# 时长变短
|
||||
delta_duration = abs(new_duration - seg.duration)
|
||||
if new_duration < seg.duration:
|
||||
if shrink == Shrink_mode.cut_head:
|
||||
seg.start += delta_duration
|
||||
elif shrink == Shrink_mode.cut_tail:
|
||||
seg.duration -= delta_duration
|
||||
elif shrink == Shrink_mode.cut_tail_align:
|
||||
seg.duration -= delta_duration
|
||||
for i in range(seg_index+1, len(self.segments)): # 后续片段也依次前移相应值(保持间隙)
|
||||
self.segments[i].start -= delta_duration
|
||||
elif shrink == Shrink_mode.shrink:
|
||||
seg.duration -= delta_duration
|
||||
seg.start += delta_duration // 2
|
||||
else:
|
||||
raise ValueError(f"Unsupported shrink mode: {shrink}")
|
||||
# 时长变长
|
||||
elif new_duration > seg.duration:
|
||||
success_flag = False
|
||||
prev_seg_end = int(0) if seg_index == 0 else self.segments[seg_index-1].target_timerange.end
|
||||
next_seg_start = int(1e15) if seg_index == len(self.segments)-1 else self.segments[seg_index+1].start
|
||||
for mode in extend:
|
||||
if mode == Extend_mode.extend_head:
|
||||
if seg.start - delta_duration >= prev_seg_end:
|
||||
seg.start -= delta_duration
|
||||
success_flag = True
|
||||
elif mode == Extend_mode.extend_tail:
|
||||
if seg.target_timerange.end + delta_duration <= next_seg_start:
|
||||
seg.duration += delta_duration
|
||||
success_flag = True
|
||||
elif mode == Extend_mode.push_tail:
|
||||
shift_duration = max(0, seg.target_timerange.end + delta_duration - next_seg_start)
|
||||
seg.duration += delta_duration
|
||||
if shift_duration > 0: # 有必要时后移后续片段
|
||||
for i in range(seg_index+1, len(self.segments)):
|
||||
self.segments[i].start += shift_duration
|
||||
success_flag = True
|
||||
elif mode == Extend_mode.cut_material_tail:
|
||||
src_timerange.duration = seg.duration
|
||||
success_flag = True
|
||||
else:
|
||||
raise ValueError(f"Unsupported extend mode: {mode}")
|
||||
|
||||
if success_flag:
|
||||
break
|
||||
if not success_flag:
|
||||
raise exceptions.ExtensionFailed(f"未能将片段延长至 {new_duration}μs, 尝试过以下方法: {extend}")
|
||||
|
||||
# 写入素材时间范围
|
||||
seg.source_timerange = src_timerange
|
||||
|
||||
def import_track(json_data: Dict[str, Any], imported_materials: Dict[str, Any] = None) -> Track:
|
||||
"""导入轨道
|
||||
:param json_data: 轨道数据
|
||||
:param imported_materials: 已导入的素材数据,用于创建片段的material实例
|
||||
"""
|
||||
track_type = Track_type.from_name(json_data["type"])
|
||||
# 创建新的Track实例,保留所有原始属性
|
||||
track = Track(
|
||||
track_type=track_type,
|
||||
name=json_data["name"],
|
||||
render_index=max([int(seg.get("render_index", 0)) for seg in json_data.get("segments", [])], default=0),
|
||||
mute=bool(json_data.get("attribute", 0))
|
||||
)
|
||||
|
||||
# 设置track_id,使用原始ID
|
||||
track.track_id = json_data.get("id")
|
||||
|
||||
# 如果轨道类型允许修改,导入所有片段
|
||||
if track_type.value.allow_modify and imported_materials:
|
||||
for segment_data in json_data.get("segments", []):
|
||||
material_id = segment_data.get("material_id")
|
||||
material = None
|
||||
|
||||
# 处理关键帧信息
|
||||
common_keyframes = []
|
||||
for kf_list_data in segment_data.get("common_keyframes", []):
|
||||
# 创建关键帧列表
|
||||
kf_list = Keyframe_list(Keyframe_property(kf_list_data["property_type"]))
|
||||
kf_list.list_id = kf_list_data["id"]
|
||||
|
||||
# 添加关键帧
|
||||
for kf_data in kf_list_data["keyframe_list"]:
|
||||
keyframe = Keyframe(kf_data["time_offset"], kf_data["values"][0])
|
||||
keyframe.kf_id = kf_data["id"]
|
||||
keyframe.values = kf_data["values"]
|
||||
kf_list.keyframes.append(keyframe)
|
||||
|
||||
common_keyframes.append(kf_list)
|
||||
|
||||
# 根据轨道类型查找对应的素材
|
||||
if track_type == Track_type.video:
|
||||
# 从imported_materials中查找视频素材
|
||||
for video_material in imported_materials.get("videos", []):
|
||||
if video_material["id"] == material_id:
|
||||
material = Video_material.from_dict(video_material)
|
||||
break
|
||||
|
||||
if material:
|
||||
# 创建视频片段
|
||||
segment = Video_segment(
|
||||
material=material,
|
||||
target_timerange=Timerange(
|
||||
start=segment_data["target_timerange"]["start"],
|
||||
duration=segment_data["target_timerange"]["duration"]
|
||||
),
|
||||
source_timerange=Timerange(
|
||||
start=segment_data["source_timerange"]["start"],
|
||||
duration=segment_data["source_timerange"]["duration"]
|
||||
),
|
||||
speed=segment_data.get("speed", 1.0),
|
||||
clip_settings=Clip_settings(
|
||||
transform_x=segment_data["clip"]["transform"]["x"],
|
||||
transform_y=segment_data["clip"]["transform"]["y"],
|
||||
scale_x=segment_data["clip"]["scale"]["x"],
|
||||
scale_y=segment_data["clip"]["scale"]["y"]
|
||||
)
|
||||
)
|
||||
segment.volume = segment_data.get("volume", 1.0)
|
||||
segment.visible = segment_data.get("visible", True)
|
||||
segment.common_keyframes = common_keyframes
|
||||
track.segments.append(segment)
|
||||
|
||||
elif track_type == Track_type.audio:
|
||||
# 从imported_materials中查找音频素材
|
||||
for audio_material in imported_materials.get("audios", []):
|
||||
if audio_material["id"] == material_id:
|
||||
material = Audio_material.from_dict(audio_material)
|
||||
break
|
||||
|
||||
if material:
|
||||
# 创建音频片段
|
||||
segment = Audio_segment(
|
||||
material=material,
|
||||
target_timerange=Timerange(
|
||||
start=segment_data["target_timerange"]["start"],
|
||||
duration=segment_data["target_timerange"]["duration"]
|
||||
),
|
||||
volume=segment_data.get("volume", 1.0)
|
||||
)
|
||||
# 添加音频效果
|
||||
if "audio_effects" in imported_materials and imported_materials["audio_effects"]:
|
||||
effect_data = imported_materials["audio_effects"][0]
|
||||
# 根据资源ID查找对应的效果类型
|
||||
for effect_type in Audio_scene_effect_type:
|
||||
if effect_type.value.resource_id == effect_data["resource_id"]:
|
||||
# 将参数值从0-1映射到0-100
|
||||
params = []
|
||||
for param in effect_data["audio_adjust_params"]:
|
||||
params.append(param["value"] * 100)
|
||||
segment.add_effect(effect_type, params,effect_id=effect_data["id"])
|
||||
break
|
||||
segment.common_keyframes = common_keyframes
|
||||
track.segments.append(segment)
|
||||
else:
|
||||
# 其他类型片段保持原样
|
||||
segment = ImportedSegment(segment_data)
|
||||
segment.common_keyframes = common_keyframes
|
||||
track.segments.append(segment)
|
||||
|
||||
return track
|
||||
442
pyJianYingDraft/text_segment.py
Normal file
442
pyJianYingDraft/text_segment.py
Normal file
@@ -0,0 +1,442 @@
|
||||
"""定义文本片段及其相关类"""
|
||||
|
||||
import json
|
||||
import uuid
|
||||
from copy import deepcopy
|
||||
|
||||
from typing import Dict, Tuple, Any
|
||||
from typing import Union, Optional, Literal
|
||||
|
||||
from pyJianYingDraft.metadata.capcut_text_animation_meta import CapCut_Text_intro, CapCut_Text_outro, CapCut_Text_loop_anim
|
||||
|
||||
from .time_util import Timerange, tim
|
||||
from .segment import Clip_settings, Visual_segment
|
||||
from .animation import Segment_animations, Text_animation
|
||||
|
||||
from .metadata import Font_type, Effect_meta
|
||||
from .metadata import Text_intro, Text_outro, Text_loop_anim
|
||||
|
||||
class Text_style:
|
||||
"""字体样式类"""
|
||||
|
||||
size: float
|
||||
"""字体大小"""
|
||||
|
||||
bold: bool
|
||||
"""是否加粗"""
|
||||
italic: bool
|
||||
"""是否斜体"""
|
||||
underline: bool
|
||||
"""是否加下划线"""
|
||||
|
||||
color: Tuple[float, float, float]
|
||||
"""字体颜色, RGB三元组, 取值范围为[0, 1]"""
|
||||
alpha: float
|
||||
"""字体不透明度"""
|
||||
|
||||
align: Literal[0, 1, 2]
|
||||
"""对齐方式"""
|
||||
vertical: bool
|
||||
"""是否为竖排文本"""
|
||||
|
||||
letter_spacing: int
|
||||
"""字符间距"""
|
||||
line_spacing: int
|
||||
"""行间距"""
|
||||
|
||||
def __init__(self, *, size: float = 8.0, bold: bool = False, italic: bool = False, underline: bool = False,
|
||||
color: Tuple[float, float, float] = (1.0, 1.0, 1.0), alpha: float = 1.0,
|
||||
align: Literal[0, 1, 2] = 0, vertical: bool = False,
|
||||
letter_spacing: int = 0, line_spacing: int = 0):
|
||||
"""
|
||||
Args:
|
||||
size (`float`, optional): 字体大小, 默认为8.0
|
||||
bold (`bool`, optional): 是否加粗, 默认为否
|
||||
italic (`bool`, optional): 是否斜体, 默认为否
|
||||
underline (`bool`, optional): 是否加下划线, 默认为否
|
||||
color (`Tuple[float, float, float]`, optional): 字体颜色, RGB三元组, 取值范围为[0, 1], 默认为白色
|
||||
alpha (`float`, optional): 字体不透明度, 取值范围[0, 1], 默认不透明
|
||||
align (`int`, optional): 对齐方式, 0: 左对齐, 1: 居中, 2: 右对齐, 默认为左对齐
|
||||
vertical (`bool`, optional): 是否为竖排文本, 默认为否
|
||||
letter_spacing (`int`, optional): 字符间距, 定义与剪映中一致, 默认为0
|
||||
line_spacing (`int`, optional): 行间距, 定义与剪映中一致, 默认为0
|
||||
"""
|
||||
self.size = size
|
||||
self.bold = bold
|
||||
self.italic = italic
|
||||
self.underline = underline
|
||||
|
||||
self.color = color
|
||||
self.alpha = alpha
|
||||
|
||||
self.align = align
|
||||
self.vertical = vertical
|
||||
|
||||
self.letter_spacing = letter_spacing
|
||||
self.line_spacing = line_spacing
|
||||
|
||||
class Text_border:
|
||||
"""文本描边的参数"""
|
||||
|
||||
alpha: float
|
||||
"""描边不透明度"""
|
||||
color: Tuple[float, float, float]
|
||||
"""描边颜色, RGB三元组, 取值范围为[0, 1]"""
|
||||
width: float
|
||||
"""描边宽度"""
|
||||
|
||||
def __init__(self, *, alpha: float = 1.0, color: Tuple[float, float, float] = (0.0, 0.0, 0.0), width: float = 40.0):
|
||||
"""
|
||||
Args:
|
||||
alpha (`float`, optional): 描边不透明度, 取值范围[0, 1], 默认为1.0
|
||||
color (`Tuple[float, float, float]`, optional): 描边颜色, RGB三元组, 取值范围为[0, 1], 默认为黑色
|
||||
width (`float`, optional): 描边宽度, 与剪映中一致, 取值范围为[0, 100], 默认为40.0
|
||||
"""
|
||||
self.alpha = alpha
|
||||
self.color = color
|
||||
self.width = width / 100.0 * 0.2 # 此映射可能不完全正确
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
"""导出JSON数据, 放置在素材content的styles中"""
|
||||
return {
|
||||
"content": {
|
||||
"solid": {
|
||||
"alpha": self.alpha,
|
||||
"color": list(self.color),
|
||||
}
|
||||
},
|
||||
"width": self.width
|
||||
}
|
||||
|
||||
class Text_background:
|
||||
"""文本背景参数"""
|
||||
|
||||
style: Literal[0, 2]
|
||||
"""背景样式"""
|
||||
|
||||
alpha: float
|
||||
"""背景不透明度"""
|
||||
color: str
|
||||
"""背景颜色, 格式为'#RRGGBB'"""
|
||||
round_radius: float
|
||||
"""背景圆角半径"""
|
||||
height: float
|
||||
"""背景高度"""
|
||||
width: float
|
||||
"""背景宽度"""
|
||||
horizontal_offset: float
|
||||
"""背景水平偏移"""
|
||||
vertical_offset: float
|
||||
"""背景竖直偏移"""
|
||||
|
||||
def __init__(self, *, color: str, style: Literal[1, 2] = 1, alpha: float = 1.0, round_radius: float = 0.0,
|
||||
height: float = 0.14, width: float = 0.14,
|
||||
horizontal_offset: float = 0.5, vertical_offset: float = 0.5):
|
||||
"""
|
||||
Args:
|
||||
color (`str`): 背景颜色, 格式为'#RRGGBB'
|
||||
style (`int`, optional): 背景样式, 1和2分别对应剪映中的两种样式, 默认为1
|
||||
alpha (`float`, optional): 背景不透明度, 与剪映中一致, 取值范围[0, 1], 默认为1.0
|
||||
round_radius (`float`, optional): 背景圆角半径, 与剪映中一致, 取值范围[0, 1], 默认为0.0
|
||||
height (`float`, optional): 背景高度, 与剪映中一致, 取值范围为[0, 1], 默认为0.14
|
||||
width (`float`, optional): 背景宽度, 与剪映中一致, 取值范围为[0, 1], 默认为0.14
|
||||
horizontal_offset (`float`, optional): 背景水平偏移, 与剪映中一致, 取值范围为[0, 1], 默认为0.5
|
||||
vertical_offset (`float`, optional): 背景竖直偏移, 与剪映中一致, 取值范围为[0, 1], 默认为0.5
|
||||
"""
|
||||
self.style = (0, 2)[style - 1]
|
||||
|
||||
self.alpha = alpha
|
||||
self.color = color
|
||||
self.round_radius = round_radius
|
||||
self.height = height
|
||||
self.width = width
|
||||
self.horizontal_offset = horizontal_offset * 2 - 1
|
||||
self.vertical_offset = vertical_offset * 2 - 1
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
"""生成子JSON数据, 在Text_segment导出时合并到其中"""
|
||||
return {
|
||||
"background_style": self.style,
|
||||
"background_color": self.color,
|
||||
"background_alpha": self.alpha,
|
||||
"background_round_radius": self.round_radius,
|
||||
"background_height": self.height,
|
||||
"background_width": self.width,
|
||||
"background_horizontal_offset": self.horizontal_offset,
|
||||
"background_vertical_offset": self.vertical_offset,
|
||||
}
|
||||
|
||||
class TextBubble:
|
||||
"""文本气泡素材, 与滤镜素材本质上一致"""
|
||||
|
||||
global_id: str
|
||||
"""气泡全局id, 由程序自动生成"""
|
||||
|
||||
effect_id: str
|
||||
resource_id: str
|
||||
|
||||
def __init__(self, effect_id: str, resource_id: str):
|
||||
self.global_id = uuid.uuid4().hex
|
||||
self.effect_id = effect_id
|
||||
self.resource_id = resource_id
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"apply_target_type": 0,
|
||||
"effect_id": self.effect_id,
|
||||
"id": self.global_id,
|
||||
"resource_id": self.resource_id,
|
||||
"type": "text_shape",
|
||||
"value": 1.0,
|
||||
# 不导出path和request_id
|
||||
}
|
||||
|
||||
class TextEffect(TextBubble):
|
||||
"""文本花字素材, 与滤镜素材本质上也一致"""
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
ret = super().export_json()
|
||||
ret["type"] = "text_effect"
|
||||
ret["source_platform"] = 1
|
||||
return ret
|
||||
|
||||
class Text_segment(Visual_segment):
|
||||
"""文本片段类, 目前仅支持设置基本的字体样式"""
|
||||
|
||||
text: str
|
||||
"""文本内容"""
|
||||
font: Optional[Effect_meta]
|
||||
"""字体类型"""
|
||||
style: Text_style
|
||||
"""字体样式"""
|
||||
|
||||
border: Optional[Text_border]
|
||||
"""文本描边参数, None表示无描边"""
|
||||
background: Optional[Text_background]
|
||||
"""文本背景参数, None表示无背景"""
|
||||
|
||||
bubble: Optional[TextBubble]
|
||||
"""文本气泡效果, 在放入轨道时加入素材列表中"""
|
||||
effect: Optional[TextEffect]
|
||||
"""文本花字效果, 在放入轨道时加入素材列表中, 目前仅支持一部分花字效果"""
|
||||
|
||||
fixed_width: float
|
||||
"""固定宽度, -1表示不固定"""
|
||||
fixed_height: float
|
||||
"""固定高度, -1表示不固定"""
|
||||
|
||||
def __init__(self, text: str, timerange: Timerange, *,
|
||||
font: Optional[Font_type] = None,
|
||||
style: Optional[Text_style] = None, clip_settings: Optional[Clip_settings] = None,
|
||||
border: Optional[Text_border] = None, background: Optional[Text_background] = None,
|
||||
fixed_width: int = -1, fixed_height: int = -1):
|
||||
"""创建文本片段, 并指定其时间信息、字体样式及图像调节设置
|
||||
|
||||
片段创建完成后, 可通过`Script_file.add_segment`方法将其添加到轨道中
|
||||
|
||||
Args:
|
||||
text (`str`): 文本内容
|
||||
timerange (`Timerange`): 片段在轨道上的时间范围
|
||||
font (`Font_type`, optional): 字体类型, 默认为系统字体
|
||||
style (`Text_style`, optional): 字体样式, 包含大小/颜色/对齐/透明度等.
|
||||
clip_settings (`Clip_settings`, optional): 图像调节设置, 默认不做任何变换
|
||||
border (`Text_border`, optional): 文本描边参数, 默认无描边
|
||||
background (`Text_background`, optional): 文本背景参数, 默认无背景
|
||||
fixed_width (`int`, optional): 文本固定宽度(像素值), 默认为-1(不固定宽度)
|
||||
fixed_height (`int`, optional): 文本固定高度(像素值), 默认为-1(不固定高度)
|
||||
"""
|
||||
super().__init__(uuid.uuid4().hex, None, timerange, 1.0, 1.0, clip_settings=clip_settings)
|
||||
|
||||
self.text = text
|
||||
self.font = font.value if font else None
|
||||
self.style = style or Text_style()
|
||||
self.border = border
|
||||
self.background = background
|
||||
|
||||
self.bubble = None
|
||||
self.effect = None
|
||||
|
||||
self.fixed_width = fixed_width
|
||||
self.fixed_height = fixed_height
|
||||
|
||||
@classmethod
|
||||
def create_from_template(cls, text: str, timerange: Timerange, template: "Text_segment") -> "Text_segment":
|
||||
"""根据模板创建新的文本片段, 并指定其文本内容"""
|
||||
new_segment = cls(text, timerange, style=deepcopy(template.style), clip_settings=deepcopy(template.clip_settings),
|
||||
border=deepcopy(template.border), background=deepcopy(template.background))
|
||||
new_segment.font = deepcopy(template.font)
|
||||
|
||||
# 处理动画等
|
||||
if template.animations_instance:
|
||||
new_segment.animations_instance = deepcopy(template.animations_instance)
|
||||
new_segment.animations_instance.animation_id = uuid.uuid4().hex
|
||||
new_segment.extra_material_refs.append(new_segment.animations_instance.animation_id)
|
||||
if template.bubble:
|
||||
new_segment.add_bubble(template.bubble.effect_id, template.bubble.resource_id)
|
||||
if template.effect:
|
||||
new_segment.add_effect(template.effect.effect_id)
|
||||
|
||||
return new_segment
|
||||
|
||||
def add_animation(self, animation_type: Union[Text_intro, Text_outro, Text_loop_anim,
|
||||
CapCut_Text_intro, CapCut_Text_outro, CapCut_Text_loop_anim],
|
||||
duration: Union[str, float] = 500000) -> "Text_segment":
|
||||
"""将给定的入场/出场/循环动画添加到此片段的动画列表中, 出入场动画的持续时间可以自行设置, 循环动画则会自动填满其余无动画部分
|
||||
|
||||
注意: 若希望同时使用循环动画和入出场动画, 请**先添加出入场动画再添加循环动画**
|
||||
|
||||
Args:
|
||||
animation_type (`Text_intro`, `Text_outro` or `Text_loop_anim`): 文本动画类型.
|
||||
duration (`str` or `float`, optional): 动画持续时间, 单位为微秒, 仅对入场/出场动画有效.
|
||||
若传入字符串则会调用`tim()`函数进行解析. 默认为0.5秒
|
||||
"""
|
||||
duration = min(tim(duration), self.target_timerange.duration)
|
||||
|
||||
if (isinstance(animation_type, Text_intro) or isinstance(animation_type, CapCut_Text_intro)):
|
||||
start = 0
|
||||
elif (isinstance(animation_type, Text_outro) or isinstance(animation_type, CapCut_Text_outro)):
|
||||
start = self.target_timerange.duration - duration
|
||||
elif (isinstance(animation_type, Text_loop_anim) or isinstance(animation_type, CapCut_Text_loop_anim)):
|
||||
intro_trange = self.animations_instance and self.animations_instance.get_animation_trange("in")
|
||||
outro_trange = self.animations_instance and self.animations_instance.get_animation_trange("out")
|
||||
start = intro_trange.start if intro_trange else 0
|
||||
duration = self.target_timerange.duration - start - (outro_trange.duration if outro_trange else 0)
|
||||
else:
|
||||
raise TypeError("Invalid animation type %s" % type(animation_type))
|
||||
|
||||
if self.animations_instance is None:
|
||||
self.animations_instance = Segment_animations()
|
||||
self.extra_material_refs.append(self.animations_instance.animation_id)
|
||||
|
||||
self.animations_instance.add_animation(Text_animation(animation_type, start, duration))
|
||||
|
||||
return self
|
||||
|
||||
def add_bubble(self, effect_id: str, resource_id: str) -> "Text_segment":
|
||||
"""根据素材信息添加气泡效果, 相应素材信息可通过`Script_file.inspect_material`从模板中获取
|
||||
|
||||
Args:
|
||||
effect_id (`str`): 气泡效果的effect_id
|
||||
resource_id (`str`): 气泡效果的resource_id
|
||||
"""
|
||||
self.bubble = TextBubble(effect_id, resource_id)
|
||||
self.extra_material_refs.append(self.bubble.global_id)
|
||||
return self
|
||||
|
||||
def add_effect(self, effect_id: str) -> "Text_segment":
|
||||
"""根据素材信息添加花字效果, 相应素材信息可通过`Script_file.inspect_material`从模板中获取
|
||||
|
||||
Args:
|
||||
effect_id (`str`): 花字效果的effect_id, 也同时是其resource_id
|
||||
"""
|
||||
self.effect = TextEffect(effect_id, effect_id)
|
||||
self.extra_material_refs.append(self.effect.global_id)
|
||||
return self
|
||||
|
||||
def export_material(self) -> Dict[str, Any]:
|
||||
"""与此文本片段联系的素材, 以此不再单独定义Text_material类"""
|
||||
# 叠加各类效果的flag
|
||||
check_flag: int = 7
|
||||
if self.border:
|
||||
check_flag |= 8
|
||||
if self.background:
|
||||
check_flag |= 16
|
||||
|
||||
content_json = {
|
||||
"styles": [
|
||||
{
|
||||
"fill": {
|
||||
"alpha": 1.0,
|
||||
"content": {
|
||||
"render_type": "solid",
|
||||
"solid": {
|
||||
"alpha": self.style.alpha,
|
||||
"color": list(self.style.color)
|
||||
}
|
||||
}
|
||||
},
|
||||
"range": [0, len(self.text)],
|
||||
"size": self.style.size,
|
||||
"bold": self.style.bold,
|
||||
"italic": self.style.italic,
|
||||
"underline": self.style.underline,
|
||||
"strokes": [self.border.export_json()] if self.border else []
|
||||
}
|
||||
],
|
||||
"text": self.text
|
||||
}
|
||||
if self.font:
|
||||
content_json["styles"][0]["font"] = {
|
||||
"id": self.font.resource_id,
|
||||
"path": "C:/%s.ttf" % self.font.name # 并不会真正在此处放置字体文件
|
||||
}
|
||||
if self.effect:
|
||||
content_json["styles"][0]["effectStyle"] = {
|
||||
"id": self.effect.effect_id,
|
||||
"path": "C:" # 并不会真正在此处放置素材文件
|
||||
}
|
||||
|
||||
ret = {
|
||||
"id": self.material_id,
|
||||
"content": json.dumps(content_json, ensure_ascii=False),
|
||||
|
||||
"typesetting": int(self.style.vertical),
|
||||
"alignment": self.style.align,
|
||||
"letter_spacing": self.style.letter_spacing * 0.05,
|
||||
"line_spacing": 0.02 + self.style.line_spacing * 0.05,
|
||||
|
||||
"line_feed": 1,
|
||||
"line_max_width": 0.82,
|
||||
"force_apply_line_max_width": False,
|
||||
|
||||
"check_flag": check_flag,
|
||||
|
||||
"type": "text",
|
||||
|
||||
"fixed_width": self.fixed_width,
|
||||
"fixed_height": self.fixed_height,
|
||||
|
||||
# 混合 (+4)
|
||||
# "global_alpha": 1.0,
|
||||
|
||||
# 发光 (+64),属性由extra_material_refs记录
|
||||
|
||||
# 阴影 (+32)
|
||||
# "has_shadow": False,
|
||||
# "shadow_alpha": 0.9,
|
||||
# "shadow_angle": -45.0,
|
||||
# "shadow_color": "",
|
||||
# "shadow_distance": 5.0,
|
||||
# "shadow_point": {
|
||||
# "x": 0.6363961030678928,
|
||||
# "y": -0.6363961030678928
|
||||
# },
|
||||
# "shadow_smoothing": 0.45,
|
||||
|
||||
# 整体字体设置, 似乎会被content覆盖
|
||||
# "font_category_id": "",
|
||||
# "font_category_name": "",
|
||||
# "font_id": "",
|
||||
# "font_name": "",
|
||||
# "font_path": "",
|
||||
# "font_resource_id": "",
|
||||
# "font_size": 15.0,
|
||||
# "font_source_platform": 0,
|
||||
# "font_team_id": "",
|
||||
# "font_title": "none",
|
||||
# "font_url": "",
|
||||
# "fonts": [],
|
||||
|
||||
# 似乎会被content覆盖
|
||||
# "text_alpha": 1.0,
|
||||
# "text_color": "#FFFFFF",
|
||||
# "text_curve": None,
|
||||
# "text_preset_resource_id": "",
|
||||
# "text_size": 30,
|
||||
# "underline": False,
|
||||
}
|
||||
|
||||
if self.background:
|
||||
ret.update(self.background.export_json())
|
||||
|
||||
return ret
|
||||
99
pyJianYingDraft/time_util.py
Normal file
99
pyJianYingDraft/time_util.py
Normal file
@@ -0,0 +1,99 @@
|
||||
"""定义时间范围类以及与时间相关的辅助函数"""
|
||||
|
||||
from typing import Union
|
||||
from typing import Dict
|
||||
|
||||
SEC = 1000000
|
||||
"""一秒=1e6微秒"""
|
||||
|
||||
def tim(inp: Union[str, float]) -> int:
|
||||
"""将输入的字符串转换为微秒, 也可直接输入微秒数
|
||||
|
||||
支持类似 "1h52m3s" 或 "0.15s" 这样的格式, 可包含负号以表示负偏移
|
||||
"""
|
||||
if isinstance(inp, (int, float)):
|
||||
return int(round(inp))
|
||||
|
||||
sign: int = 1
|
||||
inp = inp.strip().lower()
|
||||
if inp.startswith("-"):
|
||||
sign = -1
|
||||
inp = inp[1:]
|
||||
|
||||
last_index: int = 0
|
||||
total_time: float = 0
|
||||
for unit, factor in zip(["h", "m", "s"], [3600*SEC, 60*SEC, SEC]):
|
||||
unit_index = inp.find(unit)
|
||||
if unit_index == -1: continue
|
||||
|
||||
total_time += float(inp[last_index:unit_index]) * factor
|
||||
last_index = unit_index + 1
|
||||
|
||||
return int(round(total_time) * sign)
|
||||
|
||||
class Timerange:
|
||||
"""记录了起始时间及持续长度的时间范围"""
|
||||
start: int
|
||||
"""起始时间, 单位为微秒"""
|
||||
duration: int
|
||||
"""持续长度, 单位为微秒"""
|
||||
|
||||
def __init__(self, start: int, duration: int):
|
||||
"""构造一个时间范围
|
||||
|
||||
Args:
|
||||
start (int): 起始时间, 单位为微秒
|
||||
duration (int): 持续长度, 单位为微秒
|
||||
"""
|
||||
|
||||
self.start = start
|
||||
self.duration = duration
|
||||
|
||||
@classmethod
|
||||
def import_json(cls, json_obj: Dict[str, str]) -> "Timerange":
|
||||
"""从json对象中恢复Timerange"""
|
||||
return cls(int(json_obj["start"]), int(json_obj["duration"]))
|
||||
|
||||
@property
|
||||
def end(self) -> int:
|
||||
"""结束时间, 单位为微秒"""
|
||||
return self.start + self.duration
|
||||
|
||||
def __eq__(self, other: object) -> bool:
|
||||
if not isinstance(other, Timerange):
|
||||
return False
|
||||
return self.start == other.start and self.duration == other.duration
|
||||
|
||||
def overlaps(self, other: "Timerange") -> bool:
|
||||
"""判断两个时间范围是否有重叠"""
|
||||
return not (self.end <= other.start or other.end <= self.start)
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Timerange(start={self.start}, duration={self.duration})"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"[start={self.start}, end={self.end}]"
|
||||
|
||||
def export_json(self) -> Dict[str, int]:
|
||||
return {"start": self.start, "duration": self.duration}
|
||||
|
||||
def trange(start: Union[str, float], duration: Union[str, float]) -> Timerange:
|
||||
"""Timerange的简便构造函数, 接受字符串或微秒数作为参数
|
||||
|
||||
支持类似 "1h52m3s" 或 "0.15s" 这样的格式
|
||||
|
||||
Args:
|
||||
start (Union[str, float]): 起始时间
|
||||
duration (Union[str, float]): 持续长度, 注意**不是结束时间**
|
||||
"""
|
||||
return Timerange(tim(start), tim(duration))
|
||||
|
||||
def srt_tstamp(srt_tstamp: str) -> int:
|
||||
"""解析srt中的时间戳字符串, 返回微秒数"""
|
||||
sec_str, ms_str = srt_tstamp.split(",")
|
||||
parts = sec_str.split(":") + [ms_str]
|
||||
|
||||
total_time = 0
|
||||
for value, factor in zip(parts, [3600*SEC, 60*SEC, SEC, 1000]):
|
||||
total_time += int(value) * factor
|
||||
return total_time
|
||||
212
pyJianYingDraft/track.py
Normal file
212
pyJianYingDraft/track.py
Normal file
@@ -0,0 +1,212 @@
|
||||
"""轨道类及其元数据"""
|
||||
|
||||
import uuid
|
||||
|
||||
from enum import Enum
|
||||
from typing import TypeVar, Generic, Type
|
||||
from typing import Dict, List, Any, Union
|
||||
from dataclasses import dataclass
|
||||
from abc import ABC, abstractmethod
|
||||
import pyJianYingDraft as draft
|
||||
|
||||
from .exceptions import SegmentOverlap
|
||||
from .segment import Base_segment
|
||||
from .video_segment import Video_segment, Sticker_segment
|
||||
from .audio_segment import Audio_segment
|
||||
from .text_segment import Text_segment
|
||||
from .effect_segment import Effect_segment, Filter_segment
|
||||
|
||||
@dataclass
|
||||
class Track_meta:
|
||||
"""与轨道类型关联的轨道元数据"""
|
||||
|
||||
segment_type: Union[Type[Video_segment], Type[Audio_segment],
|
||||
Type[Effect_segment], Type[Filter_segment],
|
||||
Type[Text_segment], Type[Sticker_segment], None]
|
||||
"""与轨道关联的片段类型"""
|
||||
render_index: int
|
||||
"""默认渲染顺序, 值越大越接近前景"""
|
||||
allow_modify: bool
|
||||
"""当被导入时, 是否允许修改"""
|
||||
|
||||
class Track_type(Enum):
|
||||
"""轨道类型枚举
|
||||
|
||||
变量名对应type属性, 值表示相应的轨道元数据
|
||||
"""
|
||||
|
||||
video = Track_meta(Video_segment, 0, True)
|
||||
audio = Track_meta(Audio_segment, 0, True)
|
||||
effect = Track_meta(Effect_segment, 10000, False)
|
||||
filter = Track_meta(Filter_segment, 11000, False)
|
||||
sticker = Track_meta(Sticker_segment, 14000, False)
|
||||
text = Track_meta(Text_segment, 15000, True) # 原本是14000, 避免与sticker冲突改为15000
|
||||
|
||||
adjust = Track_meta(None, 0, False)
|
||||
"""仅供导入时使用, 不要尝试新建此类型的轨道"""
|
||||
|
||||
@staticmethod
|
||||
def from_name(name: str) -> "Track_type":
|
||||
"""根据名称获取轨道类型枚举"""
|
||||
for t in Track_type:
|
||||
if t.name == name:
|
||||
return t
|
||||
raise ValueError("Invalid track type: %s" % name)
|
||||
|
||||
|
||||
class Base_track(ABC):
|
||||
"""轨道基类"""
|
||||
|
||||
track_type: Track_type
|
||||
"""轨道类型"""
|
||||
name: str
|
||||
"""轨道名称"""
|
||||
track_id: str
|
||||
"""轨道全局ID"""
|
||||
render_index: int
|
||||
"""渲染顺序, 值越大越接近前景"""
|
||||
|
||||
@abstractmethod
|
||||
def export_json(self) -> Dict[str, Any]: ...
|
||||
|
||||
Seg_type = TypeVar("Seg_type", bound=Base_segment)
|
||||
class Track(Base_track, Generic[Seg_type]):
|
||||
"""非模板模式下的轨道"""
|
||||
|
||||
mute: bool
|
||||
"""是否静音"""
|
||||
|
||||
segments: List[Seg_type]
|
||||
"""该轨道包含的片段列表"""
|
||||
|
||||
pending_keyframes: List[Dict[str, Any]]
|
||||
"""待处理的关键帧列表"""
|
||||
|
||||
def __init__(self, track_type: Track_type, name: str, render_index: int, mute: bool):
|
||||
self.track_type = track_type
|
||||
self.name = name
|
||||
self.track_id = uuid.uuid4().hex
|
||||
self.render_index = render_index
|
||||
|
||||
self.mute = mute
|
||||
self.segments = []
|
||||
self.pending_keyframes = []
|
||||
|
||||
def add_pending_keyframe(self, property_type: str, time: float, value: str) -> None:
|
||||
"""添加待处理的关键帧
|
||||
|
||||
Args:
|
||||
property_type: 关键帧属性类型
|
||||
time: 关键帧时间点(秒)
|
||||
value: 关键帧值
|
||||
"""
|
||||
self.pending_keyframes.append({
|
||||
"property_type": property_type,
|
||||
"time": time,
|
||||
"value": value
|
||||
})
|
||||
|
||||
def process_pending_keyframes(self) -> None:
|
||||
"""处理所有待处理的关键帧"""
|
||||
if not self.pending_keyframes:
|
||||
return
|
||||
|
||||
for kf_info in self.pending_keyframes:
|
||||
property_type = kf_info["property_type"]
|
||||
time = kf_info["time"]
|
||||
value = kf_info["value"]
|
||||
|
||||
try:
|
||||
# 找到时间点对应的片段(时间单位:微秒)
|
||||
target_time = int(time * 1000000) # 将秒转换为微秒
|
||||
target_segment = next(
|
||||
(segment for segment in self.segments
|
||||
if segment.target_timerange.start <= target_time <= segment.target_timerange.end),
|
||||
None
|
||||
)
|
||||
|
||||
if target_segment is None:
|
||||
print(f"警告:在轨道 {self.name} 的时间点 {time}s 找不到对应的片段,跳过此关键帧")
|
||||
continue
|
||||
|
||||
# 将属性类型字符串转换为枚举值
|
||||
property_enum = getattr(draft.Keyframe_property, property_type)
|
||||
|
||||
# 解析value值
|
||||
if property_type == 'alpha' and value.endswith('%'):
|
||||
float_value = float(value[:-1]) / 100
|
||||
elif property_type == 'volume' and value.endswith('%'):
|
||||
float_value = float(value[:-1]) / 100
|
||||
elif property_type == 'rotation' and value.endswith('deg'):
|
||||
float_value = float(value[:-3])
|
||||
elif property_type in ['saturation', 'contrast', 'brightness']:
|
||||
if value.startswith('+'):
|
||||
float_value = float(value[1:])
|
||||
elif value.startswith('-'):
|
||||
float_value = -float(value[1:])
|
||||
else:
|
||||
float_value = float(value)
|
||||
else:
|
||||
float_value = float(value)
|
||||
|
||||
# 计算时间偏移量
|
||||
offset_time = target_time - target_segment.target_timerange.start
|
||||
|
||||
# 添加关键帧
|
||||
target_segment.add_keyframe(property_enum, offset_time, float_value)
|
||||
print(f"成功添加关键帧: {property_type} 在 {time}s")
|
||||
except Exception as e:
|
||||
print(f"添加关键帧失败: {str(e)}")
|
||||
|
||||
# 清空待处理的关键帧
|
||||
self.pending_keyframes = []
|
||||
|
||||
@property
|
||||
def end_time(self) -> int:
|
||||
"""轨道结束时间, 微秒"""
|
||||
if len(self.segments) == 0:
|
||||
return 0
|
||||
return self.segments[-1].target_timerange.end
|
||||
|
||||
@property
|
||||
def accept_segment_type(self) -> Type[Seg_type]:
|
||||
"""返回该轨道允许的片段类型"""
|
||||
return self.track_type.value.segment_type # type: ignore
|
||||
|
||||
def add_segment(self, segment: Seg_type) -> "Track[Seg_type]":
|
||||
"""向轨道中添加一个片段, 添加的片段必须匹配轨道类型且不与现有片段重叠
|
||||
|
||||
Args:
|
||||
segment (Seg_type): 要添加的片段
|
||||
|
||||
Raises:
|
||||
`TypeError`: 新片段类型与轨道类型不匹配
|
||||
`SegmentOverlap`: 新片段与现有片段重叠
|
||||
"""
|
||||
if not isinstance(segment, self.accept_segment_type):
|
||||
raise TypeError("New segment (%s) is not of the same type as the track (%s)" % (type(segment), self.accept_segment_type))
|
||||
|
||||
# 检查片段是否重叠
|
||||
for seg in self.segments:
|
||||
if seg.overlaps(segment):
|
||||
raise SegmentOverlap("New segment overlaps with existing segment [start: {}, end: {}]"
|
||||
.format(segment.target_timerange.start, segment.target_timerange.end))
|
||||
|
||||
self.segments.append(segment)
|
||||
return self
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
# 为每个片段写入render_index
|
||||
segment_exports = [seg.export_json() for seg in self.segments]
|
||||
for seg in segment_exports:
|
||||
seg["render_index"] = self.render_index
|
||||
|
||||
return {
|
||||
"attribute": int(self.mute),
|
||||
"flag": 0,
|
||||
"id": self.track_id,
|
||||
"is_default_name": len(self.name) == 0,
|
||||
"name": self.name,
|
||||
"segments": segment_exports,
|
||||
"type": self.track_type.name
|
||||
}
|
||||
58
pyJianYingDraft/util.py
Normal file
58
pyJianYingDraft/util.py
Normal file
@@ -0,0 +1,58 @@
|
||||
"""辅助函数,主要与模板模式有关"""
|
||||
|
||||
import inspect
|
||||
|
||||
from typing import Union, Type
|
||||
from typing import List, Dict, Any
|
||||
|
||||
JsonExportable = Union[int, float, bool, str, List["JsonExportable"], Dict[str, "JsonExportable"]]
|
||||
|
||||
def provide_ctor_defaults(cls: Type) -> Dict[str, Any]:
|
||||
"""为构造函数提供默认值,以绕开构造函数的参数限制"""
|
||||
|
||||
signature = inspect.signature(cls.__init__)
|
||||
provided_defaults: Dict[str, Any] = {}
|
||||
|
||||
for name, param in signature.parameters.items():
|
||||
if name == 'self': continue
|
||||
if param.default is not inspect.Parameter.empty: continue
|
||||
|
||||
if param.annotation is int or param.annotation is float:
|
||||
provided_defaults[name] = 0
|
||||
elif param.annotation is str:
|
||||
provided_defaults[name] = ""
|
||||
elif param.annotation is bool:
|
||||
provided_defaults[name] = False
|
||||
else:
|
||||
raise ValueError(f"Unsupported parameter type: {param.annotation}")
|
||||
|
||||
return provided_defaults
|
||||
|
||||
def assign_attr_with_json(obj: object, attrs: List[str], json_data: Dict[str, Any]):
|
||||
"""根据json数据赋值给指定的对象属性
|
||||
|
||||
若有复杂类型,则尝试调用其`import_json`方法进行构造
|
||||
"""
|
||||
type_hints: Dict[str, Type] = {}
|
||||
for cls in obj.__class__.__mro__:
|
||||
if '__annotations__' in cls.__dict__:
|
||||
type_hints.update(cls.__annotations__)
|
||||
|
||||
for attr in attrs:
|
||||
if hasattr(type_hints[attr], 'import_json'):
|
||||
obj.__setattr__(attr, type_hints[attr].import_json(json_data[attr]))
|
||||
else:
|
||||
obj.__setattr__(attr, type_hints[attr](json_data[attr]))
|
||||
|
||||
def export_attr_to_json(obj: object, attrs: List[str]) -> Dict[str, JsonExportable]:
|
||||
"""将对象属性导出为json数据
|
||||
|
||||
若有复杂类型,则尝试调用其`export_json`方法进行导出
|
||||
"""
|
||||
json_data: Dict[str, Any] = {}
|
||||
for attr in attrs:
|
||||
if hasattr(getattr(obj, attr), 'export_json'):
|
||||
json_data[attr] = getattr(obj, attr).export_json()
|
||||
else:
|
||||
json_data[attr] = getattr(obj, attr)
|
||||
return json_data
|
||||
553
pyJianYingDraft/video_segment.py
Normal file
553
pyJianYingDraft/video_segment.py
Normal file
@@ -0,0 +1,553 @@
|
||||
"""定义视频片段及其相关类
|
||||
|
||||
包含图像调节设置、动画效果、特效、转场等相关类
|
||||
"""
|
||||
|
||||
import uuid
|
||||
from copy import deepcopy
|
||||
|
||||
from typing import Optional, Literal, Union, overload
|
||||
from typing import Dict, List, Tuple, Any
|
||||
|
||||
from pyJianYingDraft.metadata.capcut_effect_meta import CapCut_Video_character_effect_type, CapCut_Video_scene_effect_type
|
||||
from pyJianYingDraft.metadata.capcut_mask_meta import CapCut_Mask_type
|
||||
from settings import IS_CAPCUT_ENV
|
||||
|
||||
from .time_util import tim, Timerange
|
||||
from .segment import Visual_segment, Clip_settings
|
||||
from .local_materials import Video_material
|
||||
from .animation import Segment_animations, Video_animation
|
||||
|
||||
from .metadata import Effect_meta, Effect_param_instance
|
||||
from .metadata import Mask_meta, Mask_type, Filter_type, Transition_type, CapCut_Transition_type
|
||||
from .metadata import Intro_type, Outro_type, Group_animation_type
|
||||
from .metadata import CapCut_Intro_type, CapCut_Outro_type, CapCut_Group_animation_type
|
||||
from .metadata import Video_scene_effect_type, Video_character_effect_type
|
||||
|
||||
|
||||
class Mask:
|
||||
"""蒙版对象"""
|
||||
|
||||
mask_meta: Mask_meta
|
||||
"""蒙版元数据"""
|
||||
global_id: str
|
||||
"""蒙版全局id, 由程序自动生成"""
|
||||
|
||||
center_x: float
|
||||
"""蒙版中心x坐标, 以半素材宽为单位"""
|
||||
center_y: float
|
||||
"""蒙版中心y坐标, 以半素材高为单位"""
|
||||
width: float
|
||||
height: float
|
||||
aspect_ratio: float
|
||||
|
||||
rotation: float
|
||||
invert: bool
|
||||
feather: float
|
||||
"""羽化程度, 0-1"""
|
||||
round_corner: float
|
||||
"""矩形蒙版的圆角, 0-1"""
|
||||
|
||||
def __init__(self, mask_meta: Mask_meta,
|
||||
cx: float, cy: float, w: float, h: float,
|
||||
ratio: float, rot: float, inv: bool, feather: float, round_corner: float):
|
||||
self.mask_meta = mask_meta
|
||||
self.global_id = uuid.uuid4().hex
|
||||
|
||||
self.center_x, self.center_y = cx, cy
|
||||
self.width, self.height = w, h
|
||||
self.aspect_ratio = ratio
|
||||
|
||||
self.rotation = rot
|
||||
self.invert = inv
|
||||
self.feather = feather
|
||||
self.round_corner = round_corner
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"config": {
|
||||
"aspectRatio": self.aspect_ratio,
|
||||
"centerX": self.center_x,
|
||||
"centerY": self.center_y,
|
||||
"feather": self.feather,
|
||||
"height": self.height,
|
||||
"invert": self.invert,
|
||||
"rotation": self.rotation,
|
||||
"roundCorner": self.round_corner,
|
||||
"width": self.width
|
||||
},
|
||||
"category": "video",
|
||||
"category_id": "",
|
||||
"category_name": "",
|
||||
"id": self.global_id,
|
||||
"name": self.mask_meta.name,
|
||||
"platform": "all",
|
||||
"position_info": "",
|
||||
"resource_type": self.mask_meta.resource_type,
|
||||
"resource_id": self.mask_meta.resource_id,
|
||||
"type": "mask"
|
||||
# 不导出path字段
|
||||
}
|
||||
|
||||
class Video_effect:
|
||||
"""视频特效素材"""
|
||||
|
||||
name: str
|
||||
"""特效名称"""
|
||||
global_id: str
|
||||
"""特效全局id, 由程序自动生成"""
|
||||
effect_id: str
|
||||
"""某种特效id, 由剪映本身提供"""
|
||||
resource_id: str
|
||||
"""资源id, 由剪映本身提供"""
|
||||
|
||||
effect_type: Literal["video_effect", "face_effect"]
|
||||
apply_target_type: Literal[0, 2]
|
||||
"""应用目标类型, 0: 片段, 2: 全局"""
|
||||
|
||||
adjust_params: List[Effect_param_instance]
|
||||
|
||||
def __init__(self, effect_meta: Union[Video_scene_effect_type, Video_character_effect_type],
|
||||
params: Optional[List[Optional[float]]] = None, *,
|
||||
apply_target_type: Literal[0, 2] = 0):
|
||||
"""根据给定的特效元数据及参数列表构造一个视频特效对象, params的范围是0~100"""
|
||||
|
||||
self.name = effect_meta.value.name
|
||||
self.global_id = uuid.uuid4().hex
|
||||
self.effect_id = effect_meta.value.effect_id
|
||||
self.resource_id = effect_meta.value.resource_id
|
||||
self.adjust_params = []
|
||||
|
||||
if IS_CAPCUT_ENV:
|
||||
if isinstance(effect_meta, CapCut_Video_scene_effect_type):
|
||||
self.effect_type = "video_effect"
|
||||
elif isinstance(effect_meta, CapCut_Video_character_effect_type):
|
||||
self.effect_type = "face_effect"
|
||||
else:
|
||||
raise TypeError("Invalid effect meta type %s" % type(effect_meta))
|
||||
else:
|
||||
if isinstance(effect_meta, Video_scene_effect_type):
|
||||
self.effect_type = "video_effect"
|
||||
elif isinstance(effect_meta, Video_character_effect_type):
|
||||
self.effect_type = "face_effect"
|
||||
else:
|
||||
raise TypeError("Invalid effect meta type %s" % type(effect_meta))
|
||||
|
||||
self.apply_target_type = apply_target_type
|
||||
|
||||
self.adjust_params = effect_meta.value.parse_params(params)
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"adjust_params": [param.export_json() for param in self.adjust_params],
|
||||
"apply_target_type": self.apply_target_type,
|
||||
"apply_time_range": None,
|
||||
"category_id": "", # 一律设为空
|
||||
"category_name": "", # 一律设为空
|
||||
"common_keyframes": [],
|
||||
"disable_effect_faces": [],
|
||||
"effect_id": self.effect_id,
|
||||
"formula_id": "",
|
||||
"id": self.global_id,
|
||||
"name": self.name,
|
||||
"platform": "all",
|
||||
"render_index": 11000,
|
||||
"resource_id": self.resource_id,
|
||||
"source_platform": 0,
|
||||
"time_range": None,
|
||||
"track_render_index": 0,
|
||||
"type": self.effect_type,
|
||||
"value": 1.0,
|
||||
"version": ""
|
||||
# 不导出path、request_id和algorithm_artifact_path字段
|
||||
}
|
||||
|
||||
class Filter:
|
||||
"""滤镜素材"""
|
||||
|
||||
global_id: str
|
||||
"""滤镜全局id, 由程序自动生成"""
|
||||
|
||||
effect_meta: Effect_meta
|
||||
"""滤镜的元数据"""
|
||||
intensity: float
|
||||
"""滤镜强度(滤镜的唯一参数)"""
|
||||
|
||||
apply_target_type: Literal[0, 2]
|
||||
"""应用目标类型, 0: 片段, 2: 全局"""
|
||||
|
||||
def __init__(self, meta: Effect_meta, intensity: float, *,
|
||||
apply_target_type: Literal[0, 2] = 0):
|
||||
"""根据给定的滤镜元数据及强度构造滤镜素材对象"""
|
||||
|
||||
self.global_id = uuid.uuid4().hex
|
||||
self.effect_meta = meta
|
||||
self.intensity = intensity
|
||||
self.apply_target_type = apply_target_type
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"adjust_params": [],
|
||||
"algorithm_artifact_path": "",
|
||||
"apply_target_type": self.apply_target_type,
|
||||
"bloom_params": None,
|
||||
"category_id": "", # 一律设为空
|
||||
"category_name": "", # 一律设为空
|
||||
"color_match_info": {
|
||||
"source_feature_path": "",
|
||||
"target_feature_path": "",
|
||||
"target_image_path": ""
|
||||
},
|
||||
"effect_id": self.effect_meta.effect_id,
|
||||
"enable_skin_tone_correction": False,
|
||||
"exclusion_group": [],
|
||||
"face_adjust_params": [],
|
||||
"formula_id": "",
|
||||
"id": self.global_id,
|
||||
"intensity_key": "",
|
||||
"multi_language_current": "",
|
||||
"name": self.effect_meta.name,
|
||||
"panel_id": "",
|
||||
"platform": "all",
|
||||
"resource_id": self.effect_meta.resource_id,
|
||||
"source_platform": 1,
|
||||
"sub_type": "none",
|
||||
"time_range": None,
|
||||
"type": "filter",
|
||||
"value": self.intensity,
|
||||
"version": ""
|
||||
# 不导出path和request_id
|
||||
}
|
||||
|
||||
class Transition:
|
||||
"""转场对象"""
|
||||
|
||||
name: str
|
||||
"""转场名称"""
|
||||
global_id: str
|
||||
"""转场全局id, 由程序自动生成"""
|
||||
effect_id: str
|
||||
"""转场效果id, 由剪映本身提供"""
|
||||
resource_id: str
|
||||
"""资源id, 由剪映本身提供"""
|
||||
|
||||
duration: int
|
||||
"""转场持续时间, 单位为微秒"""
|
||||
is_overlap: bool
|
||||
"""是否与上一个片段重叠(?)"""
|
||||
|
||||
def __init__(self, effect_meta: Union[Transition_type, CapCut_Transition_type], duration: Optional[int] = None):
|
||||
"""根据给定的转场元数据及持续时间构造一个转场对象"""
|
||||
self.name = effect_meta.value.name
|
||||
self.global_id = uuid.uuid4().hex
|
||||
self.effect_id = effect_meta.value.effect_id
|
||||
self.resource_id = effect_meta.value.resource_id
|
||||
|
||||
self.duration = duration if duration is not None else effect_meta.value.default_duration
|
||||
self.is_overlap = effect_meta.value.is_overlap
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"category_id": "", # 一律设为空
|
||||
"category_name": "", # 一律设为空
|
||||
"duration": self.duration,
|
||||
"effect_id": self.effect_id,
|
||||
"id": self.global_id,
|
||||
"is_overlap": self.is_overlap,
|
||||
"name": self.name,
|
||||
"platform": "all",
|
||||
"resource_id": self.resource_id,
|
||||
"type": "transition"
|
||||
# 不导出path和request_id字段
|
||||
}
|
||||
|
||||
class BackgroundFilling:
|
||||
"""背景填充对象"""
|
||||
|
||||
global_id: str
|
||||
"""背景填充全局id, 由程序自动生成"""
|
||||
fill_type: Literal["canvas_blur", "canvas_color"]
|
||||
"""背景填充类型"""
|
||||
blur: float
|
||||
"""模糊程度, 0-1"""
|
||||
color: str
|
||||
"""背景颜色, 格式为'#RRGGBBAA'"""
|
||||
|
||||
def __init__(self, fill_type: Literal["canvas_blur", "canvas_color"], blur: float, color: str):
|
||||
self.global_id = uuid.uuid4().hex
|
||||
self.fill_type = fill_type
|
||||
self.blur = blur
|
||||
self.color = color
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
return {
|
||||
"id": self.global_id,
|
||||
"type": self.fill_type,
|
||||
"blur": self.blur,
|
||||
"color": self.color,
|
||||
"source_platform": 0,
|
||||
}
|
||||
|
||||
class Video_segment(Visual_segment):
|
||||
"""安放在轨道上的一个视频/图片片段"""
|
||||
|
||||
material_instance: Video_material
|
||||
"""素材实例"""
|
||||
material_size: Tuple[int, int]
|
||||
"""素材尺寸"""
|
||||
|
||||
effects: List[Video_effect]
|
||||
"""特效列表
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
filters: List[Filter]
|
||||
"""滤镜列表
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
mask: Optional[Mask]
|
||||
"""蒙版实例, 可能为空
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
transition: Optional[Transition]
|
||||
"""转场实例, 可能为空
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
background_filling: Optional[BackgroundFilling]
|
||||
"""背景填充实例, 可能为空
|
||||
|
||||
在放入轨道时自动添加到素材列表中
|
||||
"""
|
||||
|
||||
visible: Optional[bool]
|
||||
"""是否可见
|
||||
默认为True
|
||||
"""
|
||||
|
||||
# TODO: material参数接受path进行便捷构造
|
||||
def __init__(self, material: Video_material, target_timerange: Timerange, *,
|
||||
source_timerange: Optional[Timerange] = None, speed: Optional[float] = None, volume: float = 1.0,
|
||||
clip_settings: Optional[Clip_settings] = None):
|
||||
"""利用给定的视频/图片素材构建一个轨道片段, 并指定其时间信息及图像调节设置
|
||||
|
||||
Args:
|
||||
material (`Video_material`): 素材实例
|
||||
target_timerange (`Timerange`): 片段在轨道上的目标时间范围
|
||||
source_timerange (`Timerange`, optional): 截取的素材片段的时间范围, 默认从开头根据`speed`截取与`target_timerange`等长的一部分
|
||||
speed (`float`, optional): 播放速度, 默认为1.0. 此项与`source_timerange`同时指定时, 将覆盖`target_timerange`中的时长
|
||||
volume (`float`, optional): 音量, 默认为1.0
|
||||
clip_settings (`Clip_settings`, optional): 图像调节设置, 默认不作任何变换
|
||||
|
||||
Raises:
|
||||
`ValueError`: 指定的或计算出的`source_timerange`超出了素材的时长范围
|
||||
"""
|
||||
# if source_timerange is not None and speed is not None:
|
||||
# target_timerange = Timerange(target_timerange.start, round(source_timerange.duration / speed))
|
||||
# elif source_timerange is not None and speed is None:
|
||||
# speed = source_timerange.duration / target_timerange.duration
|
||||
# else: # source_timerange is None
|
||||
# speed = speed if speed is not None else 1.0
|
||||
# source_timerange = Timerange(0, round(target_timerange.duration * speed))
|
||||
|
||||
# if source_timerange.end > material.duration:
|
||||
# source_timerange = Timerange(source_timerange.start, material.duration - source_timerange.start)
|
||||
# # 重新计算目标时间范围
|
||||
# target_timerange = Timerange(target_timerange.start, round(source_timerange.duration / speed))
|
||||
|
||||
super().__init__(material.material_id, source_timerange, target_timerange, speed, volume, clip_settings=clip_settings)
|
||||
|
||||
self.material_instance = deepcopy(material)
|
||||
self.material_size = (material.width, material.height)
|
||||
self.effects = []
|
||||
self.filters = []
|
||||
self.transition = None
|
||||
self.mask = None
|
||||
self.background_filling = None
|
||||
|
||||
def add_animation(self, animation_type: Union[Intro_type, Outro_type, Group_animation_type, CapCut_Intro_type, CapCut_Outro_type, CapCut_Group_animation_type],
|
||||
duration: Optional[Union[int, str]] = None) -> "Video_segment":
|
||||
"""将给定的入场/出场/组合动画添加到此片段的动画列表中
|
||||
|
||||
Args:
|
||||
animation_type (`Intro_type`, `Outro_type`, or `Group_animation_type`): 动画类型
|
||||
duration (`int` or `str`, optional): 动画持续时间, 单位为微秒. 若传入字符串则会调用`tim()`函数进行解析.
|
||||
若不指定则使用动画类型定义的默认值. 理论上只适用于入场和出场动画.
|
||||
"""
|
||||
if duration is not None:
|
||||
duration = tim(duration)
|
||||
if (isinstance(animation_type, Intro_type) or isinstance(animation_type, CapCut_Intro_type)):
|
||||
start = 0
|
||||
duration = duration or animation_type.value.duration
|
||||
elif isinstance(animation_type, Outro_type) or isinstance(animation_type, CapCut_Outro_type):
|
||||
duration = duration or animation_type.value.duration
|
||||
start = self.target_timerange.duration - duration
|
||||
elif isinstance(animation_type, Group_animation_type) or isinstance(animation_type, CapCut_Group_animation_type):
|
||||
start = 0
|
||||
duration = duration or self.target_timerange.duration
|
||||
else:
|
||||
raise TypeError("Invalid animation type %s" % type(animation_type))
|
||||
|
||||
if self.animations_instance is None:
|
||||
self.animations_instance = Segment_animations()
|
||||
self.extra_material_refs.append(self.animations_instance.animation_id)
|
||||
|
||||
self.animations_instance.add_animation(Video_animation(animation_type, start, duration))
|
||||
|
||||
return self
|
||||
|
||||
def add_effect(self, effect_type: Union[Video_scene_effect_type, Video_character_effect_type],
|
||||
params: Optional[List[Optional[float]]] = None) -> "Video_segment":
|
||||
"""为视频片段添加一个作用于整个片段的特效
|
||||
|
||||
Args:
|
||||
effect_type (`Video_scene_effect_type` or `Video_character_effect_type`): 特效类型
|
||||
params (`List[Optional[float]]`, optional): 特效参数列表, 参数列表中未提供或为None的项使用默认值.
|
||||
参数取值范围(0~100)与剪映中一致. 某个特效类型有何参数以及具体参数顺序以枚举类成员的annotation为准.
|
||||
|
||||
Raises:
|
||||
`ValueError`: 提供的参数数量超过了该特效类型的参数数量, 或参数值超出范围.
|
||||
"""
|
||||
if params is not None and len(params) > len(effect_type.value.params):
|
||||
raise ValueError("为音频效果 %s 传入了过多的参数" % effect_type.value.name)
|
||||
|
||||
effect_inst = Video_effect(effect_type, params)
|
||||
self.effects.append(effect_inst)
|
||||
self.extra_material_refs.append(effect_inst.global_id)
|
||||
|
||||
return self
|
||||
|
||||
def add_filter(self, filter_type: Filter_type, intensity: float = 100.0) -> "Video_segment":
|
||||
"""为视频片段添加一个滤镜
|
||||
|
||||
Args:
|
||||
filter_type (`Filter_type`): 滤镜类型
|
||||
intensity (`float`, optional): 滤镜强度(0-100), 仅当所选滤镜能够调节强度时有效. 默认为100.
|
||||
"""
|
||||
filter_inst = Filter(filter_type.value, intensity / 100.0) # 转化为0~1范围
|
||||
self.filters.append(filter_inst)
|
||||
self.extra_material_refs.append(filter_inst.global_id)
|
||||
|
||||
return self
|
||||
|
||||
def add_mask(self, draft: "Script_file", mask_type: Union[Mask_type, CapCut_Mask_type], *, center_x: float = 0.0, center_y: float = 0.0, size: float = 0.5,
|
||||
rotation: float = 0.0, feather: float = 0.0, invert: bool = False,
|
||||
rect_width: Optional[float] = None, round_corner: Optional[float] = None) -> "Video_segment":
|
||||
"""为视频片段添加蒙版
|
||||
|
||||
Args:
|
||||
mask_type (`Mask_type`): 蒙版类型
|
||||
center_x (`float`, optional): 蒙版中心点X坐标(以素材的像素为单位), 默认设置在素材中心
|
||||
center_y (`float`, optional): 蒙版中心点Y坐标(以素材的像素为单位), 默认设置在素材中心
|
||||
size (`float`, optional): 蒙版的"主要尺寸"(镜面的可视部分高度/圆形直径/爱心高度等), 以占素材高度的比例表示, 默认为0.5
|
||||
rotation (`float`, optional): 蒙版顺时针旋转的**角度**, 默认不旋转
|
||||
feather (`float`, optional): 蒙版的羽化参数, 取值范围0~100, 默认无羽化
|
||||
invert (`bool`, optional): 是否反转蒙版, 默认不反转
|
||||
rect_width (`float`, optional): 矩形蒙版的宽度, 仅在蒙版类型为矩形时允许设置, 以占素材宽度的比例表示, 默认与`size`相同
|
||||
round_corner (`float`, optional): 矩形蒙版的圆角参数, 仅在蒙版类型为矩形时允许设置, 取值范围0~100, 默认为0
|
||||
|
||||
Raises:
|
||||
`ValueError`: 试图添加多个蒙版或不正确地设置了`rect_width`及`round_corner`
|
||||
"""
|
||||
|
||||
if self.mask is not None:
|
||||
raise ValueError("当前片段已有蒙版, 不能再添加新的蒙版")
|
||||
if (rect_width is not None or round_corner is not None) and (mask_type != Mask_type.矩形 and mask_type != CapCut_Mask_type.Rectangle):
|
||||
raise ValueError("`rect_width` 以及 `round_corner` 仅在蒙版类型为矩形时允许设置")
|
||||
if rect_width is None and (mask_type == Mask_type.矩形 or mask_type == CapCut_Mask_type.Rectangle):
|
||||
rect_width = size
|
||||
if round_corner is None:
|
||||
round_corner = 0
|
||||
|
||||
# 获取草稿的宽高,而不是使用素材的宽高
|
||||
draft_width = draft.width
|
||||
draft_height = draft.height
|
||||
|
||||
width = rect_width or size * draft_height * mask_type.value.default_aspect_ratio / draft_width
|
||||
self.mask = Mask(mask_type.value, center_x / (draft_width / 2), center_y / (draft_height / 2),
|
||||
w=width, h=size, ratio=mask_type.value.default_aspect_ratio,
|
||||
rot=rotation, inv=invert, feather=feather/100, round_corner=round_corner/100)
|
||||
self.extra_material_refs.append(self.mask.global_id)
|
||||
return self
|
||||
|
||||
def add_transition(self, transition_type: Union[Transition_type, CapCut_Transition_type], *, duration: Optional[Union[int, str]] = None) -> "Video_segment":
|
||||
"""为视频片段添加转场, 注意转场应当添加在**前面的**片段上
|
||||
|
||||
Args:
|
||||
transition_type (`Transition_type` or `CapCut_Transition_type`): 转场类型
|
||||
duration (`int` or `str`, optional): 转场持续时间, 单位为微秒. 若传入字符串则会调用`tim()`函数进行解析. 若不指定则使用转场类型定义的默认值.
|
||||
|
||||
Raises:
|
||||
`ValueError`: 试图添加多个转场.
|
||||
"""
|
||||
if self.transition is not None:
|
||||
raise ValueError("当前片段已有转场, 不能再添加新的转场")
|
||||
if isinstance(duration, str): duration = tim(duration)
|
||||
|
||||
self.transition = Transition(transition_type, duration)
|
||||
self.extra_material_refs.append(self.transition.global_id)
|
||||
return self
|
||||
|
||||
def add_background_filling(self, fill_type: Literal["blur", "color"], blur: float = 0.0625, color: str = "#00000000") -> "Video_segment":
|
||||
"""为视频片段添加背景填充
|
||||
|
||||
注意: 背景填充仅对底层视频轨道上的片段生效
|
||||
|
||||
Args:
|
||||
fill_type (`blur` or `color`): 填充类型, `blur`表示模糊, `color`表示颜色.
|
||||
blur (`float`, optional): 模糊程度, 0.0-1.0. 仅在`fill_type`为`blur`时有效. 剪映中的四档模糊数值分别为0.0625, 0.375, 0.75和1.0, 默认为0.0625.
|
||||
color (`str`, optional): 填充颜色, 格式为'#RRGGBBAA'. 仅在`fill_type`为`color`时有效.
|
||||
|
||||
Raises:
|
||||
`ValueError`: 当前片段已有背景填充效果或`fill_type`无效.
|
||||
"""
|
||||
if self.background_filling is not None:
|
||||
raise ValueError("当前片段已有背景填充效果")
|
||||
|
||||
if fill_type == "blur":
|
||||
self.background_filling = BackgroundFilling("canvas_blur", blur, color)
|
||||
elif fill_type == "color":
|
||||
self.background_filling = BackgroundFilling("canvas_color", blur, color)
|
||||
else:
|
||||
raise ValueError(f"无效的背景填充类型 {fill_type}")
|
||||
|
||||
self.extra_material_refs.append(self.background_filling.global_id)
|
||||
return self
|
||||
|
||||
def export_json(self) -> Dict[str, Any]:
|
||||
json_dict = super().export_json()
|
||||
json_dict.update({
|
||||
"hdr_settings": {"intensity": 1.0, "mode": 1, "nits": 1000},
|
||||
})
|
||||
return json_dict
|
||||
|
||||
class Sticker_segment(Visual_segment):
|
||||
"""安放在轨道上的一个贴纸片段"""
|
||||
|
||||
resource_id: str
|
||||
"""贴纸资源id"""
|
||||
|
||||
def __init__(self, resource_id: str, target_timerange: Timerange, *, clip_settings: Optional[Clip_settings] = None):
|
||||
"""根据贴纸resource_id构建一个贴纸片段, 并指定其时间信息及图像调节设置
|
||||
|
||||
片段创建完成后, 可通过`Script_file.add_segment`方法将其添加到轨道中
|
||||
|
||||
Args:
|
||||
resource_id (`str`): 贴纸resource_id, 可通过`Script_file.inspect_material`从模板中获取
|
||||
target_timerange (`Timerange`): 片段在轨道上的目标时间范围
|
||||
clip_settings (`Clip_settings`, optional): 图像调节设置, 默认不作任何变换
|
||||
"""
|
||||
super().__init__(uuid.uuid4().hex, None, target_timerange, 1.0, 1.0, clip_settings=clip_settings)
|
||||
self.resource_id = resource_id
|
||||
|
||||
def export_material(self) -> Dict[str, Any]:
|
||||
"""创建极简的贴纸素材对象, 以此不再单独定义贴纸素材类"""
|
||||
return {
|
||||
"id": self.material_id,
|
||||
"resource_id": self.resource_id,
|
||||
"sticker_id": self.resource_id,
|
||||
"source_platform": 1,
|
||||
"type": "sticker",
|
||||
}
|
||||
5
requirements.txt
Normal file
5
requirements.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
imageio
|
||||
psutil
|
||||
flask
|
||||
requests
|
||||
oss2
|
||||
721
save_draft_impl.py
Normal file
721
save_draft_impl.py
Normal file
@@ -0,0 +1,721 @@
|
||||
import os
|
||||
import re
|
||||
import pyJianYingDraft as draft
|
||||
import shutil
|
||||
from util import zip_draft, is_windows_path
|
||||
from oss import upload_to_oss
|
||||
from typing import Dict, Literal
|
||||
from draft_cache import DRAFT_CACHE
|
||||
from save_task_cache import DRAFT_TASKS, get_task_status, update_tasks_cache, update_task_field, increment_task_field, update_task_fields, create_task
|
||||
from downloader import download_audio, download_file, download_image, download_video
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
import imageio.v2 as imageio
|
||||
import subprocess
|
||||
import json
|
||||
from get_duration_impl import get_video_duration
|
||||
import uuid
|
||||
import threading
|
||||
from collections import OrderedDict
|
||||
import time
|
||||
import requests # Import requests for making HTTP calls
|
||||
import logging
|
||||
# 导入配置
|
||||
from settings import IS_CAPCUT_ENV, IS_UPLOAD_DRAFT
|
||||
|
||||
# --- 获取你的 Logger 实例 ---
|
||||
# 这里的名称必须和你在 app.py 中配置的 logger 名称一致
|
||||
logger = logging.getLogger('flask_video_generator')
|
||||
|
||||
# 定义任务状态枚举类型
|
||||
TaskStatus = Literal["initialized", "processing", "completed", "failed", "not_found"]
|
||||
|
||||
def build_asset_path(draft_folder: str, draft_id: str, asset_type: str, material_name: str) -> str:
|
||||
"""
|
||||
构建资源文件路径
|
||||
:param draft_folder: 草稿文件夹路径
|
||||
:param draft_id: 草稿ID
|
||||
:param asset_type: 资源类型(audio, image, video)
|
||||
:param material_name: 素材名称
|
||||
:return: 构建好的路径
|
||||
"""
|
||||
if is_windows_path(draft_folder):
|
||||
# Windows路径处理
|
||||
if os.name == 'nt': # 'nt' for Windows
|
||||
draft_real_path = os.path.join(draft_folder, draft_id, "assets", asset_type, material_name)
|
||||
else:
|
||||
windows_drive, windows_path = re.match(r'([a-zA-Z]:)(.*)', draft_folder).groups()
|
||||
parts = [p for p in windows_path.split('\\') if p]
|
||||
draft_real_path = os.path.join(windows_drive, *parts, draft_id, "assets", asset_type, material_name)
|
||||
# 规范化路径(确保分隔符一致)
|
||||
draft_real_path = draft_real_path.replace('/', '\\')
|
||||
else:
|
||||
# macOS/Linux路径处理
|
||||
draft_real_path = os.path.join(draft_folder, draft_id, "assets", asset_type, material_name)
|
||||
return draft_real_path
|
||||
|
||||
def save_draft_background(draft_id, draft_folder, task_id):
|
||||
"""后台保存草稿到OSS"""
|
||||
try:
|
||||
# 从全局缓存中获取草稿信息
|
||||
if draft_id not in DRAFT_CACHE:
|
||||
task_status = {
|
||||
"status": "failed",
|
||||
"message": f"草稿 {draft_id} 不存在于缓存中",
|
||||
"progress": 0,
|
||||
"completed_files": 0,
|
||||
"total_files": 0,
|
||||
"draft_url": ""
|
||||
}
|
||||
update_tasks_cache(task_id, task_status) # 使用新的缓存管理函数
|
||||
logger.error(f"草稿 {draft_id} 不存在于缓存中,任务 {task_id} 失败。")
|
||||
return
|
||||
|
||||
script = DRAFT_CACHE[draft_id]
|
||||
logger.info(f"成功从缓存获取草稿 {draft_id}。")
|
||||
|
||||
# 更新任务状态为处理中
|
||||
task_status = {
|
||||
"status": "processing",
|
||||
"message": "正在准备草稿文件",
|
||||
"progress": 0,
|
||||
"completed_files": 0,
|
||||
"total_files": 0,
|
||||
"draft_url": ""
|
||||
}
|
||||
update_tasks_cache(task_id, task_status) # 使用新的缓存管理函数
|
||||
logger.info(f"任务 {task_id} 状态更新为 'processing':正在准备草稿文件。")
|
||||
|
||||
# 删除可能已存在的draft_id文件夹
|
||||
if os.path.exists(draft_id):
|
||||
logger.warning(f"删除已存在的草稿文件夹 (当前工作目录): {draft_id}")
|
||||
shutil.rmtree(draft_id)
|
||||
|
||||
logger.info(f"开始保存草稿: {draft_id}")
|
||||
# 保存草稿
|
||||
draft_folder_for_duplicate = draft.Draft_folder("./")
|
||||
# 根据配置选择不同的模板目录
|
||||
template_dir = "template" if IS_CAPCUT_ENV else "template_jianying"
|
||||
draft_folder_for_duplicate.duplicate_as_template(template_dir, draft_id)
|
||||
|
||||
# 更新任务状态
|
||||
update_task_field(task_id, "message", "正在更新媒体文件元数据")
|
||||
update_task_field(task_id, "progress", 5)
|
||||
logger.info(f"任务 {task_id} 进度5%:正在更新媒体文件元数据。")
|
||||
|
||||
# 调用公共方法更新媒体文件元数据
|
||||
update_media_metadata(script, task_id)
|
||||
|
||||
# 收集下载任务
|
||||
download_tasks = []
|
||||
|
||||
# 收集音频下载任务
|
||||
audios = script.materials.audios
|
||||
if audios:
|
||||
for audio in audios:
|
||||
remote_url = audio.remote_url
|
||||
material_name = audio.material_name
|
||||
# 使用辅助函数构建路径
|
||||
if draft_folder:
|
||||
audio.replace_path = build_asset_path(draft_folder, draft_id, "audio", material_name)
|
||||
if not remote_url:
|
||||
logger.warning(f"音频文件 {material_name} 没有 remote_url,跳过下载。")
|
||||
continue
|
||||
|
||||
# 添加音频下载任务
|
||||
download_tasks.append({
|
||||
'type': 'audio',
|
||||
'func': download_file,
|
||||
'args': (remote_url, f"{draft_id}/assets/audio/{material_name}"),
|
||||
'material': audio
|
||||
})
|
||||
|
||||
# 收集视频和图片下载任务
|
||||
videos = script.materials.videos
|
||||
if videos:
|
||||
for video in videos:
|
||||
remote_url = video.remote_url
|
||||
material_name = video.material_name
|
||||
|
||||
if video.material_type == 'photo':
|
||||
# 使用辅助函数构建路径
|
||||
if draft_folder:
|
||||
video.replace_path = build_asset_path(draft_folder, draft_id, "image", material_name)
|
||||
if not remote_url:
|
||||
logger.warning(f"图片文件 {material_name} 没有 remote_url,跳过下载。")
|
||||
continue
|
||||
|
||||
# 添加图片下载任务
|
||||
download_tasks.append({
|
||||
'type': 'image',
|
||||
'func': download_file,
|
||||
'args': (remote_url, f"{draft_id}/assets/image/{material_name}"),
|
||||
'material': video
|
||||
})
|
||||
|
||||
elif video.material_type == 'video':
|
||||
# 使用辅助函数构建路径
|
||||
if draft_folder:
|
||||
video.replace_path = build_asset_path(draft_folder, draft_id, "video", material_name)
|
||||
if not remote_url:
|
||||
logger.warning(f"视频文件 {material_name} 没有 remote_url,跳过下载。")
|
||||
continue
|
||||
|
||||
# 添加视频下载任务
|
||||
download_tasks.append({
|
||||
'type': 'video',
|
||||
'func': download_file,
|
||||
'args': (remote_url, f"{draft_id}/assets/video/{material_name}"),
|
||||
'material': video
|
||||
})
|
||||
|
||||
update_task_field(task_id, "message", f"共收集到{len(download_tasks)}个下载任务")
|
||||
update_task_field(task_id, "progress", 10)
|
||||
logger.info(f"任务 {task_id} 进度10%:共收集到 {len(download_tasks)} 个下载任务。")
|
||||
|
||||
# 并发执行所有下载任务
|
||||
downloaded_paths = []
|
||||
completed_files = 0
|
||||
if download_tasks:
|
||||
logger.info(f"开始并发下载 {len(download_tasks)} 个文件...")
|
||||
|
||||
# 使用线程池并发下载,最大并发数为16
|
||||
with ThreadPoolExecutor(max_workers=16) as executor:
|
||||
# 提交所有下载任务
|
||||
future_to_task = {
|
||||
executor.submit(task['func'], *task['args']): task
|
||||
for task in download_tasks
|
||||
}
|
||||
|
||||
# 等待所有任务完成
|
||||
for future in as_completed(future_to_task):
|
||||
task = future_to_task[future]
|
||||
try:
|
||||
local_path = future.result()
|
||||
downloaded_paths.append(local_path)
|
||||
|
||||
# 更新任务状态 - 只更新已完成文件数
|
||||
completed_files += 1
|
||||
update_task_field(task_id, "completed_files", completed_files)
|
||||
task_status = get_task_status(task_id)
|
||||
completed = task_status["completed_files"]
|
||||
total = len(download_tasks)
|
||||
update_task_field(task_id, "total_files", total)
|
||||
# 下载部分占总进度的60%
|
||||
download_progress = 10 + int((completed / total) * 60)
|
||||
update_task_field(task_id, "progress", download_progress)
|
||||
update_task_field(task_id, "message", f"已下载 {completed}/{total} 个文件")
|
||||
|
||||
logger.info(f"任务 {task_id}:成功下载 {task['type']} 文件,进度 {download_progress}。")
|
||||
except Exception as e:
|
||||
logger.error(f"任务 {task_id}:下载 {task['type']} 文件, 失败: {str(e)}", exc_info=True)
|
||||
# 继续处理其他文件,不中断整个流程
|
||||
|
||||
logger.info(f"任务 {task_id}:并发下载完成,共下载 {len(downloaded_paths)} 个文件。")
|
||||
|
||||
# 更新任务状态 - 开始保存草稿信息
|
||||
update_task_field(task_id, "progress", 70)
|
||||
update_task_field(task_id, "message", "正在保存草稿信息")
|
||||
logger.info(f"任务 {task_id} 进度70%:正在保存草稿信息。")
|
||||
|
||||
script.dump(f"{draft_id}/draft_info.json")
|
||||
logger.info(f"草稿信息已保存到 {draft_id}/draft_info.json。")
|
||||
|
||||
draft_url = ""
|
||||
# 仅在 IS_UPLOAD_DRAFT 为 True 时上传草稿信息
|
||||
if IS_UPLOAD_DRAFT:
|
||||
# 更新任务状态 - 开始压缩草稿
|
||||
update_task_field(task_id, "progress", 80)
|
||||
update_task_field(task_id, "message", "正在压缩草稿文件")
|
||||
logger.info(f"任务 {task_id} 进度80%:正在压缩草稿文件。")
|
||||
|
||||
# 压缩整个草稿目录
|
||||
zip_path = zip_draft(draft_id)
|
||||
logger.info(f"草稿目录 {draft_id} 已压缩为 {zip_path}。")
|
||||
|
||||
# 更新任务状态 - 开始上传到OSS
|
||||
update_task_field(task_id, "progress", 90)
|
||||
update_task_field(task_id, "message", "正在上传到云存储")
|
||||
logger.info(f"任务 {task_id} 进度90%:正在上传到云存储。")
|
||||
|
||||
# 上传到OSS
|
||||
draft_url = upload_to_oss(zip_path)
|
||||
logger.info(f"草稿压缩包已上传到 OSS,URL: {draft_url}")
|
||||
update_task_field(task_id, "draft_url", draft_url)
|
||||
|
||||
# 清理临时文件
|
||||
if os.path.exists(draft_id):
|
||||
shutil.rmtree(draft_id)
|
||||
logger.info(f"已清理临时草稿文件夹: {draft_id}")
|
||||
|
||||
|
||||
# 更新任务状态 - 完成
|
||||
update_task_field(task_id, "status", "completed")
|
||||
update_task_field(task_id, "progress", 100)
|
||||
update_task_field(task_id, "message", "草稿制作完成")
|
||||
logger.info(f"任务 {task_id} 已完成,草稿URL: {draft_url}")
|
||||
return draft_url
|
||||
|
||||
except Exception as e:
|
||||
# 更新任务状态 - 失败
|
||||
update_task_fields(task_id,
|
||||
status="failed",
|
||||
message=f"保存草稿失败: {str(e)}")
|
||||
logger.error(f"保存草稿 {draft_id} 任务 {task_id} 失败: {str(e)}", exc_info=True)
|
||||
return ""
|
||||
|
||||
def query_task_status(task_id: str):
|
||||
return get_task_status(task_id)
|
||||
|
||||
def save_draft_impl(draft_id: str, draft_folder: str = None) -> Dict[str, str]:
|
||||
"""启动保存草稿的后台任务"""
|
||||
logger.info(f"接收到保存草稿请求:draft_id={draft_id}, draft_folder={draft_folder}")
|
||||
try:
|
||||
# 生成唯一的任务ID
|
||||
task_id = draft_id
|
||||
create_task(task_id)
|
||||
logger.info(f"任务 {task_id} 已创建。")
|
||||
|
||||
# 改为同步执行
|
||||
return {
|
||||
"success": True,
|
||||
"draft_url": save_draft_background(draft_id, draft_folder, task_id)
|
||||
}
|
||||
|
||||
# # 启动后台线程执行任务
|
||||
# thread = threading.Thread(
|
||||
# target=save_draft_background,
|
||||
# args=(draft_id, draft_folder, task_id)
|
||||
# )
|
||||
# thread.start()
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"启动保存草稿任务 {draft_id} 失败: {str(e)}", exc_info=True)
|
||||
return {
|
||||
"success": False,
|
||||
"error": str(e)
|
||||
}
|
||||
|
||||
def update_media_metadata(script, task_id=None):
|
||||
"""
|
||||
更新脚本中所有媒体文件的元数据(时长、宽高等)
|
||||
|
||||
:param script: 草稿脚本对象
|
||||
:param task_id: 可选的任务ID,用于更新任务状态
|
||||
:return: None
|
||||
"""
|
||||
# 处理音频文件元数据
|
||||
audios = script.materials.audios
|
||||
if not audios:
|
||||
logger.info("草稿中没有找到音频文件。")
|
||||
else:
|
||||
for audio in audios:
|
||||
remote_url = audio.remote_url
|
||||
material_name = audio.material_name
|
||||
if not remote_url:
|
||||
logger.warning(f"警告:音频文件 {material_name} 没有 remote_url,已跳过。")
|
||||
continue
|
||||
|
||||
try:
|
||||
video_command = [
|
||||
'ffprobe',
|
||||
'-v', 'error',
|
||||
'-select_streams', 'v:0',
|
||||
'-show_entries', 'stream=codec_type',
|
||||
'-of', 'json',
|
||||
remote_url
|
||||
]
|
||||
video_result = subprocess.check_output(video_command, stderr=subprocess.STDOUT)
|
||||
video_result_str = video_result.decode('utf-8')
|
||||
# 查找JSON开始位置(第一个'{')
|
||||
video_json_start = video_result_str.find('{')
|
||||
if video_json_start != -1:
|
||||
video_json_str = video_result_str[video_json_start:]
|
||||
video_info = json.loads(video_json_str)
|
||||
if 'streams' in video_info and len(video_info['streams']) > 0:
|
||||
logger.warning(f"警告:音频文件 {material_name} 包含视频轨道,已跳过其元数据更新。")
|
||||
continue
|
||||
except Exception as e:
|
||||
logger.error(f"检查音频 {material_name} 是否包含视频流时发生错误: {str(e)}", exc_info=True)
|
||||
|
||||
# 获取音频时长并设置
|
||||
try:
|
||||
duration_result = get_video_duration(remote_url)
|
||||
if duration_result["success"]:
|
||||
if task_id:
|
||||
update_task_field(task_id, "message", f"正在处理音频元数据: {material_name}")
|
||||
# 将秒转换为微秒
|
||||
audio.duration = int(duration_result["output"] * 1000000)
|
||||
logger.info(f"成功获取音频 {material_name} 时长: {duration_result['output']:.2f} 秒 ({audio.duration} 微秒)。")
|
||||
|
||||
# 更新使用该音频素材的所有片段的timerange
|
||||
for track_name, track in script.tracks.items():
|
||||
if track.track_type == draft.Track_type.audio:
|
||||
for segment in track.segments:
|
||||
if isinstance(segment, draft.Audio_segment) and segment.material_id == audio.material_id:
|
||||
# 获取当前设置
|
||||
current_target = segment.target_timerange
|
||||
current_source = segment.source_timerange
|
||||
speed = segment.speed.speed
|
||||
|
||||
# 如果source_timerange的结束时间超过了新的音频时长,则调整它
|
||||
if current_source.end > audio.duration or current_source.end <= 0:
|
||||
# 调整source_timerange以适应新的音频时长
|
||||
new_source_duration = audio.duration - current_source.start
|
||||
if new_source_duration <= 0:
|
||||
logger.warning(f"警告:音频片段 {segment.segment_id} 的起始时间 {current_source.start} 超出了音频时长 {audio.duration},将跳过此片段。")
|
||||
continue
|
||||
|
||||
# 更新source_timerange
|
||||
segment.source_timerange = draft.Timerange(current_source.start, new_source_duration)
|
||||
|
||||
# 根据新的source_timerange和speed更新target_timerange
|
||||
new_target_duration = int(new_source_duration / speed)
|
||||
segment.target_timerange = draft.Timerange(current_target.start, new_target_duration)
|
||||
|
||||
logger.info(f"已调整音频片段 {segment.segment_id} 的timerange以适应新的音频时长。")
|
||||
else:
|
||||
logger.warning(f"警告:无法获取音频 {material_name} 的时长: {duration_result['error']}。")
|
||||
except Exception as e:
|
||||
logger.error(f"获取音频 {material_name} 时长时发生错误: {str(e)}", exc_info=True)
|
||||
|
||||
# 处理视频和图片文件元数据
|
||||
videos = script.materials.videos
|
||||
if not videos:
|
||||
logger.info("草稿中没有找到视频或图片文件。")
|
||||
else:
|
||||
for video in videos:
|
||||
remote_url = video.remote_url
|
||||
material_name = video.material_name
|
||||
if not remote_url:
|
||||
logger.warning(f"警告:媒体文件 {material_name} 没有 remote_url,已跳过。")
|
||||
continue
|
||||
|
||||
if video.material_type == 'photo':
|
||||
# 使用imageio获取图片宽高并设置
|
||||
try:
|
||||
if task_id:
|
||||
update_task_field(task_id, "message", f"正在处理图片元数据: {material_name}")
|
||||
img = imageio.imread(remote_url)
|
||||
video.height, video.width = img.shape[:2]
|
||||
logger.info(f"成功设置图片 {material_name} 宽高: {video.width}x{video.height}。")
|
||||
except Exception as e:
|
||||
logger.error(f"设置图片 {material_name} 宽高失败: {str(e)},使用默认值 1920x1080。", exc_info=True)
|
||||
video.width = 1920
|
||||
video.height = 1080
|
||||
|
||||
elif video.material_type == 'video':
|
||||
# 获取视频时长和宽高信息
|
||||
try:
|
||||
if task_id:
|
||||
update_task_field(task_id, "message", f"正在处理视频元数据: {material_name}")
|
||||
# 使用ffprobe获取视频信息
|
||||
command = [
|
||||
'ffprobe',
|
||||
'-v', 'error',
|
||||
'-select_streams', 'v:0', # 选择第一个视频流
|
||||
'-show_entries', 'stream=width,height,duration',
|
||||
'-show_entries', 'format=duration',
|
||||
'-of', 'json',
|
||||
remote_url
|
||||
]
|
||||
result = subprocess.check_output(command, stderr=subprocess.STDOUT)
|
||||
result_str = result.decode('utf-8')
|
||||
# 查找JSON开始位置(第一个'{')
|
||||
json_start = result_str.find('{')
|
||||
if json_start != -1:
|
||||
json_str = result_str[json_start:]
|
||||
info = json.loads(json_str)
|
||||
|
||||
if 'streams' in info and len(info['streams']) > 0:
|
||||
stream = info['streams'][0]
|
||||
# 设置宽高
|
||||
video.width = int(stream.get('width', 0))
|
||||
video.height = int(stream.get('height', 0))
|
||||
logger.info(f"成功设置视频 {material_name} 宽高: {video.width}x{video.height}。")
|
||||
|
||||
# 设置时长
|
||||
# 优先使用流的duration,如果没有则使用格式的duration
|
||||
duration = stream.get('duration') or info['format'].get('duration', '0')
|
||||
video.duration = int(float(duration) * 1000000) # 转换为微秒
|
||||
logger.info(f"成功获取视频 {material_name} 时长: {float(duration):.2f} 秒 ({video.duration} 微秒)。")
|
||||
|
||||
# 更新使用该视频素材的所有片段的timerange
|
||||
for track_name, track in script.tracks.items():
|
||||
if track.track_type == draft.Track_type.video:
|
||||
for segment in track.segments:
|
||||
if isinstance(segment, draft.Video_segment) and segment.material_id == video.material_id:
|
||||
# 获取当前设置
|
||||
current_target = segment.target_timerange
|
||||
current_source = segment.source_timerange
|
||||
speed = segment.speed.speed
|
||||
|
||||
# 如果source_timerange的结束时间超过了新的音频时长,则调整它
|
||||
if current_source.end > video.duration or current_source.end <= 0:
|
||||
# 调整source_timerange以适应新的视频时长
|
||||
new_source_duration = video.duration - current_source.start
|
||||
if new_source_duration <= 0:
|
||||
logger.warning(f"警告:视频片段 {segment.segment_id} 的起始时间 {current_source.start} 超出了视频时长 {video.duration},将跳过此片段。")
|
||||
continue
|
||||
|
||||
# 更新source_timerange
|
||||
segment.source_timerange = draft.Timerange(current_source.start, new_source_duration)
|
||||
|
||||
# 根据新的source_timerange和speed更新target_timerange
|
||||
new_target_duration = int(new_source_duration / speed)
|
||||
segment.target_timerange = draft.Timerange(current_target.start, new_target_duration)
|
||||
|
||||
logger.info(f"已调整视频片段 {segment.segment_id} 的timerange以适应新的视频时长。")
|
||||
else:
|
||||
logger.warning(f"警告:无法获取视频 {material_name} 的流信息。")
|
||||
# 设置默认值
|
||||
video.width = 1920
|
||||
video.height = 1080
|
||||
else:
|
||||
logger.warning(f"警告:无法在ffprobe输出中找到JSON数据。")
|
||||
# 设置默认值
|
||||
video.width = 1920
|
||||
video.height = 1080
|
||||
except Exception as e:
|
||||
logger.error(f"获取视频 {material_name} 信息时发生错误: {str(e)},使用默认值 1920x1080。", exc_info=True)
|
||||
# 设置默认值
|
||||
video.width = 1920
|
||||
video.height = 1080
|
||||
|
||||
# 尝试单独获取时长
|
||||
try:
|
||||
duration_result = get_video_duration(remote_url)
|
||||
if duration_result["success"]:
|
||||
# 将秒转换为微秒
|
||||
video.duration = int(duration_result["output"] * 1000000)
|
||||
logger.info(f"成功获取视频 {material_name} 时长: {duration_result['output']:.2f} 秒 ({video.duration} 微秒)。")
|
||||
else:
|
||||
logger.warning(f"警告:无法获取视频 {material_name} 的时长: {duration_result['error']}。")
|
||||
except Exception as e2:
|
||||
logger.error(f"获取视频 {material_name} 时长时发生错误: {str(e2)}。", exc_info=True)
|
||||
|
||||
# 在更新完所有片段的timerange后,检查每个轨道中的片段是否有时间范围冲突,并删除冲突的后一个片段
|
||||
logger.info("检查轨道片段时间范围冲突...")
|
||||
for track_name, track in script.tracks.items():
|
||||
# 使用集合记录需要删除的片段索引
|
||||
to_remove = set()
|
||||
|
||||
# 检查所有片段之间的冲突
|
||||
for i in range(len(track.segments)):
|
||||
# 如果当前片段已经被标记为删除,则跳过
|
||||
if i in to_remove:
|
||||
continue
|
||||
|
||||
for j in range(len(track.segments)):
|
||||
# 跳过自身比较和已标记为删除的片段
|
||||
if i == j or j in to_remove:
|
||||
continue
|
||||
|
||||
# 检查是否有冲突
|
||||
if track.segments[i].overlaps(track.segments[j]):
|
||||
# 总是保留索引较小的片段(先添加的片段)
|
||||
later_index = max(i, j)
|
||||
logger.warning(f"轨道 {track_name} 中的片段 {track.segments[min(i, j)].segment_id} 和 {track.segments[later_index].segment_id} 时间范围冲突,删除后一个片段")
|
||||
to_remove.add(later_index)
|
||||
|
||||
# 从后向前删除标记的片段,避免索引变化问题
|
||||
for index in sorted(to_remove, reverse=True):
|
||||
track.segments.pop(index)
|
||||
|
||||
# 在更新完所有片段的timerange后,重新计算脚本的总时长
|
||||
max_duration = 0
|
||||
for track_name, track in script.tracks.items():
|
||||
for segment in track.segments:
|
||||
max_duration = max(max_duration, segment.end)
|
||||
script.duration = max_duration
|
||||
logger.info(f"更新脚本总时长为: {script.duration} 微秒。")
|
||||
|
||||
# 处理所有轨道中待添加的关键帧
|
||||
logger.info("处理待添加的关键帧...")
|
||||
for track_name, track in script.tracks.items():
|
||||
if hasattr(track, 'pending_keyframes') and track.pending_keyframes:
|
||||
logger.info(f"处理轨道 {track_name} 中的 {len(track.pending_keyframes)} 个待添加关键帧...")
|
||||
track.process_pending_keyframes()
|
||||
logger.info(f"轨道 {track_name} 中的待添加关键帧已处理完成。")
|
||||
|
||||
def query_script_impl(draft_id: str, force_update: bool = True):
|
||||
"""
|
||||
查询草稿脚本对象,可选择是否强制刷新媒体元数据
|
||||
|
||||
:param draft_id: 草稿ID
|
||||
:param force_update: 是否强制刷新媒体元数据,默认为True
|
||||
:return: 脚本对象
|
||||
"""
|
||||
# 从全局缓存中获取草稿信息
|
||||
if draft_id not in DRAFT_CACHE:
|
||||
logger.warning(f"草稿 {draft_id} 不存在于缓存中。")
|
||||
return None
|
||||
|
||||
script = DRAFT_CACHE[draft_id]
|
||||
logger.info(f"从缓存中获取草稿 {draft_id}。")
|
||||
|
||||
# 如果force_update为True,则强制刷新媒体元数据
|
||||
if force_update:
|
||||
logger.info(f"强制刷新草稿 {draft_id} 的媒体元数据。")
|
||||
update_media_metadata(script)
|
||||
|
||||
# 返回脚本对象
|
||||
return script
|
||||
|
||||
def download_script(draft_id: str, draft_folder: str = None, script_data: Dict = None) -> Dict[str, str]:
|
||||
"""
|
||||
Downloads the draft script and its associated media assets.
|
||||
|
||||
This function fetches the script object from a remote API,
|
||||
then iterates through its materials (audios, videos, images)
|
||||
to download them to the specified draft folder. It also updates
|
||||
task status and progress throughout the process.
|
||||
|
||||
:param draft_id: The ID of the draft to download.
|
||||
:param draft_folder: The base folder where the draft's assets will be stored.
|
||||
If None, assets will be stored directly under a folder named
|
||||
after the draft_id in the current working directory.
|
||||
:return: A dictionary indicating success and, if successful, the URL where the draft
|
||||
would eventually be saved (though this function primarily focuses on download).
|
||||
If failed, it returns an error message.
|
||||
"""
|
||||
|
||||
logger.info(f"开始下载草稿: {draft_id} 到文件夹: {draft_folder}")
|
||||
# 把模版复制到目标目录下
|
||||
template_path = os.path.join("./", 'template') if IS_CAPCUT_ENV else os.path.join("./", 'template_jianying')
|
||||
new_draft_path = os.path.join(draft_folder, draft_id)
|
||||
if os.path.exists(new_draft_path):
|
||||
logger.warning(f"删除已存在的草稿目标文件夹: {new_draft_path}")
|
||||
shutil.rmtree(new_draft_path)
|
||||
|
||||
# 复制草稿文件夹
|
||||
shutil.copytree(template_path, new_draft_path)
|
||||
|
||||
try:
|
||||
# 1. Fetch the script from the remote endpoint
|
||||
if script_data is None:
|
||||
query_url = "https://cut-jianying-vdvswivepm.cn-hongkong.fcapp.run/query_script"
|
||||
headers = {"Content-Type": "application/json"}
|
||||
payload = {"draft_id": draft_id}
|
||||
|
||||
logger.info(f"尝试从 {query_url} 获取草稿 ID: {draft_id} 的脚本。")
|
||||
response = requests.post(query_url, headers=headers, json=payload)
|
||||
response.raise_for_status() # Raise an exception for HTTP errors (4xx or 5xx)
|
||||
|
||||
script_data = json.loads(response.json().get('output'))
|
||||
logger.info(f"成功获取草稿 {draft_id} 的脚本数据。")
|
||||
else:
|
||||
logger.info(f"使用传入的 script_data,跳过远程获取。")
|
||||
|
||||
# 收集下载任务
|
||||
download_tasks = []
|
||||
|
||||
# 收集音频下载任务
|
||||
audios = script_data.get('materials',{}).get('audios',[])
|
||||
if audios:
|
||||
for audio in audios:
|
||||
remote_url = audio['remote_url']
|
||||
material_name = audio['name']
|
||||
# 使用辅助函数构建路径
|
||||
if draft_folder:
|
||||
audio['path']=build_asset_path(draft_folder, draft_id, "audio", material_name)
|
||||
logger.debug(f"音频 {material_name} 的本地路径: {audio['path']}")
|
||||
if not remote_url:
|
||||
logger.warning(f"音频文件 {material_name} 没有 remote_url,跳过下载。")
|
||||
continue
|
||||
|
||||
# 添加音频下载任务
|
||||
download_tasks.append({
|
||||
'type': 'audio',
|
||||
'func': download_file,
|
||||
'args': (remote_url, audio['path']),
|
||||
'material': audio
|
||||
})
|
||||
|
||||
# 收集视频和图片下载任务
|
||||
videos = script_data['materials']['videos']
|
||||
if videos:
|
||||
for video in videos:
|
||||
remote_url = video['remote_url']
|
||||
material_name = video['material_name']
|
||||
|
||||
if video['type'] == 'photo':
|
||||
# 使用辅助函数构建路径
|
||||
if draft_folder:
|
||||
video['path'] = build_asset_path(draft_folder, draft_id, "image", material_name)
|
||||
if not remote_url:
|
||||
logger.warning(f"图片文件 {material_name} 没有 remote_url,跳过下载。")
|
||||
continue
|
||||
|
||||
# 添加图片下载任务
|
||||
download_tasks.append({
|
||||
'type': 'image',
|
||||
'func': download_file,
|
||||
'args': (remote_url, video['path']),
|
||||
'material': video
|
||||
})
|
||||
|
||||
elif video['type'] == 'video':
|
||||
# 使用辅助函数构建路径
|
||||
if draft_folder:
|
||||
video['path'] = build_asset_path(draft_folder, draft_id, "video", material_name)
|
||||
if not remote_url:
|
||||
logger.warning(f"视频文件 {material_name} 没有 remote_url,跳过下载。")
|
||||
continue
|
||||
|
||||
# 添加视频下载任务
|
||||
download_tasks.append({
|
||||
'type': 'video',
|
||||
'func': download_file,
|
||||
'args': (remote_url, video['path']),
|
||||
'material': video
|
||||
})
|
||||
|
||||
# 并发执行所有下载任务
|
||||
downloaded_paths = []
|
||||
completed_files = 0
|
||||
if download_tasks:
|
||||
logger.info(f"开始并发下载 {len(download_tasks)} 个文件...")
|
||||
|
||||
# 使用线程池并发下载,最大并发数为16
|
||||
with ThreadPoolExecutor(max_workers=16) as executor:
|
||||
# 提交所有下载任务
|
||||
future_to_task = {
|
||||
executor.submit(task['func'], *task['args']): task
|
||||
for task in download_tasks
|
||||
}
|
||||
|
||||
# 等待所有任务完成
|
||||
for future in as_completed(future_to_task):
|
||||
task = future_to_task[future]
|
||||
try:
|
||||
local_path = future.result()
|
||||
downloaded_paths.append(local_path)
|
||||
|
||||
# 更新任务状态 - 只更新已完成文件数
|
||||
completed_files += 1
|
||||
logger.info(f"已下载 {completed_files}/{len(download_tasks)} 个文件。")
|
||||
except Exception as e:
|
||||
logger.error(f"下载 {task['type']} 文件 {task['args'][0]} 失败: {str(e)}", exc_info=True)
|
||||
logger.error("下载失败。")
|
||||
# 继续处理其他文件,不中断整个流程
|
||||
|
||||
logger.info(f"并发下载完成,共下载 {len(downloaded_paths)} 个文件。")
|
||||
|
||||
"""将草稿文件内容写入文件"""
|
||||
with open(f"{draft_folder}/{draft_id}/draft_info.json", "w", encoding="utf-8") as f:
|
||||
f.write(json.dumps(script_data))
|
||||
logger.info(f"草稿已保存。")
|
||||
|
||||
# No draft_url for download, but return success
|
||||
return {"success": True, "message": f"Draft {draft_id} and its assets downloaded successfully"}
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
logger.error(f"API 请求失败: {e}", exc_info=True)
|
||||
return {"success": False, "error": f"Failed to fetch script from API: {str(e)}"}
|
||||
except Exception as e:
|
||||
logger.error(f"下载过程中发生意外错误: {e}", exc_info=True)
|
||||
return {"success": False, "error": f"An unexpected error occurred: {str(e)}"}
|
||||
|
||||
if __name__ == "__main__":
|
||||
print('hello')
|
||||
download_script("dfd_cat_1751012163_a7e8c315",'/Users/sunguannan/Movies/JianyingPro/User Data/Projects/com.lveditor.draft')
|
||||
142
save_task_cache.py
Normal file
142
save_task_cache.py
Normal file
@@ -0,0 +1,142 @@
|
||||
from collections import OrderedDict
|
||||
import threading
|
||||
from typing import Dict, Any
|
||||
|
||||
# 使用OrderedDict实现LRU缓存,限制最大数量为1000
|
||||
DRAFT_TASKS: Dict[str, dict] = OrderedDict() # 使用 Dict 进行类型提示
|
||||
MAX_TASKS_CACHE_SIZE = 1000
|
||||
|
||||
|
||||
def update_tasks_cache(task_id: str, task_status: dict) -> None:
|
||||
"""更新任务状态LRU缓存
|
||||
|
||||
:param task_id: 任务ID
|
||||
:param task_status: 任务状态信息字典
|
||||
"""
|
||||
|
||||
if task_id in DRAFT_TASKS:
|
||||
# 如果键存在,删除旧的项
|
||||
DRAFT_TASKS.pop(task_id)
|
||||
elif len(DRAFT_TASKS) >= MAX_TASKS_CACHE_SIZE:
|
||||
# 如果缓存已满,删除最久未使用的项(第一个项)
|
||||
DRAFT_TASKS.popitem(last=False)
|
||||
# 添加新项到末尾(最近使用)
|
||||
DRAFT_TASKS[task_id] = task_status
|
||||
|
||||
def update_task_field(task_id: str, field: str, value: Any) -> None:
|
||||
"""更新任务状态中的单个字段
|
||||
|
||||
:param task_id: 任务ID
|
||||
:param field: 要更新的字段名
|
||||
:param value: 字段的新值
|
||||
"""
|
||||
if task_id in DRAFT_TASKS:
|
||||
# 复制当前状态,修改指定字段,然后更新缓存
|
||||
task_status = DRAFT_TASKS[task_id].copy()
|
||||
task_status[field] = value
|
||||
# 删除旧项并添加更新后的项
|
||||
DRAFT_TASKS.pop(task_id)
|
||||
DRAFT_TASKS[task_id] = task_status
|
||||
else:
|
||||
# 如果任务不存在,创建一个默认状态并设置指定字段
|
||||
task_status = {
|
||||
"status": "initialized",
|
||||
"message": "任务已初始化",
|
||||
"progress": 0,
|
||||
"completed_files": 0,
|
||||
"total_files": 0,
|
||||
"draft_url": ""
|
||||
}
|
||||
task_status[field] = value
|
||||
# 如果缓存已满,删除最久未使用的项
|
||||
if len(DRAFT_TASKS) >= MAX_TASKS_CACHE_SIZE:
|
||||
DRAFT_TASKS.popitem(last=False)
|
||||
# 添加新项
|
||||
DRAFT_TASKS[task_id] = task_status
|
||||
|
||||
def update_task_fields(task_id: str, **fields) -> None:
|
||||
"""更新任务状态中的多个字段
|
||||
|
||||
:param task_id: 任务ID
|
||||
:param fields: 要更新的字段及其值,以关键字参数形式提供
|
||||
"""
|
||||
if task_id in DRAFT_TASKS:
|
||||
# 复制当前状态,修改指定字段,然后更新缓存
|
||||
task_status = DRAFT_TASKS[task_id].copy()
|
||||
for field, value in fields.items():
|
||||
task_status[field] = value
|
||||
# 删除旧项并添加更新后的项
|
||||
DRAFT_TASKS.pop(task_id)
|
||||
DRAFT_TASKS[task_id] = task_status
|
||||
else:
|
||||
# 如果任务不存在,创建一个默认状态并设置指定字段
|
||||
task_status = {
|
||||
"status": "initialized",
|
||||
"message": "任务已初始化",
|
||||
"progress": 0,
|
||||
"completed_files": 0,
|
||||
"total_files": 0,
|
||||
"draft_url": ""
|
||||
}
|
||||
for field, value in fields.items():
|
||||
task_status[field] = value
|
||||
# 如果缓存已满,删除最久未使用的项
|
||||
if len(DRAFT_TASKS) >= MAX_TASKS_CACHE_SIZE:
|
||||
DRAFT_TASKS.popitem(last=False)
|
||||
# 添加新项
|
||||
DRAFT_TASKS[task_id] = task_status
|
||||
|
||||
def increment_task_field(task_id: str, field: str, increment: int = 1) -> None:
|
||||
"""增加任务状态中的数值字段
|
||||
|
||||
:param task_id: 任务ID
|
||||
:param field: 要增加的字段名
|
||||
:param increment: 增加的值,默认为1
|
||||
"""
|
||||
if task_id in DRAFT_TASKS:
|
||||
# 复制当前状态,增加指定字段,然后更新缓存
|
||||
task_status = DRAFT_TASKS[task_id].copy()
|
||||
if field in task_status and isinstance(task_status[field], (int, float)):
|
||||
task_status[field] += increment
|
||||
else:
|
||||
task_status[field] = increment
|
||||
# 删除旧项并添加更新后的项
|
||||
DRAFT_TASKS.pop(task_id)
|
||||
DRAFT_TASKS[task_id] = task_status
|
||||
|
||||
def get_task_status(task_id: str) -> dict:
|
||||
"""获取任务状态
|
||||
|
||||
:param task_id: 任务ID
|
||||
:return: 任务状态信息字典
|
||||
"""
|
||||
task_status = DRAFT_TASKS.get(task_id, {
|
||||
"status": "not_found",
|
||||
"message": "任务不存在",
|
||||
"progress": 0,
|
||||
"completed_files": 0,
|
||||
"total_files": 0,
|
||||
"draft_url": ""
|
||||
})
|
||||
|
||||
# 如果找到了任务,更新其在LRU缓存中的位置
|
||||
if task_id in DRAFT_TASKS:
|
||||
# 先删除,再添加到末尾,实现LRU更新
|
||||
update_tasks_cache(task_id, task_status)
|
||||
|
||||
return task_status
|
||||
|
||||
def create_task(task_id: str) -> None:
|
||||
"""创建新任务并初始化状态
|
||||
|
||||
:param task_id: 任务ID
|
||||
"""
|
||||
task_status = {
|
||||
"status": "initialized",
|
||||
"message": "任务已初始化",
|
||||
"progress": 0,
|
||||
"completed_files": 0,
|
||||
"total_files": 0,
|
||||
"draft_url": ""
|
||||
}
|
||||
update_tasks_cache(task_id, task_status)
|
||||
36
settings/__init__.py
Normal file
36
settings/__init__.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""
|
||||
配置包入口,导出所有配置
|
||||
"""
|
||||
|
||||
# 从local模块导入所有配置,local模块已经导入了env和base模块的配置
|
||||
from .local import *
|
||||
|
||||
__all__ = [
|
||||
"IS_CAPCUT_ENV",
|
||||
"API_KEYS",
|
||||
"MODEL_CONFIG",
|
||||
"PURCHASE_LINKS",
|
||||
"LICENSE_CONFIG"
|
||||
]
|
||||
|
||||
# 提供一个获取平台信息的辅助函数
|
||||
def get_platform_info():
|
||||
"""
|
||||
获取平台信息,用于script_file.py中的dumps方法,cap_cut需要返回platform信息
|
||||
|
||||
Returns:
|
||||
dict: 平台信息字典
|
||||
"""
|
||||
if not IS_CAPCUT_ENV:
|
||||
return None
|
||||
|
||||
return {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
}
|
||||
55
settings/local.py
Normal file
55
settings/local.py
Normal file
@@ -0,0 +1,55 @@
|
||||
"""
|
||||
本地配置模块,用于从本地配置文件中加载配置
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
|
||||
# 配置文件路径
|
||||
CONFIG_FILE_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "config.json")
|
||||
|
||||
# 默认配置
|
||||
IS_CAPCUT_ENV = True
|
||||
|
||||
# 默认域名配置
|
||||
DRAFT_DOMAIN = "https://www.install-ai-guider.top"
|
||||
|
||||
# 默认预览路由
|
||||
PREVIEW_ROUTER = "/draft/downloader"
|
||||
|
||||
# 是否上传草稿文件
|
||||
IS_UPLOAD_DRAFT = False
|
||||
|
||||
# 尝试加载本地配置文件
|
||||
if os.path.exists(CONFIG_FILE_PATH):
|
||||
try:
|
||||
with open(CONFIG_FILE_PATH, "r", encoding="utf-8") as f:
|
||||
local_config = json.load(f)
|
||||
|
||||
# 更新是否是国际版
|
||||
if "is_capcut_env" in local_config:
|
||||
IS_CAPCUT_ENV = local_config["is_capcut_env"]
|
||||
|
||||
# 更新域名配置
|
||||
if "draft_domain" in local_config:
|
||||
DRAFT_DOMAIN = local_config["draft_domain"]
|
||||
|
||||
# 更新预览路由
|
||||
if "preview_router" in local_config:
|
||||
PREVIEW_ROUTER = local_config["preview_router"]
|
||||
|
||||
# 更新是否上传草稿文件
|
||||
if "is_upload_draft" in local_config:
|
||||
IS_UPLOAD_DRAFT = local_config["is_upload_draft"]
|
||||
|
||||
# 更新OSS配置
|
||||
if "oss_config" in local_config:
|
||||
OSS_CONFIG = local_config["oss_config"]
|
||||
|
||||
# 更新MP4 OSS配置
|
||||
if "mp4_oss_config" in local_config:
|
||||
MP4_OSS_CONFIG = local_config["mp4_oss_config"]
|
||||
|
||||
except (json.JSONDecodeError, IOError):
|
||||
# 配置文件加载失败,使用默认配置
|
||||
pass
|
||||
1
template/attachment_editing.json
Normal file
1
template/attachment_editing.json
Normal file
@@ -0,0 +1 @@
|
||||
{"editing_draft":{"ai_remove_filter_words":{"enter_source":"","right_id":""},"ai_shorts_info":{"report_params":"","type":0},"digital_human_template_to_video_info":{"has_upload_material":false,"template_type":0},"draft_used_recommend_function":"","edit_type":0,"eye_correct_enabled_multi_face_time":0,"has_adjusted_render_layer":false,"is_open_expand_player":false,"is_use_adjust":false,"is_use_edit_multi_camera":false,"is_use_lock_object":false,"is_use_loudness_unify":false,"is_use_retouch_face":false,"is_use_smart_adjust_color":false,"is_use_smart_motion":false,"is_use_text_to_audio":false,"material_edit_session":{"material_edit_info":[],"session_id":"","session_time":0},"profile_entrance_type":"","publish_enter_from":"","publish_type":"","single_function_type":0,"text_convert_case_types":[],"version":"1.0.0","video_recording_create_draft":""}}
|
||||
1
template/attachment_pc_common.json
Normal file
1
template/attachment_pc_common.json
Normal file
@@ -0,0 +1 @@
|
||||
{"ai_packaging_infos":[],"ai_packaging_report_info":{"caption_id_list":[],"commercial_material":"","material_source":"","method":"","page_from":"","style":"","task_id":"","text_style":"","tos_id":"","video_category":""},"broll":{"ai_packaging_infos":[],"ai_packaging_report_info":{"caption_id_list":[],"commercial_material":"","material_source":"","method":"","page_from":"","style":"","task_id":"","text_style":"","tos_id":"","video_category":""}},"commercial_music_category_ids":[],"pc_feature_flag":0,"recognize_tasks":[],"reference_lines_config":{"horizontal_lines":[],"is_lock":false,"is_visible":false,"vertical_lines":[]},"safe_area_type":0,"template_item_infos":[],"unlock_template_ids":[]}
|
||||
1
template/common_attachment/aigc_aigc_generate.json
Normal file
1
template/common_attachment/aigc_aigc_generate.json
Normal file
@@ -0,0 +1 @@
|
||||
{"aigc_aigc_generate":{"aigc_generate_segment_list":[],"version":"1.0.0"}}
|
||||
1
template/common_attachment/attachment_script_video.json
Normal file
1
template/common_attachment/attachment_script_video.json
Normal file
@@ -0,0 +1 @@
|
||||
{"script_video":{"attachment_valid":false,"language":"","overdub_recover":[],"overdub_sentence_ids":[],"parts":[],"sync_subtitle":false,"translate_segments":[],"translate_type":"","version":"1.0.0"}}
|
||||
1
template/draft_agency_config.json
Normal file
1
template/draft_agency_config.json
Normal file
@@ -0,0 +1 @@
|
||||
{"is_auto_agency_enabled":false,"is_auto_agency_popup":false,"is_single_agency_mode":false,"marterials":null,"use_converter":false,"video_resolution":720}
|
||||
0
template/draft_biz_config.json
Normal file
0
template/draft_biz_config.json
Normal file
278
template/draft_info.json
Normal file
278
template/draft_info.json
Normal file
@@ -0,0 +1,278 @@
|
||||
{
|
||||
"canvas_config": {
|
||||
"background": null,
|
||||
"height": 1080,
|
||||
"ratio": "original",
|
||||
"width": 1920
|
||||
},
|
||||
"color_space": -1,
|
||||
"config": {
|
||||
"adjust_max_index": 1,
|
||||
"attachment_info": [
|
||||
|
||||
],
|
||||
"combination_max_index": 1,
|
||||
"export_range": null,
|
||||
"extract_audio_last_index": 1,
|
||||
"lyrics_recognition_id": "",
|
||||
"lyrics_sync": true,
|
||||
"lyrics_taskinfo": [
|
||||
|
||||
],
|
||||
"maintrack_adsorb": true,
|
||||
"material_save_mode": 0,
|
||||
"multi_language_current": "none",
|
||||
"multi_language_list": [
|
||||
|
||||
],
|
||||
"multi_language_main": "none",
|
||||
"multi_language_mode": "none",
|
||||
"original_sound_last_index": 1,
|
||||
"record_audio_last_index": 1,
|
||||
"sticker_max_index": 1,
|
||||
"subtitle_keywords_config": null,
|
||||
"subtitle_recognition_id": "",
|
||||
"subtitle_sync": true,
|
||||
"subtitle_taskinfo": [
|
||||
|
||||
],
|
||||
"system_font_list": [
|
||||
|
||||
],
|
||||
"use_float_render": false,
|
||||
"video_mute": false,
|
||||
"zoom_info_params": null
|
||||
},
|
||||
"cover": null,
|
||||
"create_time": 0,
|
||||
"duration": 0,
|
||||
"extra_info": null,
|
||||
"fps": 30,
|
||||
"free_render_index_mode_on": false,
|
||||
"group_container": null,
|
||||
"id": "26FDE5CD-364C-45A3-8930-A40DF2F7EB2B",
|
||||
"is_drop_frame_timecode": false,
|
||||
"keyframe_graph_list": [
|
||||
|
||||
],
|
||||
"keyframes": {
|
||||
"adjusts": [
|
||||
|
||||
],
|
||||
"audios": [
|
||||
|
||||
],
|
||||
"effects": [
|
||||
|
||||
],
|
||||
"filters": [
|
||||
|
||||
],
|
||||
"handwrites": [
|
||||
|
||||
],
|
||||
"stickers": [
|
||||
|
||||
],
|
||||
"texts": [
|
||||
|
||||
],
|
||||
"videos": [
|
||||
|
||||
]
|
||||
},
|
||||
"last_modified_platform": {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
},
|
||||
"lyrics_effects": [
|
||||
|
||||
],
|
||||
"materials": {
|
||||
"ai_translates": [
|
||||
|
||||
],
|
||||
"audio_balances": [
|
||||
|
||||
],
|
||||
"audio_effects": [
|
||||
|
||||
],
|
||||
"audio_fades": [
|
||||
|
||||
],
|
||||
"audio_track_indexes": [
|
||||
|
||||
],
|
||||
"audios": [
|
||||
|
||||
],
|
||||
"beats": [
|
||||
|
||||
],
|
||||
"canvases": [
|
||||
|
||||
],
|
||||
"chromas": [
|
||||
|
||||
],
|
||||
"color_curves": [
|
||||
|
||||
],
|
||||
"common_mask": [
|
||||
|
||||
],
|
||||
"digital_human_model_dressing": [
|
||||
|
||||
],
|
||||
"digital_humans": [
|
||||
|
||||
],
|
||||
"drafts": [
|
||||
|
||||
],
|
||||
"effects": [
|
||||
|
||||
],
|
||||
"flowers": [
|
||||
|
||||
],
|
||||
"green_screens": [
|
||||
|
||||
],
|
||||
"handwrites": [
|
||||
|
||||
],
|
||||
"hsl": [
|
||||
|
||||
],
|
||||
"images": [
|
||||
|
||||
],
|
||||
"log_color_wheels": [
|
||||
|
||||
],
|
||||
"loudnesses": [
|
||||
|
||||
],
|
||||
"manual_beautys": [
|
||||
|
||||
],
|
||||
"manual_deformations": [
|
||||
|
||||
],
|
||||
"material_animations": [
|
||||
|
||||
],
|
||||
"material_colors": [
|
||||
|
||||
],
|
||||
"multi_language_refs": [
|
||||
|
||||
],
|
||||
"placeholder_infos": [
|
||||
|
||||
],
|
||||
"placeholders": [
|
||||
|
||||
],
|
||||
"plugin_effects": [
|
||||
|
||||
],
|
||||
"primary_color_wheels": [
|
||||
|
||||
],
|
||||
"realtime_denoises": [
|
||||
|
||||
],
|
||||
"shapes": [
|
||||
|
||||
],
|
||||
"smart_crops": [
|
||||
|
||||
],
|
||||
"smart_relights": [
|
||||
|
||||
],
|
||||
"sound_channel_mappings": [
|
||||
|
||||
],
|
||||
"speeds": [
|
||||
|
||||
],
|
||||
"stickers": [
|
||||
|
||||
],
|
||||
"tail_leaders": [
|
||||
|
||||
],
|
||||
"text_templates": [
|
||||
|
||||
],
|
||||
"texts": [
|
||||
|
||||
],
|
||||
"time_marks": [
|
||||
|
||||
],
|
||||
"transitions": [
|
||||
|
||||
],
|
||||
"video_effects": [
|
||||
|
||||
],
|
||||
"video_trackings": [
|
||||
|
||||
],
|
||||
"videos": [
|
||||
|
||||
],
|
||||
"vocal_beautifys": [
|
||||
|
||||
],
|
||||
"vocal_separations": [
|
||||
|
||||
]
|
||||
},
|
||||
"mutable_config": null,
|
||||
"name": "",
|
||||
"new_version": "138.0.0",
|
||||
"path": "",
|
||||
"platform": {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
},
|
||||
"relationships": [
|
||||
|
||||
],
|
||||
"render_index_track_mode_on": true,
|
||||
"retouch_cover": null,
|
||||
"source": "default",
|
||||
"static_cover_image_path": "",
|
||||
"time_marks": null,
|
||||
"tracks": [
|
||||
|
||||
],
|
||||
"uneven_animation_template_info": {
|
||||
"composition": "",
|
||||
"content": "",
|
||||
"order": "",
|
||||
"sub_template_info_list": [
|
||||
|
||||
]
|
||||
},
|
||||
"update_time": 0,
|
||||
"version": 360000
|
||||
}
|
||||
278
template/draft_info.json.bak
Normal file
278
template/draft_info.json.bak
Normal file
@@ -0,0 +1,278 @@
|
||||
{
|
||||
"canvas_config": {
|
||||
"background": null,
|
||||
"height": 1080,
|
||||
"ratio": "original",
|
||||
"width": 1920
|
||||
},
|
||||
"color_space": -1,
|
||||
"config": {
|
||||
"adjust_max_index": 1,
|
||||
"attachment_info": [
|
||||
|
||||
],
|
||||
"combination_max_index": 1,
|
||||
"export_range": null,
|
||||
"extract_audio_last_index": 1,
|
||||
"lyrics_recognition_id": "",
|
||||
"lyrics_sync": true,
|
||||
"lyrics_taskinfo": [
|
||||
|
||||
],
|
||||
"maintrack_adsorb": true,
|
||||
"material_save_mode": 0,
|
||||
"multi_language_current": "none",
|
||||
"multi_language_list": [
|
||||
|
||||
],
|
||||
"multi_language_main": "none",
|
||||
"multi_language_mode": "none",
|
||||
"original_sound_last_index": 1,
|
||||
"record_audio_last_index": 1,
|
||||
"sticker_max_index": 1,
|
||||
"subtitle_keywords_config": null,
|
||||
"subtitle_recognition_id": "",
|
||||
"subtitle_sync": true,
|
||||
"subtitle_taskinfo": [
|
||||
|
||||
],
|
||||
"system_font_list": [
|
||||
|
||||
],
|
||||
"use_float_render": false,
|
||||
"video_mute": false,
|
||||
"zoom_info_params": null
|
||||
},
|
||||
"cover": null,
|
||||
"create_time": 0,
|
||||
"duration": 0,
|
||||
"extra_info": null,
|
||||
"fps": 30,
|
||||
"free_render_index_mode_on": false,
|
||||
"group_container": null,
|
||||
"id": "26FDE5CD-364C-45A3-8930-A40DF2F7EB2B",
|
||||
"is_drop_frame_timecode": false,
|
||||
"keyframe_graph_list": [
|
||||
|
||||
],
|
||||
"keyframes": {
|
||||
"adjusts": [
|
||||
|
||||
],
|
||||
"audios": [
|
||||
|
||||
],
|
||||
"effects": [
|
||||
|
||||
],
|
||||
"filters": [
|
||||
|
||||
],
|
||||
"handwrites": [
|
||||
|
||||
],
|
||||
"stickers": [
|
||||
|
||||
],
|
||||
"texts": [
|
||||
|
||||
],
|
||||
"videos": [
|
||||
|
||||
]
|
||||
},
|
||||
"last_modified_platform": {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
},
|
||||
"lyrics_effects": [
|
||||
|
||||
],
|
||||
"materials": {
|
||||
"ai_translates": [
|
||||
|
||||
],
|
||||
"audio_balances": [
|
||||
|
||||
],
|
||||
"audio_effects": [
|
||||
|
||||
],
|
||||
"audio_fades": [
|
||||
|
||||
],
|
||||
"audio_track_indexes": [
|
||||
|
||||
],
|
||||
"audios": [
|
||||
|
||||
],
|
||||
"beats": [
|
||||
|
||||
],
|
||||
"canvases": [
|
||||
|
||||
],
|
||||
"chromas": [
|
||||
|
||||
],
|
||||
"color_curves": [
|
||||
|
||||
],
|
||||
"common_mask": [
|
||||
|
||||
],
|
||||
"digital_human_model_dressing": [
|
||||
|
||||
],
|
||||
"digital_humans": [
|
||||
|
||||
],
|
||||
"drafts": [
|
||||
|
||||
],
|
||||
"effects": [
|
||||
|
||||
],
|
||||
"flowers": [
|
||||
|
||||
],
|
||||
"green_screens": [
|
||||
|
||||
],
|
||||
"handwrites": [
|
||||
|
||||
],
|
||||
"hsl": [
|
||||
|
||||
],
|
||||
"images": [
|
||||
|
||||
],
|
||||
"log_color_wheels": [
|
||||
|
||||
],
|
||||
"loudnesses": [
|
||||
|
||||
],
|
||||
"manual_beautys": [
|
||||
|
||||
],
|
||||
"manual_deformations": [
|
||||
|
||||
],
|
||||
"material_animations": [
|
||||
|
||||
],
|
||||
"material_colors": [
|
||||
|
||||
],
|
||||
"multi_language_refs": [
|
||||
|
||||
],
|
||||
"placeholder_infos": [
|
||||
|
||||
],
|
||||
"placeholders": [
|
||||
|
||||
],
|
||||
"plugin_effects": [
|
||||
|
||||
],
|
||||
"primary_color_wheels": [
|
||||
|
||||
],
|
||||
"realtime_denoises": [
|
||||
|
||||
],
|
||||
"shapes": [
|
||||
|
||||
],
|
||||
"smart_crops": [
|
||||
|
||||
],
|
||||
"smart_relights": [
|
||||
|
||||
],
|
||||
"sound_channel_mappings": [
|
||||
|
||||
],
|
||||
"speeds": [
|
||||
|
||||
],
|
||||
"stickers": [
|
||||
|
||||
],
|
||||
"tail_leaders": [
|
||||
|
||||
],
|
||||
"text_templates": [
|
||||
|
||||
],
|
||||
"texts": [
|
||||
|
||||
],
|
||||
"time_marks": [
|
||||
|
||||
],
|
||||
"transitions": [
|
||||
|
||||
],
|
||||
"video_effects": [
|
||||
|
||||
],
|
||||
"video_trackings": [
|
||||
|
||||
],
|
||||
"videos": [
|
||||
|
||||
],
|
||||
"vocal_beautifys": [
|
||||
|
||||
],
|
||||
"vocal_separations": [
|
||||
|
||||
]
|
||||
},
|
||||
"mutable_config": null,
|
||||
"name": "",
|
||||
"new_version": "138.0.0",
|
||||
"path": "",
|
||||
"platform": {
|
||||
"app_id": 359289,
|
||||
"app_source": "cc",
|
||||
"app_version": "6.5.0",
|
||||
"device_id": "c4ca4238a0b923820dcc509a6f75849b",
|
||||
"hard_disk_id": "307563e0192a94465c0e927fbc482942",
|
||||
"mac_address": "c3371f2d4fb02791c067ce44d8fb4ed5",
|
||||
"os": "mac",
|
||||
"os_version": "15.5"
|
||||
},
|
||||
"relationships": [
|
||||
|
||||
],
|
||||
"render_index_track_mode_on": true,
|
||||
"retouch_cover": null,
|
||||
"source": "default",
|
||||
"static_cover_image_path": "",
|
||||
"time_marks": null,
|
||||
"tracks": [
|
||||
|
||||
],
|
||||
"uneven_animation_template_info": {
|
||||
"composition": "",
|
||||
"content": "",
|
||||
"order": "",
|
||||
"sub_template_info_list": [
|
||||
|
||||
]
|
||||
},
|
||||
"update_time": 0,
|
||||
"version": 360000
|
||||
}
|
||||
1
template/draft_meta_info.json
Normal file
1
template/draft_meta_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"cloud_draft_cover":true,"cloud_draft_sync":true,"cloud_package_completed_time":"","draft_cloud_capcut_purchase_info":"","draft_cloud_last_action_download":false,"draft_cloud_package_type":"","draft_cloud_purchase_info":"","draft_cloud_template_id":"","draft_cloud_tutorial_info":"","draft_cloud_videocut_purchase_info":"","draft_cover":"draft_cover.jpg","draft_deeplink_url":"","draft_enterprise_info":{"draft_enterprise_extra":"","draft_enterprise_id":"","draft_enterprise_name":"","enterprise_material":[]},"draft_fold_path":"/Users/sunguannan/Movies/CapCut/User Data/Projects/com.lveditor.draft/0707","draft_id":"989869B1-B560-489C-9C6F-4B444F24BF36","draft_is_ae_produce":false,"draft_is_ai_packaging_used":false,"draft_is_ai_shorts":false,"draft_is_ai_translate":false,"draft_is_article_video_draft":false,"draft_is_cloud_temp_draft":false,"draft_is_from_deeplink":"false","draft_is_invisible":false,"draft_materials":[{"type":0,"value":[]},{"type":1,"value":[]},{"type":2,"value":[]},{"type":3,"value":[]},{"type":6,"value":[]},{"type":7,"value":[]},{"type":8,"value":[]}],"draft_materials_copied_info":[],"draft_name":"0707","draft_need_rename_folder":false,"draft_new_version":"","draft_removable_storage_device":"","draft_root_path":"/Users/sunguannan/Movies/CapCut/User Data/Projects/com.lveditor.draft","draft_segment_extra_info":[],"draft_timeline_materials_size_":2851,"draft_type":"","tm_draft_cloud_completed":"","tm_draft_cloud_entry_id":-1,"tm_draft_cloud_modified":0,"tm_draft_cloud_parent_entry_id":-1,"tm_draft_cloud_space_id":-1,"tm_draft_cloud_user_id":-1,"tm_draft_create":1751876007857286,"tm_draft_modified":1751876105604683,"tm_draft_removed":0,"tm_duration":0}
|
||||
6
template/draft_settings
Normal file
6
template/draft_settings
Normal file
@@ -0,0 +1,6 @@
|
||||
[General]
|
||||
cloud_last_modify_platform=mac
|
||||
draft_create_time=1751876007
|
||||
draft_last_edit_time=1751876105
|
||||
real_edit_keys=1
|
||||
real_edit_seconds=8
|
||||
1
template/performance_opt_info.json
Normal file
1
template/performance_opt_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"manual_cancle_precombine_segs":null}
|
||||
1
template/template-2.tmp
Normal file
1
template/template-2.tmp
Normal file
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"background":null,"height":1080,"ratio":"original","width":1920},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"use_float_render":false,"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"26FDE5CD-364C-45A3-8930-A40DF2F7EB2B","is_drop_frame_timecode":false,"keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":359289,"app_source":"cc","app_version":"6.5.0","device_id":"c4ca4238a0b923820dcc509a6f75849b","hard_disk_id":"307563e0192a94465c0e927fbc482942","mac_address":"c3371f2d4fb02791c067ce44d8fb4ed5","os":"mac","os_version":"15.5"},"lyrics_effects":[],"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"common_mask":[],"digital_human_model_dressing":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_beautys":[],"manual_deformations":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholder_infos":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"138.0.0","path":"","platform":{"app_id":359289,"app_source":"cc","app_version":"6.5.0","device_id":"c4ca4238a0b923820dcc509a6f75849b","hard_disk_id":"307563e0192a94465c0e927fbc482942","mac_address":"c3371f2d4fb02791c067ce44d8fb4ed5","os":"mac","os_version":"15.5"},"relationships":[],"render_index_track_mode_on":true,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"uneven_animation_template_info":{"composition":"","content":"","order":"","sub_template_info_list":[]},"update_time":0,"version":360000}
|
||||
1
template/template.tmp
Normal file
1
template/template.tmp
Normal file
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"background":null,"height":0,"ratio":"original","width":0},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"use_float_render":false,"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"470E26D0-9077-4231-A7A7-619F75FF92B3","is_drop_frame_timecode":false,"keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":0,"app_source":"","app_version":"","device_id":"","hard_disk_id":"","mac_address":"","os":"","os_version":""},"lyrics_effects":[],"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"common_mask":[],"digital_human_model_dressing":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_beautys":[],"manual_deformations":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholder_infos":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"75.0.0","path":"","platform":{"app_id":0,"app_source":"","app_version":"","device_id":"","hard_disk_id":"","mac_address":"","os":"","os_version":""},"relationships":[],"render_index_track_mode_on":false,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"uneven_animation_template_info":{"composition":"","content":"","order":"","sub_template_info_list":[]},"update_time":0,"version":360000}
|
||||
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"height":1080,"ratio":"original","width":1920},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"DF724EE8-CA13-430C-B9E1-643276C263DA","keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_deformations":[],"masks":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"110.0.0","platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"relationships":[],"render_index_track_mode_on":true,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"update_time":0,"version":360000}
|
||||
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"height":1080,"ratio":"original","width":1920},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"DF724EE8-CA13-430C-B9E1-643276C263DA","keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_deformations":[],"masks":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"110.0.0","platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"relationships":[],"render_index_track_mode_on":false,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"update_time":0,"version":360000}
|
||||
1
template_jianying/attachment_pc_common.json
Normal file
1
template_jianying/attachment_pc_common.json
Normal file
@@ -0,0 +1 @@
|
||||
{"ai_packaging_infos":[],"ai_packaging_report_info":{"caption_id_list":[],"task_id":"","text_style":"","tos_id":"","video_category":""},"commercial_music_category_ids":[],"pc_feature_flag":0,"recognize_tasks":[],"template_item_infos":[],"unlock_template_ids":[]}
|
||||
1
template_jianying/draft_agency_config.json
Normal file
1
template_jianying/draft_agency_config.json
Normal file
@@ -0,0 +1 @@
|
||||
{"marterials":null,"use_converter":false,"video_resolution":720}
|
||||
0
template_jianying/draft_biz_config.json
Normal file
0
template_jianying/draft_biz_config.json
Normal file
BIN
template_jianying/draft_cover.jpg
Normal file
BIN
template_jianying/draft_cover.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
1
template_jianying/draft_info.json
Normal file
1
template_jianying/draft_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"height":1080,"ratio":"original","width":1920},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"DF724EE8-CA13-430C-B9E1-643276C263DA","keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_deformations":[],"masks":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"110.0.0","platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"relationships":[],"render_index_track_mode_on":true,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"update_time":0,"version":360000}
|
||||
1
template_jianying/draft_info.json.bak
Normal file
1
template_jianying/draft_info.json.bak
Normal file
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"height":1080,"ratio":"original","width":1920},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"DF724EE8-CA13-430C-B9E1-643276C263DA","keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_deformations":[],"masks":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"110.0.0","platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"relationships":[],"render_index_track_mode_on":true,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"update_time":0,"version":360000}
|
||||
1
template_jianying/draft_meta_info.json
Normal file
1
template_jianying/draft_meta_info.json
Normal file
@@ -0,0 +1 @@
|
||||
{"cloud_package_completed_time":"","draft_cloud_capcut_purchase_info":"","draft_cloud_last_action_download":false,"draft_cloud_materials":[],"draft_cloud_purchase_info":"","draft_cloud_template_id":"","draft_cloud_tutorial_info":"","draft_cloud_videocut_purchase_info":"","draft_cover":"draft_cover.jpg","draft_deeplink_url":"","draft_enterprise_info":{"draft_enterprise_extra":"","draft_enterprise_id":"","draft_enterprise_name":"","enterprise_material":[]},"draft_fold_path":"/Users/sunguannan/Movies/JianyingPro/User Data/Projects/com.lveditor.draft/5月16日","draft_id":"EC6E4680-CEF1-408B-8BA9-5E13124C61D2","draft_is_ai_packaging_used":false,"draft_is_ai_shorts":false,"draft_is_ai_translate":false,"draft_is_article_video_draft":false,"draft_is_from_deeplink":"false","draft_is_invisible":false,"draft_materials":[{"type":0,"value":[]},{"type":1,"value":[]},{"type":2,"value":[]},{"type":3,"value":[]},{"type":6,"value":[]},{"type":7,"value":[]},{"type":8,"value":[]}],"draft_materials_copied_info":[],"draft_name":"5月16日","draft_new_version":"","draft_removable_storage_device":"","draft_root_path":"/Users/sunguannan/Movies/JianyingPro/User Data/Projects/com.lveditor.draft","draft_segment_extra_info":[],"draft_timeline_materials_size_":7867,"draft_type":"","tm_draft_cloud_completed":"","tm_draft_cloud_modified":0,"tm_draft_create":1747367326219300,"tm_draft_modified":1747367328691892,"tm_draft_removed":0,"tm_duration":0}
|
||||
5
template_jianying/draft_settings
Normal file
5
template_jianying/draft_settings
Normal file
@@ -0,0 +1,5 @@
|
||||
[General]
|
||||
draft_create_time=1747367326
|
||||
draft_last_edit_time=1747367328
|
||||
real_edit_keys=1
|
||||
real_edit_seconds=2
|
||||
1
template_jianying/template-2.tmp
Normal file
1
template_jianying/template-2.tmp
Normal file
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"height":1080,"ratio":"original","width":1920},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"DF724EE8-CA13-430C-B9E1-643276C263DA","keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_deformations":[],"masks":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"110.0.0","platform":{"app_id":3704,"app_source":"lv","app_version":"5.9.0","device_id":"9c1d156ba20d5d2ef89a71f1a92596fd","hard_disk_id":"81f3587033961b2ad1d1ef9d11dcce33","mac_address":"5409d920e86b1169992326ea688e0715","os":"mac","os_version":"15.3.2"},"relationships":[],"render_index_track_mode_on":true,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"update_time":0,"version":360000}
|
||||
1
template_jianying/template.tmp
Normal file
1
template_jianying/template.tmp
Normal file
@@ -0,0 +1 @@
|
||||
{"canvas_config":{"height":0,"ratio":"original","width":0},"color_space":-1,"config":{"adjust_max_index":1,"attachment_info":[],"combination_max_index":1,"export_range":null,"extract_audio_last_index":1,"lyrics_recognition_id":"","lyrics_sync":true,"lyrics_taskinfo":[],"maintrack_adsorb":true,"material_save_mode":0,"multi_language_current":"none","multi_language_list":[],"multi_language_main":"none","multi_language_mode":"none","original_sound_last_index":1,"record_audio_last_index":1,"sticker_max_index":1,"subtitle_keywords_config":null,"subtitle_recognition_id":"","subtitle_sync":true,"subtitle_taskinfo":[],"system_font_list":[],"video_mute":false,"zoom_info_params":null},"cover":null,"create_time":0,"duration":0,"extra_info":null,"fps":30.0,"free_render_index_mode_on":false,"group_container":null,"id":"32F0961A-740A-4107-A2A1-02C5936204C8","keyframe_graph_list":[],"keyframes":{"adjusts":[],"audios":[],"effects":[],"filters":[],"handwrites":[],"stickers":[],"texts":[],"videos":[]},"last_modified_platform":{"app_id":0,"app_source":"","app_version":"","device_id":"","hard_disk_id":"","mac_address":"","os":"","os_version":""},"materials":{"ai_translates":[],"audio_balances":[],"audio_effects":[],"audio_fades":[],"audio_track_indexes":[],"audios":[],"beats":[],"canvases":[],"chromas":[],"color_curves":[],"digital_humans":[],"drafts":[],"effects":[],"flowers":[],"green_screens":[],"handwrites":[],"hsl":[],"images":[],"log_color_wheels":[],"loudnesses":[],"manual_deformations":[],"masks":[],"material_animations":[],"material_colors":[],"multi_language_refs":[],"placeholders":[],"plugin_effects":[],"primary_color_wheels":[],"realtime_denoises":[],"shapes":[],"smart_crops":[],"smart_relights":[],"sound_channel_mappings":[],"speeds":[],"stickers":[],"tail_leaders":[],"text_templates":[],"texts":[],"time_marks":[],"transitions":[],"video_effects":[],"video_trackings":[],"videos":[],"vocal_beautifys":[],"vocal_separations":[]},"mutable_config":null,"name":"","new_version":"75.0.0","platform":{"app_id":0,"app_source":"","app_version":"","device_id":"","hard_disk_id":"","mac_address":"","os":"","os_version":""},"relationships":[],"render_index_track_mode_on":false,"retouch_cover":null,"source":"default","static_cover_image_path":"","time_marks":null,"tracks":[],"update_time":0,"version":360000}
|
||||
79
util.py
Normal file
79
util.py
Normal file
@@ -0,0 +1,79 @@
|
||||
import shutil
|
||||
import subprocess
|
||||
import json
|
||||
import re
|
||||
import hashlib
|
||||
import functools
|
||||
import time
|
||||
from settings.local import DRAFT_DOMAIN, PREVIEW_ROUTER
|
||||
|
||||
def hex_to_rgb(hex_color: str) -> tuple:
|
||||
"""将十六进制颜色代码转换为 RGB 元组(范围 0.0-1.0)"""
|
||||
hex_color = hex_color.lstrip('#')
|
||||
if len(hex_color) == 3:
|
||||
hex_color = ''.join([c*2 for c in hex_color]) # 处理简写形式(如 #fff)
|
||||
try:
|
||||
r = int(hex_color[0:2], 16) / 255.0
|
||||
g = int(hex_color[2:4], 16) / 255.0
|
||||
b = int(hex_color[4:6], 16) / 255.0
|
||||
return (r, g, b)
|
||||
except ValueError:
|
||||
raise ValueError(f"无效的十六进制颜色代码: {hex_color}")
|
||||
|
||||
|
||||
def is_windows_path(path):
|
||||
"""检测路径是否是Windows风格"""
|
||||
# 检查是否以驱动器号开头 (如 C:\) 或包含Windows风格的分隔符
|
||||
return re.match(r'^[a-zA-Z]:\\|\\\\', path) is not None
|
||||
|
||||
|
||||
def zip_draft(draft_name):
|
||||
# 压缩文件夹
|
||||
zip_path = f"./tmp/zip/{draft_name}.zip"
|
||||
shutil.make_archive(f"./tmp/zip/{draft_name}", 'zip', draft_name)
|
||||
return zip_path
|
||||
|
||||
def url_to_hash(url, length=16):
|
||||
"""
|
||||
将 URL 转换为固定长度的哈希字符串(不含扩展名)
|
||||
|
||||
参数:
|
||||
- url: 原始 URL 字符串
|
||||
- length: 哈希字符串的长度(最大64,默认16)
|
||||
|
||||
返回:
|
||||
- 哈希字符串(如:3a7f9e7d9a1b4e2d)
|
||||
"""
|
||||
# 确保 URL 是字节类型
|
||||
url_bytes = url.encode('utf-8')
|
||||
|
||||
# 使用 SHA-256 生成哈希(安全且唯一性强)
|
||||
hash_object = hashlib.sha256(url_bytes)
|
||||
|
||||
# 截取指定长度的十六进制字符串
|
||||
return hash_object.hexdigest()[:length]
|
||||
|
||||
|
||||
def timing_decorator(func_name):
|
||||
"""装饰器:用于监控函数执行时间"""
|
||||
def decorator(func):
|
||||
@functools.wraps(func)
|
||||
def wrapper(*args, **kwargs):
|
||||
start_time = time.time()
|
||||
print(f"[{func_name}] 开始执行...")
|
||||
try:
|
||||
result = func(*args, **kwargs)
|
||||
end_time = time.time()
|
||||
duration = end_time - start_time
|
||||
print(f"[{func_name}] 执行完成,耗时: {duration:.3f}秒")
|
||||
return result
|
||||
except Exception as e:
|
||||
end_time = time.time()
|
||||
duration = end_time - start_time
|
||||
print(f"[{func_name}] 执行失败,耗时: {duration:.3f}秒,错误: {e}")
|
||||
raise
|
||||
return wrapper
|
||||
return decorator
|
||||
|
||||
def generate_draft_url(draft_id):
|
||||
return f"{DRAFT_DOMAIN}{PREVIEW_ROUTER}?draft_id={draft_id}"
|
||||
Reference in New Issue
Block a user