V2.2.4 版本

This commit is contained in:
2024-05-24 13:46:19 +08:00
parent 74009113fa
commit 17709c1a0b
57 changed files with 4484 additions and 2338 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ import shotSplit
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
# sys.argv = ["C:\\Users\\27698\\Desktop\\LAITool\\resources\\scripts\\Lai.exe","-c","D:/父爱如山倒/scripts/output_crop_00001.json"]
# sys.argv = ["C:\\Users\\27698\\Desktop\\LAITool\\resources\\scripts\\Lai.exe","-c","C:/Users/27698/Desktop/测试/123/scripts/output_crop_00001.json"]
print(sys.argv)
if len(sys.argv) < 2:
+13 -5
View File
@@ -376,11 +376,19 @@ class ImageToVideo:
proportion_height = img_height / 3200
proportion_width = img_height / 3200
if offset["name"] == "KFTypePositionY":
key_frame = offset["name"]
offset_list = ["KFTypePositionY", "KFTypePositionX"]
real_key_frame = key_frame
if key_frame == "KFTypeRandom":
# 随机获取 offset_list 中的一个数据
real_key_frame = offset_list[np.random.randint(0, 2)]
if real_key_frame == "KFTypePositionY":
offsetValue = offset["up_down"] * proportion_height
elif offset["name"] == "KFTypePositionX":
elif real_key_frame == "KFTypePositionX":
offsetValue = offset["left_right"] * proportion_width
elif offset["name"] == "KFTypeScale":
elif real_key_frame == "KFTypeScale":
offsetValue = offset["scale"]
else:
return ValueError("关键帧没有设置正确的参数")
@@ -402,7 +410,7 @@ class ImageToVideo:
end_offset,
self.fps,
self.video_size,
offset["name"],
real_key_frame,
)
video_arr.append(video_path)
print(video_path)
@@ -418,7 +426,7 @@ class ImageToVideo:
print(number)
filtered_data = [item for item in config_data if item["no"] == number]
# print(filtered_data)
cmd = [
self.ffprobe_path,
+2
View File
@@ -0,0 +1,2 @@
@echo off
pyinstaller Lai.spec