fix: black + isort 格式化
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1m16s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1540h48m59s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1541h20m38s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1m16s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1540h48m59s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Build Production Runtime Images (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Failing after 1540h49m1s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1541h20m38s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
This commit is contained in:
@@ -181,8 +181,7 @@ def concat_main_audio(
|
||||
trim_start = getattr(clip, "start_time", 0) or 0
|
||||
if effective_duration > 0:
|
||||
filter_parts.append(
|
||||
f"[{i}:a]atrim=start={trim_start:.3f}:duration={effective_duration:.3f},"
|
||||
f"asetpts=PTS-STARTPTS[a{i}]"
|
||||
f"[{i}:a]atrim=start={trim_start:.3f}:duration={effective_duration:.3f}," f"asetpts=PTS-STARTPTS[a{i}]"
|
||||
)
|
||||
else:
|
||||
filter_parts.append(f"[{i}:a]asetpts=PTS-STARTPTS[a{i}]")
|
||||
|
||||
@@ -293,9 +293,7 @@ class TrimEngine:
|
||||
return segments
|
||||
|
||||
# 单段裁剪兼容:从 trim_start/trim_end/trim_duration 构造
|
||||
has_single = any(
|
||||
k in config for k in ("trim_start", "trim_end", "trim_duration")
|
||||
)
|
||||
has_single = any(k in config for k in ("trim_start", "trim_end", "trim_duration"))
|
||||
if has_single:
|
||||
seg = TrimSegment(
|
||||
segment_id="main",
|
||||
@@ -329,9 +327,7 @@ def extract_trim_from_clip_config(config: dict[str, Any] | None) -> TrimConfig |
|
||||
return TrimConfig.from_dict(config["trim"])
|
||||
|
||||
# 扁平字段
|
||||
has_any = any(
|
||||
k in config for k in ("trim_start", "trim_end", "trim_duration")
|
||||
)
|
||||
has_any = any(k in config for k in ("trim_start", "trim_end", "trim_duration"))
|
||||
if not has_any:
|
||||
return None
|
||||
|
||||
|
||||
@@ -339,8 +339,11 @@ class UnifiedRenderService:
|
||||
logger.warning("片头视频不存在,跳过片头: %s", src)
|
||||
elif intro_outro_config.intro_type == "text":
|
||||
intro_ok = IntroOutroEngine.generate_text_intro(
|
||||
intro_path, intro_outro_config,
|
||||
self.output_width, self.output_height, self.output_fps,
|
||||
intro_path,
|
||||
intro_outro_config,
|
||||
self.output_width,
|
||||
self.output_height,
|
||||
self.output_fps,
|
||||
)
|
||||
|
||||
if not intro_ok:
|
||||
@@ -361,8 +364,11 @@ class UnifiedRenderService:
|
||||
logger.warning("片尾视频不存在,跳过片尾: %s", src)
|
||||
elif intro_outro_config.outro_type in ("text", "follow"):
|
||||
outro_ok = IntroOutroEngine.generate_text_outro(
|
||||
outro_path, intro_outro_config,
|
||||
self.output_width, self.output_height, self.output_fps,
|
||||
outro_path,
|
||||
intro_outro_config,
|
||||
self.output_width,
|
||||
self.output_height,
|
||||
self.output_fps,
|
||||
)
|
||||
|
||||
if not outro_ok:
|
||||
@@ -371,7 +377,10 @@ class UnifiedRenderService:
|
||||
# 拼接
|
||||
if intro_path or outro_path:
|
||||
concat_ok = IntroOutroEngine.concat_with_intro_outro(
|
||||
output_path, intro_path, outro_path, final_with_io,
|
||||
output_path,
|
||||
intro_path,
|
||||
outro_path,
|
||||
final_with_io,
|
||||
transition_duration=intro_outro_config.transition_duration,
|
||||
transition_effect=intro_outro_config.transition_effect,
|
||||
)
|
||||
@@ -1301,9 +1310,12 @@ class UnifiedRenderService:
|
||||
wm_h = wm_scale # 近似(正方形假设)
|
||||
x, y = WatermarkEngine.calc_position(
|
||||
watermark_config.position,
|
||||
self.output_width, self.output_height,
|
||||
wm_scale, wm_h,
|
||||
watermark_config.margin_x, watermark_config.margin_y,
|
||||
self.output_width,
|
||||
self.output_height,
|
||||
wm_scale,
|
||||
wm_h,
|
||||
watermark_config.margin_x,
|
||||
watermark_config.margin_y,
|
||||
)
|
||||
|
||||
# 滚动水印
|
||||
|
||||
@@ -222,9 +222,13 @@ class WatermarkEngine:
|
||||
|
||||
# 计算位置
|
||||
x, y = WatermarkEngine.calc_position(
|
||||
config.position, output_width, output_height,
|
||||
wm_width, wm_width, # 高度未知,先用宽度估算
|
||||
config.margin_x, config.margin_y,
|
||||
config.position,
|
||||
output_width,
|
||||
output_height,
|
||||
wm_width,
|
||||
wm_width, # 高度未知,先用宽度估算
|
||||
config.margin_x,
|
||||
config.margin_y,
|
||||
)
|
||||
|
||||
# 滚动水印
|
||||
@@ -288,9 +292,13 @@ class WatermarkEngine:
|
||||
|
||||
# 位置计算
|
||||
x, y = WatermarkEngine.calc_position(
|
||||
config.position, output_width, output_height,
|
||||
approx_w, approx_h,
|
||||
config.margin_x, config.margin_y,
|
||||
config.position,
|
||||
output_width,
|
||||
output_height,
|
||||
approx_w,
|
||||
approx_h,
|
||||
config.margin_x,
|
||||
config.margin_y,
|
||||
)
|
||||
|
||||
# 滚动水印
|
||||
|
||||
Reference in New Issue
Block a user