fix:자막 하단 정렬 + 인트로 자막 중복 제거

- FFmpeg subtitles 필터 → ass 필터 변경 (ASS 스타일 Alignment 완전 보존)
- 인트로/아웃트로 씬 자막 제거를 이중 보장:
  1. Job에서 자막용 scenes 복사본의 인트로/아웃트로 narration을 빈 문자열로 설정
  2. generateAssSubtitle에서 scene_number int 캐스팅 + <= 1 비교로 안전장치 강화

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-15 17:39:39 +09:00
parent 3c8f7c9f66
commit ff80d50c9b
2 changed files with 15 additions and 7 deletions

View File

@@ -241,9 +241,16 @@ public function handle(
// === Step 5: 최종 합성 (80%) ===
$tutorial->updateProgress(TutorialVideo::STATUS_ASSEMBLING, 70, '영상 합성 중...');
// ASS 자막 생성
// ASS 자막 생성 (인트로/아웃트로 나레이션은 자막에서 제외)
$subtitleScenes = array_map(function ($scene) {
$sn = (int) ($scene['scene_number'] ?? 0);
if ($sn <= 1 || $sn === 999) {
$scene['narration'] = '';
}
return $scene;
}, $scenes);
$subtitlePath = "{$workDir}/subtitle.ass";
$videoAssembly->generateAssSubtitle($scenes, $subtitlePath, $narrationDurations, 'landscape');
$videoAssembly->generateAssSubtitle($subtitleScenes, $subtitlePath, $narrationDurations, 'landscape');
// 최종 MP4 합성
$finalOutputPath = "{$workDir}/final_tutorial.mp4";