fix: 字幕居中bug修复,BGM声音太小bug修复,默认system prompt微调 - 强化旁白字数控制
- composer.py: BGM音量调整为0.45,禁用ducking压缩 - ffmpeg_utils.py: 字幕居中修复,多行字幕每行单独居中 - script_gen.py: 清理调试代码
This commit is contained in:
@@ -105,7 +105,7 @@ class VideoComposer:
|
||||
self._add_temp(silent_path)
|
||||
current_video = silent_path
|
||||
|
||||
# Step 2: 添加字幕 (白字黑边,无底框,下半区域居中)
|
||||
# Step 2: 添加字幕 (白字黑边,无底框,水平居中)
|
||||
if subtitles:
|
||||
subtitled_path = str(config.TEMP_DIR / f"{output_name}_subtitled.mp4")
|
||||
subtitle_style = {
|
||||
@@ -115,7 +115,8 @@ class VideoComposer:
|
||||
"borderw": 5,
|
||||
"bordercolor": "black",
|
||||
"box": 0, # 无底框
|
||||
"y": "h-200", # 下半区域居中
|
||||
"x": "(w-text_w)/2", # 水平居中
|
||||
"y": "h-200", # 底部区域
|
||||
}
|
||||
ffmpeg_utils.add_multiple_subtitles(
|
||||
current_video, subtitles, subtitled_path, default_style=subtitle_style
|
||||
@@ -443,7 +444,8 @@ class VideoComposer:
|
||||
"borderw": 5,
|
||||
"bordercolor": "black",
|
||||
"box": 0, # 无底框
|
||||
"y": "h-200", # 下半区域居中
|
||||
"x": "(w-text_w)/2", # 水平居中
|
||||
"y": "h-200", # 底部区域
|
||||
}
|
||||
ffmpeg_utils.add_multiple_subtitles(
|
||||
current_video, subtitles, subtitled_path, default_style=subtitle_style
|
||||
|
||||
Reference in New Issue
Block a user