feat(constant): 更新软件版本号至 0.0.6- 在 constant/__init__.py 文件中将 SOFTWARE_VERSION 从 '0.0.5' 修改为 '0.0.6'

- 在 entity/ffmpeg.py 文件中添加了新的视频效果处理逻辑,支持显示特定时长的视频片段
This commit is contained in:
2025-09-18 09:42:57 +08:00
parent 0c7181911e
commit f85ccea933
3 changed files with 12 additions and 2 deletions

3
.gitignore vendored
View File

@@ -31,4 +31,5 @@ target/
.venv
venv/
cython_debug/
.env
.env
.serena

View File

@@ -6,4 +6,4 @@ SUPPORT_FEATURE = (
'rclone_upload',
'custom_re_encode',
)
SOFTWARE_VERSION = '0.0.5'
SOFTWARE_VERSION = '0.0.6'

View File

@@ -344,6 +344,15 @@ class FfmpegTask(object):
filter_args.append(f"[v_rev{effect_index}]trim=duration={tail_seconds}[v_trim{effect_index}]")
filter_args.append(f"[v_trim{effect_index}]reverse[v_eff{effect_index}]")
video_output_str = f"[v_eff{effect_index}]"
elif effect.startswith("show:"):
param = effect.split(":", 2)[1]
if param == '':
param = "0"
show_seconds = float(param)
if show_seconds > 0:
effect_index += 1
filter_args.append(f"{video_output_str}trim=end={show_seconds}[v_eff{effect_index}]")
video_output_str = f"[v_eff{effect_index}]"
...
if self.resolution:
filter_args.append(f"{video_output_str}scale={self.resolution.replace('x', ':')}[v]")